Clean up warning for page_alloc.c
PATCH 1/1 Clean up warning for page_alloc.c
Hi all,
I clean up warning in xen/ia64.
The "MAX_ORDER" is redefined as I show below it.
I didn't change the Linux original code "mmzone.h" and thought to change a local definition in "page_alloc.c".
This patch changes a local definition from "MAX_ORDER" to "XEN_MAX_ORDER".
page_alloc.c:222:1: warning: "MAX_ORDER" redefined
In file included from /home/kanno/xen-ia64-unstable.hg/xen/include/asm-ia64/linux-xen/linux/gfp.h:7,
from /home/kanno/xen-ia64-unstable.hg/xen/include/asm/mm.h:6,
from /home/kanno/xen-ia64-unstable.hg/xen/include/linux/mm.h:79,
from /home/kanno/xen-ia64-unstable.hg/xen/include/asm-ia64/linux-xen/asm/uaccess.h:39,
from /home/kanno/xen-ia64-unstable.hg/xen/include/asm/domain.h:143,
from /home/kanno/xen-ia64-unstable.hg/xen/include/xen/sched.h:15,
from page_alloc.c:28:/home/kanno/xen-ia64-unstable.hg/xen/include/asm-ia64/linux/mmzone.h:19:1: warning: this is the location of the previous definition
Signed-off-by Masaki Kanno <[email protected]>
Best regards,
Kan
xen/common/page_alloc.c +7 -7
@@ -219,8 +219,8 @@ (((_pfn) <=MAX_DMADOM_PFN ) ?MEMZONE_DMADOM :MEMZONE_DOM ) /* Up to 2^20 pages can be allocated at once. */ -#define MAX_ORDER 20 -static struct list_head heap[NR_ZONES ][MAX_ORDER +1 ]; +#define XEN_MAX_ORDER 20 +static struct list_head heap[NR_ZONES ][XEN_MAX_ORDER +1 ];static unsigned long avail[NR_ZONES ];
@@ -234,7 +234,7 @@memset (avail,0 ,sizeof (avail));for ( i =0 ; i <NR_ZONES ; i++ ) -for ( j =0 ; j <=MAX_ORDER ; j++ ) +for ( j =0 ; j <=XEN_MAX_ORDER ; j++ )INIT_LIST_HEAD (&heap[i][j]);/* Pages that are free now go to the domain sub-allocator. */
@@ -270,13 +270,13 @@ASSERT (zone <NR_ZONES ); -if (unlikely (order >MAX_ORDER ) ) +if (unlikely (order >XEN_MAX_ORDER ) )return NULL ;spin_lock (&heap_lock);/* Find smallest order which can satisfy the request. */ -for ( i = order; i <=MAX_ORDER ; i++ ) +for ( i = order; i <=XEN_MAX_ORDER ; i++ )if ( !list_empty (&heap[zone][i]) ) goto found;
@@ -312,7 +312,7 @@unsigned long mask;ASSERT (zone <NR_ZONES ); -ASSERT (order <=MAX_ORDER ); +ASSERT (order <=XEN_MAX_ORDER );spin_lock (&heap_lock);
@@ -320,7 +320,7 @@ avail[zone] +=1 << order;/* Merge chunks as far as possible. */ -while ( order <MAX_ORDER ) +while ( order <XEN_MAX_ORDER ) { mask =1 << order;
_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xensource.com/xen-devel