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

[PATCH 09/62] can: Use static const

From: Joe Perches <joe@perches.com>
Date: 2010-11-21 02:40:07
Also in: lkml
Subsystem: can network drivers, the rest · Maintainers: Marc Kleine-Budde, Vincent Mailhol, 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
   4399	    604	   1160	   6163	   1813	drivers/net/can/sja1000/plx_pci.o.old
   4396	    604	   1160	   6160	   1810	drivers/net/can/sja1000/plx_pci.o.new

Signed-off-by: Joe Perches <joe@perches.com>
---
 drivers/net/can/sja1000/plx_pci.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/drivers/net/can/sja1000/plx_pci.c b/drivers/net/can/sja1000/plx_pci.c
index 437b5c7..231385b 100644
--- a/drivers/net/can/sja1000/plx_pci.c
+++ b/drivers/net/can/sja1000/plx_pci.c
@@ -383,7 +383,7 @@ static void plx_pci_reset_marathon(struct pci_dev *pdev)
 {
 	void __iomem *reset_addr;
 	int i;
-	int reset_bar[2] = {3, 5};
+	static const int reset_bar[2] = {3, 5};
 
 	plx_pci_reset_common(pdev);
 
-- 
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