diff options
author | Mitchell Blank Jr <mitch@sfgoth.com> | 2008-06-17 19:20:06 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2008-06-17 19:20:06 -0400 |
commit | 61c33e012964ce358b42d2a1e9cd309af5dab02b (patch) | |
tree | e76ac9b1e61a998def99f0f8f7fa4688fab26494 /net/atm/lec.c | |
parent | df3bc8bd8f8fd17e9b22859d82af38fa702e75b7 (diff) |
atm: use const where reasonable
From: Mitchell Blank Jr <mitch@sfgoth.com>
Signed-off-by: Chas Williams <chas@cmf.nrl.navy.mil>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/atm/lec.c')
-rw-r--r-- | net/atm/lec.c | 55 |
1 files changed, 27 insertions, 28 deletions
diff --git a/net/atm/lec.c b/net/atm/lec.c index 653aca3573ac..5799fb52365a 100644 --- a/net/atm/lec.c +++ b/net/atm/lec.c | |||
@@ -65,36 +65,36 @@ static int lec_close(struct net_device *dev); | |||
65 | static struct net_device_stats *lec_get_stats(struct net_device *dev); | 65 | static struct net_device_stats *lec_get_stats(struct net_device *dev); |
66 | static void lec_init(struct net_device *dev); | 66 | static void lec_init(struct net_device *dev); |
67 | static struct lec_arp_table *lec_arp_find(struct lec_priv *priv, | 67 | static struct lec_arp_table *lec_arp_find(struct lec_priv *priv, |
68 | unsigned char *mac_addr); | 68 | const unsigned char *mac_addr); |
69 | static int lec_arp_remove(struct lec_priv *priv, | 69 | static int lec_arp_remove(struct lec_priv *priv, |
70 | struct lec_arp_table *to_remove); | 70 | struct lec_arp_table *to_remove); |
71 | /* LANE2 functions */ | 71 | /* LANE2 functions */ |
72 | static void lane2_associate_ind(struct net_device *dev, u8 *mac_address, | 72 | static void lane2_associate_ind(struct net_device *dev, const u8 *mac_address, |
73 | u8 *tlvs, u32 sizeoftlvs); | 73 | const u8 *tlvs, u32 sizeoftlvs); |
74 | static int lane2_resolve(struct net_device *dev, u8 *dst_mac, int force, | 74 | static int lane2_resolve(struct net_device *dev, const u8 *dst_mac, int force, |
75 | u8 **tlvs, u32 *sizeoftlvs); | 75 | u8 **tlvs, u32 *sizeoftlvs); |
76 | static int lane2_associate_req(struct net_device *dev, u8 *lan_dst, | 76 | static int lane2_associate_req(struct net_device *dev, const u8 *lan_dst, |
77 | u8 *tlvs, u32 sizeoftlvs); | 77 | const u8 *tlvs, u32 sizeoftlvs); |
78 | 78 | ||
79 | static int lec_addr_delete(struct lec_priv *priv, unsigned char *atm_addr, | 79 | static int lec_addr_delete(struct lec_priv *priv, const unsigned char *atm_addr, |
80 | unsigned long permanent); | 80 | unsigned long permanent); |
81 | static void lec_arp_check_empties(struct lec_priv *priv, | 81 | static void lec_arp_check_empties(struct lec_priv *priv, |
82 | struct atm_vcc *vcc, struct sk_buff *skb); | 82 | struct atm_vcc *vcc, struct sk_buff *skb); |
83 | static void lec_arp_destroy(struct lec_priv *priv); | 83 | static void lec_arp_destroy(struct lec_priv *priv); |
84 | static void lec_arp_init(struct lec_priv *priv); | 84 | static void lec_arp_init(struct lec_priv *priv); |
85 | static struct atm_vcc *lec_arp_resolve(struct lec_priv *priv, | 85 | static struct atm_vcc *lec_arp_resolve(struct lec_priv *priv, |
86 | unsigned char *mac_to_find, | 86 | const unsigned char *mac_to_find, |
87 | int is_rdesc, | 87 | int is_rdesc, |
88 | struct lec_arp_table **ret_entry); | 88 | struct lec_arp_table **ret_entry); |
89 | static void lec_arp_update(struct lec_priv *priv, unsigned char *mac_addr, | 89 | static void lec_arp_update(struct lec_priv *priv, const unsigned char *mac_addr, |
90 | unsigned char *atm_addr, unsigned long remoteflag, | 90 | const unsigned char *atm_addr, unsigned long remoteflag, |
91 | unsigned int targetless_le_arp); | 91 | unsigned int targetless_le_arp); |
92 | static void lec_flush_complete(struct lec_priv *priv, unsigned long tran_id); | 92 | static void lec_flush_complete(struct lec_priv *priv, unsigned long tran_id); |
93 | static int lec_mcast_make(struct lec_priv *priv, struct atm_vcc *vcc); | 93 | static int lec_mcast_make(struct lec_priv *priv, struct atm_vcc *vcc); |
94 | static void lec_set_flush_tran_id(struct lec_priv *priv, | 94 | static void lec_set_flush_tran_id(struct lec_priv *priv, |
95 | unsigned char *atm_addr, | 95 | const unsigned char *atm_addr, |
96 | unsigned long tran_id); | 96 | unsigned long tran_id); |
97 | static void lec_vcc_added(struct lec_priv *priv, struct atmlec_ioc *ioc_data, | 97 | static void lec_vcc_added(struct lec_priv *priv, const struct atmlec_ioc *ioc_data, |
98 | struct atm_vcc *vcc, | 98 | struct atm_vcc *vcc, |
99 | void (*old_push) (struct atm_vcc *vcc, | 99 | void (*old_push) (struct atm_vcc *vcc, |
100 | struct sk_buff *skb)); | 100 | struct sk_buff *skb)); |
@@ -634,7 +634,7 @@ static struct atm_dev lecatm_dev = { | |||
634 | */ | 634 | */ |
635 | static int | 635 | static int |
636 | send_to_lecd(struct lec_priv *priv, atmlec_msg_type type, | 636 | send_to_lecd(struct lec_priv *priv, atmlec_msg_type type, |
637 | unsigned char *mac_addr, unsigned char *atm_addr, | 637 | const unsigned char *mac_addr, const unsigned char *atm_addr, |
638 | struct sk_buff *data) | 638 | struct sk_buff *data) |
639 | { | 639 | { |
640 | struct sock *sk; | 640 | struct sock *sk; |
@@ -705,10 +705,9 @@ static void lec_init(struct net_device *dev) | |||
705 | dev->set_multicast_list = lec_set_multicast_list; | 705 | dev->set_multicast_list = lec_set_multicast_list; |
706 | dev->do_ioctl = NULL; | 706 | dev->do_ioctl = NULL; |
707 | printk("%s: Initialized!\n", dev->name); | 707 | printk("%s: Initialized!\n", dev->name); |
708 | return; | ||
709 | } | 708 | } |
710 | 709 | ||
711 | static unsigned char lec_ctrl_magic[] = { | 710 | static const unsigned char lec_ctrl_magic[] = { |
712 | 0xff, | 711 | 0xff, |
713 | 0x00, | 712 | 0x00, |
714 | 0x01, | 713 | 0x01, |
@@ -1276,7 +1275,7 @@ module_exit(lane_module_cleanup); | |||
1276 | * lec will be used. | 1275 | * lec will be used. |
1277 | * If dst_mac == NULL, targetless LE_ARP will be sent | 1276 | * If dst_mac == NULL, targetless LE_ARP will be sent |
1278 | */ | 1277 | */ |
1279 | static int lane2_resolve(struct net_device *dev, u8 *dst_mac, int force, | 1278 | static int lane2_resolve(struct net_device *dev, const u8 *dst_mac, int force, |
1280 | u8 **tlvs, u32 *sizeoftlvs) | 1279 | u8 **tlvs, u32 *sizeoftlvs) |
1281 | { | 1280 | { |
1282 | unsigned long flags; | 1281 | unsigned long flags; |
@@ -1322,8 +1321,8 @@ static int lane2_resolve(struct net_device *dev, u8 *dst_mac, int force, | |||
1322 | * Returns 1 for success, 0 for failure (out of memory) | 1321 | * Returns 1 for success, 0 for failure (out of memory) |
1323 | * | 1322 | * |
1324 | */ | 1323 | */ |
1325 | static int lane2_associate_req(struct net_device *dev, u8 *lan_dst, | 1324 | static int lane2_associate_req(struct net_device *dev, const u8 *lan_dst, |
1326 | u8 *tlvs, u32 sizeoftlvs) | 1325 | const u8 *tlvs, u32 sizeoftlvs) |
1327 | { | 1326 | { |
1328 | int retval; | 1327 | int retval; |
1329 | struct sk_buff *skb; | 1328 | struct sk_buff *skb; |
@@ -1358,8 +1357,8 @@ static int lane2_associate_req(struct net_device *dev, u8 *lan_dst, | |||
1358 | * LANE2: 3.1.5, LE_ASSOCIATE.indication | 1357 | * LANE2: 3.1.5, LE_ASSOCIATE.indication |
1359 | * | 1358 | * |
1360 | */ | 1359 | */ |
1361 | static void lane2_associate_ind(struct net_device *dev, u8 *mac_addr, | 1360 | static void lane2_associate_ind(struct net_device *dev, const u8 *mac_addr, |
1362 | u8 *tlvs, u32 sizeoftlvs) | 1361 | const u8 *tlvs, u32 sizeoftlvs) |
1363 | { | 1362 | { |
1364 | #if 0 | 1363 | #if 0 |
1365 | int i = 0; | 1364 | int i = 0; |
@@ -1744,7 +1743,7 @@ static void lec_arp_destroy(struct lec_priv *priv) | |||
1744 | * Find entry by mac_address | 1743 | * Find entry by mac_address |
1745 | */ | 1744 | */ |
1746 | static struct lec_arp_table *lec_arp_find(struct lec_priv *priv, | 1745 | static struct lec_arp_table *lec_arp_find(struct lec_priv *priv, |
1747 | unsigned char *mac_addr) | 1746 | const unsigned char *mac_addr) |
1748 | { | 1747 | { |
1749 | struct hlist_node *node; | 1748 | struct hlist_node *node; |
1750 | struct hlist_head *head; | 1749 | struct hlist_head *head; |
@@ -1764,7 +1763,7 @@ static struct lec_arp_table *lec_arp_find(struct lec_priv *priv, | |||
1764 | } | 1763 | } |
1765 | 1764 | ||
1766 | static struct lec_arp_table *make_entry(struct lec_priv *priv, | 1765 | static struct lec_arp_table *make_entry(struct lec_priv *priv, |
1767 | unsigned char *mac_addr) | 1766 | const unsigned char *mac_addr) |
1768 | { | 1767 | { |
1769 | struct lec_arp_table *to_return; | 1768 | struct lec_arp_table *to_return; |
1770 | 1769 | ||
@@ -1921,7 +1920,7 @@ restart: | |||
1921 | * | 1920 | * |
1922 | */ | 1921 | */ |
1923 | static struct atm_vcc *lec_arp_resolve(struct lec_priv *priv, | 1922 | static struct atm_vcc *lec_arp_resolve(struct lec_priv *priv, |
1924 | unsigned char *mac_to_find, int is_rdesc, | 1923 | const unsigned char *mac_to_find, int is_rdesc, |
1925 | struct lec_arp_table **ret_entry) | 1924 | struct lec_arp_table **ret_entry) |
1926 | { | 1925 | { |
1927 | unsigned long flags; | 1926 | unsigned long flags; |
@@ -2017,7 +2016,7 @@ out: | |||
2017 | } | 2016 | } |
2018 | 2017 | ||
2019 | static int | 2018 | static int |
2020 | lec_addr_delete(struct lec_priv *priv, unsigned char *atm_addr, | 2019 | lec_addr_delete(struct lec_priv *priv, const unsigned char *atm_addr, |
2021 | unsigned long permanent) | 2020 | unsigned long permanent) |
2022 | { | 2021 | { |
2023 | unsigned long flags; | 2022 | unsigned long flags; |
@@ -2047,8 +2046,8 @@ lec_addr_delete(struct lec_priv *priv, unsigned char *atm_addr, | |||
2047 | * Notifies: Response to arp_request (atm_addr != NULL) | 2046 | * Notifies: Response to arp_request (atm_addr != NULL) |
2048 | */ | 2047 | */ |
2049 | static void | 2048 | static void |
2050 | lec_arp_update(struct lec_priv *priv, unsigned char *mac_addr, | 2049 | lec_arp_update(struct lec_priv *priv, const unsigned char *mac_addr, |
2051 | unsigned char *atm_addr, unsigned long remoteflag, | 2050 | const unsigned char *atm_addr, unsigned long remoteflag, |
2052 | unsigned int targetless_le_arp) | 2051 | unsigned int targetless_le_arp) |
2053 | { | 2052 | { |
2054 | unsigned long flags; | 2053 | unsigned long flags; |
@@ -2148,7 +2147,7 @@ out: | |||
2148 | * Notifies: Vcc setup ready | 2147 | * Notifies: Vcc setup ready |
2149 | */ | 2148 | */ |
2150 | static void | 2149 | static void |
2151 | lec_vcc_added(struct lec_priv *priv, struct atmlec_ioc *ioc_data, | 2150 | lec_vcc_added(struct lec_priv *priv, const struct atmlec_ioc *ioc_data, |
2152 | struct atm_vcc *vcc, | 2151 | struct atm_vcc *vcc, |
2153 | void (*old_push) (struct atm_vcc *vcc, struct sk_buff *skb)) | 2152 | void (*old_push) (struct atm_vcc *vcc, struct sk_buff *skb)) |
2154 | { | 2153 | { |
@@ -2336,7 +2335,7 @@ restart: | |||
2336 | 2335 | ||
2337 | static void | 2336 | static void |
2338 | lec_set_flush_tran_id(struct lec_priv *priv, | 2337 | lec_set_flush_tran_id(struct lec_priv *priv, |
2339 | unsigned char *atm_addr, unsigned long tran_id) | 2338 | const unsigned char *atm_addr, unsigned long tran_id) |
2340 | { | 2339 | { |
2341 | unsigned long flags; | 2340 | unsigned long flags; |
2342 | struct hlist_node *node; | 2341 | struct hlist_node *node; |