Thread (76 messages) 76 messages, 8 authors, 2010-11-30
STALE5662d

[PATCH 37/62] r8169: Use static const

From: Joe Perches <joe@perches.com>
Date: 2010-11-21 02:40:21
Also in: lkml
Subsystem: networking drivers, the rest · Maintainers: Andrew Lunn, "David S. Miller", Eric Dumazet, Jakub Kicinski, Paolo Abeni, Linus Torvalds

Using static const generally increases object text and decreases data size.
It also generally decreases overall object size.

   text	   data	    bss	    dec	    hex	filename
  43939	    232	   9904	  54075	   d33b	drivers/net/r8169.o.new
  43974	    232	   9904	  54110	   d35e	drivers/net/r8169.o.old

Signed-off-by: Joe Perches <joe@perches.com>
---
 drivers/net/r8169.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/drivers/net/r8169.c b/drivers/net/r8169.c
index 7d33ef4..f9ad0d6 100644
--- a/drivers/net/r8169.c
+++ b/drivers/net/r8169.c
@@ -2516,7 +2516,7 @@ static void rtl8168d_2_hw_phy_config(void __iomem *ioaddr)
 
 		val = mdio_read(ioaddr, 0x0d);
 		if ((val & 0x00ff) != 0x006c) {
-			u32 set[] = {
+			static const u32 set[] = {
 				0x0065, 0x0066, 0x0067, 0x0068,
 				0x0069, 0x006a, 0x006b, 0x006c
 			};
-- 
1.7.3.2.245.g03276.dirty
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help