Message ID | 20171101140316.31333-3-julien.grall@linaro.org |
---|---|
State | Accepted |
Commit | c6c2fc6e4919a1420096b94a4ba8682f20e92709 |
Headers | show |
Series | xen: Convert __page_to_mfn and _mfn_to_page to use typesafe MFN | expand |
On Wed, 1 Nov 2017, Julien Grall wrote: > The arm32 version of the function is_xen_heap_page currently define a > variable _mfn. This will lead to a compiler when use typesafe MFN in a > follow-up patch: > > called object '_mfn' is not a function or function pointer > > Fix it by renaming the local variable _mfn to mfn_. > > Signed-off-by: Julien Grall <julien.grall@linaro.org> Reviewed-by: Stefano Stabellini <sstabellini@kernel.org> > --- > > Cc: Stefano Stabellini <sstabellini@kernel.org> > > Changes in v3: > - Fix typo in the commit message > --- > xen/include/asm-arm/mm.h | 6 +++--- > 1 file changed, 3 insertions(+), 3 deletions(-) > > diff --git a/xen/include/asm-arm/mm.h b/xen/include/asm-arm/mm.h > index cd6dfb54b9..737a429409 100644 > --- a/xen/include/asm-arm/mm.h > +++ b/xen/include/asm-arm/mm.h > @@ -140,9 +140,9 @@ extern vaddr_t xenheap_virt_start; > #ifdef CONFIG_ARM_32 > #define is_xen_heap_page(page) is_xen_heap_mfn(page_to_mfn(page)) > #define is_xen_heap_mfn(mfn) ({ \ > - unsigned long _mfn = (mfn); \ > - (_mfn >= mfn_x(xenheap_mfn_start) && \ > - _mfn < mfn_x(xenheap_mfn_end)); \ > + unsigned long mfn_ = (mfn); \ > + (mfn_ >= mfn_x(xenheap_mfn_start) && \ > + mfn_ < mfn_x(xenheap_mfn_end)); \ > }) > #else > #define is_xen_heap_page(page) ((page)->count_info & PGC_xen_heap) > -- > 2.11.0 >
diff --git a/xen/include/asm-arm/mm.h b/xen/include/asm-arm/mm.h index cd6dfb54b9..737a429409 100644 --- a/xen/include/asm-arm/mm.h +++ b/xen/include/asm-arm/mm.h @@ -140,9 +140,9 @@ extern vaddr_t xenheap_virt_start; #ifdef CONFIG_ARM_32 #define is_xen_heap_page(page) is_xen_heap_mfn(page_to_mfn(page)) #define is_xen_heap_mfn(mfn) ({ \ - unsigned long _mfn = (mfn); \ - (_mfn >= mfn_x(xenheap_mfn_start) && \ - _mfn < mfn_x(xenheap_mfn_end)); \ + unsigned long mfn_ = (mfn); \ + (mfn_ >= mfn_x(xenheap_mfn_start) && \ + mfn_ < mfn_x(xenheap_mfn_end)); \ }) #else #define is_xen_heap_page(page) ((page)->count_info & PGC_xen_heap)
The arm32 version of the function is_xen_heap_page currently define a variable _mfn. This will lead to a compiler when use typesafe MFN in a follow-up patch: called object '_mfn' is not a function or function pointer Fix it by renaming the local variable _mfn to mfn_. Signed-off-by: Julien Grall <julien.grall@linaro.org> --- Cc: Stefano Stabellini <sstabellini@kernel.org> Changes in v3: - Fix typo in the commit message --- xen/include/asm-arm/mm.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)