diff options
author | Joe Perches <joe@perches.com> | 2010-12-21 05:16:08 -0500 |
---|---|---|
committer | Joe Perches <joe@perches.com> | 2010-12-21 05:16:08 -0500 |
commit | b6bc765067ece933cc3dc7f5e95665a89100b1d5 (patch) | |
tree | bbf55c2d80e839eb4c0ab23bcbdd656d14b3f5fe /drivers/net/gianfar.c | |
parent | 895950c2a6565d9eefda4a38b00fa28537e39fcb (diff) |
drivers/net/*.c: Use static const
Using static const generally increases object text and decreases data size.
It also generally decreases overall object size.
Signed-off-by: Joe Perches <joe@perches.com>
Diffstat (limited to 'drivers/net/gianfar.c')
-rw-r--r-- | drivers/net/gianfar.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/drivers/net/gianfar.c b/drivers/net/gianfar.c index d1bec6269173..45c4b7bfcf39 100644 --- a/drivers/net/gianfar.c +++ b/drivers/net/gianfar.c | |||
@@ -143,7 +143,8 @@ void gfar_halt(struct net_device *dev); | |||
143 | static void gfar_halt_nodisable(struct net_device *dev); | 143 | static void gfar_halt_nodisable(struct net_device *dev); |
144 | void gfar_start(struct net_device *dev); | 144 | void gfar_start(struct net_device *dev); |
145 | static void gfar_clear_exact_match(struct net_device *dev); | 145 | static void gfar_clear_exact_match(struct net_device *dev); |
146 | static void gfar_set_mac_for_addr(struct net_device *dev, int num, u8 *addr); | 146 | static void gfar_set_mac_for_addr(struct net_device *dev, int num, |
147 | const u8 *addr); | ||
147 | static int gfar_ioctl(struct net_device *dev, struct ifreq *rq, int cmd); | 148 | static int gfar_ioctl(struct net_device *dev, struct ifreq *rq, int cmd); |
148 | 149 | ||
149 | MODULE_AUTHOR("Freescale Semiconductor, Inc"); | 150 | MODULE_AUTHOR("Freescale Semiconductor, Inc"); |
@@ -3094,10 +3095,10 @@ static void gfar_set_multi(struct net_device *dev) | |||
3094 | static void gfar_clear_exact_match(struct net_device *dev) | 3095 | static void gfar_clear_exact_match(struct net_device *dev) |
3095 | { | 3096 | { |
3096 | int idx; | 3097 | int idx; |
3097 | u8 zero_arr[MAC_ADDR_LEN] = {0,0,0,0,0,0}; | 3098 | static const u8 zero_arr[MAC_ADDR_LEN] = {0, 0, 0, 0, 0, 0}; |
3098 | 3099 | ||
3099 | for(idx = 1;idx < GFAR_EM_NUM + 1;idx++) | 3100 | for(idx = 1;idx < GFAR_EM_NUM + 1;idx++) |
3100 | gfar_set_mac_for_addr(dev, idx, (u8 *)zero_arr); | 3101 | gfar_set_mac_for_addr(dev, idx, zero_arr); |
3101 | } | 3102 | } |
3102 | 3103 | ||
3103 | /* Set the appropriate hash bit for the given addr */ | 3104 | /* Set the appropriate hash bit for the given addr */ |
@@ -3132,7 +3133,8 @@ static void gfar_set_hash_for_addr(struct net_device *dev, u8 *addr) | |||
3132 | /* There are multiple MAC Address register pairs on some controllers | 3133 | /* There are multiple MAC Address register pairs on some controllers |
3133 | * This function sets the numth pair to a given address | 3134 | * This function sets the numth pair to a given address |
3134 | */ | 3135 | */ |
3135 | static void gfar_set_mac_for_addr(struct net_device *dev, int num, u8 *addr) | 3136 | static void gfar_set_mac_for_addr(struct net_device *dev, int num, |
3137 | const u8 *addr) | ||
3136 | { | 3138 | { |
3137 | struct gfar_private *priv = netdev_priv(dev); | 3139 | struct gfar_private *priv = netdev_priv(dev); |
3138 | struct gfar __iomem *regs = priv->gfargrp[0].regs; | 3140 | struct gfar __iomem *regs = priv->gfargrp[0].regs; |