Skip to contentSkip to conversation

IA64: make rsvd_region and num_rsvd_regions static

PATCH In review Simon Horman 2 participants 3 messages Aug 5, 2008 – Aug 12, 2008

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 IA64: make rsvd_region and num_rsvd_regions static

rsvd_region and num_rsvd_regions are only accessed in arch/ia64/kernel/setup.c, so they should be static.

Index: linux-2.6/arch/ia64/kernel/setup.c
=================================--- linux-2.6.orig/arch/ia64/kernel/setup.c 2008-08-02 17:38:02.000000000 +1000
+++ linux-2.6/arch/ia64/kernel/setup.c 2008-08-02 17:38:20.000000000 +1000
@@ -132,8 +132,8 @@ EXPORT_SYMBOL(ia64_max_iommu_merge_mask)
/*
* We use a special marker for the end of memory and it uses the extra (+1) slot */
-struct rsvd_region rsvd_region[IA64_MAX_RSVD_REGIONS + 1] __initdata; -int num_rsvd_regions __initdata;
+static struct rsvd_region rsvd_region[IA64_MAX_RSVD_REGIONS + 1] __initdata; +static int num_rsvd_regions __initdata;

/*

#1 lore raw
Quoted 2 lines

rsvd_region and num_rsvd_regions are only accessed in arch/ia64/kernel/setup.c, so they should be static.

Are you looking at -mm or linux-next? In my tree I see:

arch/ia64/mm/contig.c:  for (i = 0; i < num_rsvd_regions; i++) {
arch/ia64/mm/contig.c:          range_end   = min(end, rsvd_region[i].start & PAGE_MASK);
arch/ia64/mm/contig.c:          free_start = PAGE_ALIGN(rsvd_region[i].end);

-Tony

#2 lore raw
Quoted 4 lines · Tony
Quoted 2 lines

rsvd_region and num_rsvd_regions are only accessed in arch/ia64/kernel/setup.c, so they should be static.

Are you looking at -mm or linux-next? In my tree I see:

Whatever I was looking at, I was wrong. Sorry for the noise.

Quoted 3 lines
arch/ia64/mm/contig.c:  for (i = 0; i < num_rsvd_regions; i++) {
arch/ia64/mm/contig.c:          range_end   = min(end, rsvd_region[i].start & PAGE_MASK);
arch/ia64/mm/contig.c:          free_start = PAGE_ALIGN(rsvd_region[i].end);