Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

authored by

David Howells and committed by
David S. Miller
cba5cbd1 6a8341b6

+13 -9
+13 -9
net/atm/mpc.c
··· 62 62 static void set_mpc_ctrl_addr_rcvd(struct k_message *mesg, struct mpoa_client *mpc); 63 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, 66 - uint8_t *tlvs, uint8_t mps_macs, uint8_t device_type); 65 + static const uint8_t *copy_macs(struct mpoa_client *mpc, 66 + const uint8_t *router_mac, 67 + const uint8_t *tlvs, uint8_t mps_macs, 68 + uint8_t device_type); 67 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 72 static void mpoad_close(struct atm_vcc *vcc); 71 73 static int msg_from_mpoad(struct atm_vcc *vcc, struct sk_buff *skb); 72 74 ··· 353 351 * lec sees a TLV it uses the pointer to call this function. 354 352 * 355 353 */ 356 - static void lane2_assoc_ind(struct net_device *dev, uint8_t *mac_addr, 357 - uint8_t *tlvs, uint32_t sizeoftlvs) 354 + static void lane2_assoc_ind(struct net_device *dev, const u8 *mac_addr, 355 + const u8 *tlvs, u32 sizeoftlvs) 358 356 { 359 357 uint32_t type; 360 358 uint8_t length, mpoa_device_type, number_of_mps_macs; 361 - uint8_t *end_of_tlvs; 359 + const uint8_t *end_of_tlvs; 362 360 struct mpoa_client *mpc; 363 361 364 362 mpoa_device_type = number_of_mps_macs = 0; /* silence gcc */ ··· 432 430 * plus the possible MAC address(es) to mpc->mps_macs. 433 431 * For a freshly allocated MPOA client mpc->mps_macs == 0. 434 432 */ 435 - static uint8_t *copy_macs(struct mpoa_client *mpc, uint8_t *router_mac, 436 - uint8_t *tlvs, uint8_t mps_macs, uint8_t device_type) 433 + static const uint8_t *copy_macs(struct mpoa_client *mpc, 434 + const uint8_t *router_mac, 435 + const uint8_t *tlvs, uint8_t mps_macs, 436 + uint8_t device_type) 437 437 { 438 438 int num_macs; 439 439 num_macs = (mps_macs > 1) ? mps_macs : 1; ··· 815 811 return arg; 816 812 } 817 813 818 - static void send_set_mps_ctrl_addr(char *addr, struct mpoa_client *mpc) 814 + static void send_set_mps_ctrl_addr(const char *addr, struct mpoa_client *mpc) 819 815 { 820 816 struct k_message mesg; 821 817