Skip to contentSkip to conversation

x86 pci-calgary_64.c: make a variable static

PATCH Applied Adrian Bunk 2 participants 2 messages Nov 9, 2007 – Nov 11, 2007 x86

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 x86 pci-calgary_64.c: make a variable static

"debugging" is a horrible name for a global variable - thankfully it can become static.

Also put it out of __read_mostly so that gcc no longer has to emit it at all.

---

 arch/x86/kernel/pci-calgary_64.c |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

22f49393bbb5d8e73f94338be5d1ad52f459779c

arch/x86/kernel/pci-calgary_64.c +2 -2
index 6bf1f71..a262f94 100644
@@ -183,7 +183,7 @@ static struct calgary_bus_info bus_info[MAX_PHB_BUS_NUM] = { { NULL, 0, 0 }, };
 
 /* enable this to stress test the chip's TCE cache */
 #ifdef CONFIG_IOMMU_DEBUG
-int debugging __read_mostly = 1;
+static int debugging = 1;
 
 static inline unsigned long verify_bit_range(unsigned long* bitmap,
 	int expected, unsigned long start, unsigned long end)
@@ -202,7 +202,7 @@ static inline unsigned long verify_bit_range(unsigned long* bitmap,
 	return ~0UL;
 }
 #else /* debugging is disabled */
-int debugging __read_mostly = 0;
+static int debugging = 0;
 
 static inline unsigned long verify_bit_range(unsigned long* bitmap,
 	int expected, unsigned long start, unsigned long end)
#1 lore raw
Quoted 7 lines · Adrian Bunk

"debugging" is a horrible name for a global variable - thankfully it can become static.

Also put it out of __read_mostly so that gcc no longer has to emit it at all.

Thanks, applied. Will push with my next batch of Calgary updates.

Cheers,
Muli