diff options
author | David Howells <dhowells@redhat.com> | 2008-07-30 19:31:46 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2008-07-30 19:31:46 -0400 |
commit | cba5cbd1559f49bec76e54de6ed21b7df3742ada (patch) | |
tree | d2e6d53763f4822c5c8488ed0906f697263608b8 /net | |
parent | 6a8341b68b5269de71c32c6df91f4b0298da031d (diff) |
atm: fix const assignment/discard warnings in the ATM networking driver
Fix const assignment/discard warnings in the ATM networking driver.
The lane2_assoc_ind() function needed its arguments changing to match changes
in the lane2_ops struct (patch 61c33e012964ce358b42d2a1e9cd309af5dab02b
"atm: use const where reasonable").
Signed-off-by: David Howells <dhowells@redhat.com>
Acked-by: Chas Williams <chas@cmf.nrl.navy.mil>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net')
-rw-r--r-- | net/atm/mpc.c | 22 |
1 files changed, 13 insertions, 9 deletions
diff --git a/net/atm/mpc.c b/net/atm/mpc.c index 4fccaa1e07be..11b16d16661c 100644 --- a/net/atm/mpc.c +++ b/net/atm/mpc.c | |||
@@ -62,11 +62,13 @@ static void MPOA_cache_impos_rcvd(struct k_message *msg, struct mpoa_client *mpc | |||
62 | static void set_mpc_ctrl_addr_rcvd(struct k_message *mesg, struct mpoa_client *mpc); | 62 | static void set_mpc_ctrl_addr_rcvd(struct k_message *mesg, struct mpoa_client *mpc); |
63 | static void set_mps_mac_addr_rcvd(struct k_message *mesg, struct mpoa_client *mpc); | 63 | static void set_mps_mac_addr_rcvd(struct k_message *mesg, struct mpoa_client *mpc); |
64 | 64 | ||
65 | static uint8_t *copy_macs(struct mpoa_client *mpc, uint8_t *router_mac, | 65 | static const uint8_t *copy_macs(struct mpoa_client *mpc, |
66 | uint8_t *tlvs, uint8_t mps_macs, uint8_t device_type); | 66 | const uint8_t *router_mac, |
67 | const uint8_t *tlvs, uint8_t mps_macs, | ||
68 | uint8_t device_type); | ||
67 | static void purge_egress_shortcut(struct atm_vcc *vcc, eg_cache_entry *entry); | 69 | static void purge_egress_shortcut(struct atm_vcc *vcc, eg_cache_entry *entry); |
68 | 70 | ||
69 | static void send_set_mps_ctrl_addr(char *addr, struct mpoa_client *mpc); | 71 | static void send_set_mps_ctrl_addr(const char *addr, struct mpoa_client *mpc); |
70 | static void mpoad_close(struct atm_vcc *vcc); | 72 | static void mpoad_close(struct atm_vcc *vcc); |
71 | static int msg_from_mpoad(struct atm_vcc *vcc, struct sk_buff *skb); | 73 | static int msg_from_mpoad(struct atm_vcc *vcc, struct sk_buff *skb); |
72 | 74 | ||
@@ -351,12 +353,12 @@ static const char *mpoa_device_type_string(char type) | |||
351 | * lec sees a TLV it uses the pointer to call this function. | 353 | * lec sees a TLV it uses the pointer to call this function. |
352 | * | 354 | * |
353 | */ | 355 | */ |
354 | static void lane2_assoc_ind(struct net_device *dev, uint8_t *mac_addr, | 356 | static void lane2_assoc_ind(struct net_device *dev, const u8 *mac_addr, |
355 | uint8_t *tlvs, uint32_t sizeoftlvs) | 357 | const u8 *tlvs, u32 sizeoftlvs) |
356 | { | 358 | { |
357 | uint32_t type; | 359 | uint32_t type; |
358 | uint8_t length, mpoa_device_type, number_of_mps_macs; | 360 | uint8_t length, mpoa_device_type, number_of_mps_macs; |
359 | uint8_t *end_of_tlvs; | 361 | const uint8_t *end_of_tlvs; |
360 | struct mpoa_client *mpc; | 362 | struct mpoa_client *mpc; |
361 | 363 | ||
362 | mpoa_device_type = number_of_mps_macs = 0; /* silence gcc */ | 364 | mpoa_device_type = number_of_mps_macs = 0; /* silence gcc */ |
@@ -430,8 +432,10 @@ static void lane2_assoc_ind(struct net_device *dev, uint8_t *mac_addr, | |||
430 | * plus the possible MAC address(es) to mpc->mps_macs. | 432 | * plus the possible MAC address(es) to mpc->mps_macs. |
431 | * For a freshly allocated MPOA client mpc->mps_macs == 0. | 433 | * For a freshly allocated MPOA client mpc->mps_macs == 0. |
432 | */ | 434 | */ |
433 | static uint8_t *copy_macs(struct mpoa_client *mpc, uint8_t *router_mac, | 435 | static const uint8_t *copy_macs(struct mpoa_client *mpc, |
434 | uint8_t *tlvs, uint8_t mps_macs, uint8_t device_type) | 436 | const uint8_t *router_mac, |
437 | const uint8_t *tlvs, uint8_t mps_macs, | ||
438 | uint8_t device_type) | ||
435 | { | 439 | { |
436 | int num_macs; | 440 | int num_macs; |
437 | num_macs = (mps_macs > 1) ? mps_macs : 1; | 441 | num_macs = (mps_macs > 1) ? mps_macs : 1; |
@@ -811,7 +815,7 @@ static int atm_mpoa_mpoad_attach (struct atm_vcc *vcc, int arg) | |||
811 | return arg; | 815 | return arg; |
812 | } | 816 | } |
813 | 817 | ||
814 | static void send_set_mps_ctrl_addr(char *addr, struct mpoa_client *mpc) | 818 | static void send_set_mps_ctrl_addr(const char *addr, struct mpoa_client *mpc) |
815 | { | 819 | { |
816 | struct k_message mesg; | 820 | struct k_message mesg; |
817 | 821 | ||