Skip to content

Commit

Permalink
atmel: Use static const
Browse files Browse the repository at this point in the history
Using static const generally increases object text and decreases data size.
It also generally decreases overall object size.

   text	   data	    bss	    dec	    hex	filename
  42578	    720	   8528	  51826	   ca72	drivers/net/wireless/atmel.o.old
  42578	    720	   8528	  51826	   ca72	drivers/net/wireless/atmel.o.new

Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
  • Loading branch information
Joe Perches authored and John W. Linville committed Nov 22, 2010
1 parent 5653a63 commit 3370a89
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions drivers/net/wireless/atmel.c
Original file line number Diff line number Diff line change
Expand Up @@ -1161,7 +1161,7 @@ static irqreturn_t service_interrupt(int irq, void *dev_id)
struct atmel_private *priv = netdev_priv(dev);
u8 isr;
int i = -1;
static u8 irq_order[] = {
static const u8 irq_order[] = {
ISR_OUT_OF_RANGE,
ISR_RxCOMPLETE,
ISR_TxCOMPLETE,
Expand Down Expand Up @@ -3771,7 +3771,9 @@ static int probe_atmel_card(struct net_device *dev)

if (rc) {
if (dev->dev_addr[0] == 0xFF) {
u8 default_mac[] = {0x00, 0x04, 0x25, 0x00, 0x00, 0x00};
static const u8 default_mac[] = {
0x00, 0x04, 0x25, 0x00, 0x00, 0x00
};
printk(KERN_ALERT "%s: *** Invalid MAC address. UPGRADE Firmware ****\n", dev->name);
memcpy(dev->dev_addr, default_mac, 6);
}
Expand Down

0 comments on commit 3370a89

Please sign in to comment.