* [patch 05/11] atm: fix const assignment/discard warnings in the ATM networking driver
@ 2008-07-30 19:37 akpm
2008-07-30 23:32 ` David Miller
0 siblings, 1 reply; 2+ messages in thread
From: akpm @ 2008-07-30 19:37 UTC (permalink / raw)
To: davem; +Cc: netdev, akpm, dhowells, chas
From: David Howells <dhowells@redhat.com>
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).
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>
---
net/atm/mpc.c | 22 +++++++++++++---------
1 file changed, 13 insertions(+), 9 deletions(-)
diff -puN net/atm/mpc.c~atm-fix-const-assignment-discard-warnings-in-the-atm-networking-driver net/atm/mpc.c
--- a/net/atm/mpc.c~atm-fix-const-assignment-discard-warnings-in-the-atm-networking-driver
+++ a/net/atm/mpc.c
@@ -62,11 +62,13 @@ static void MPOA_cache_impos_rcvd(struct
static void set_mpc_ctrl_addr_rcvd(struct k_message *mesg, struct mpoa_client *mpc);
static void set_mps_mac_addr_rcvd(struct k_message *mesg, struct mpoa_client *mpc);
-static uint8_t *copy_macs(struct mpoa_client *mpc, uint8_t *router_mac,
- uint8_t *tlvs, uint8_t mps_macs, uint8_t device_type);
+static const uint8_t *copy_macs(struct mpoa_client *mpc,
+ const uint8_t *router_mac,
+ const uint8_t *tlvs, uint8_t mps_macs,
+ uint8_t device_type);
static void purge_egress_shortcut(struct atm_vcc *vcc, eg_cache_entry *entry);
-static void send_set_mps_ctrl_addr(char *addr, struct mpoa_client *mpc);
+static void send_set_mps_ctrl_addr(const char *addr, struct mpoa_client *mpc);
static void mpoad_close(struct atm_vcc *vcc);
static int msg_from_mpoad(struct atm_vcc *vcc, struct sk_buff *skb);
@@ -351,12 +353,12 @@ static const char *mpoa_device_type_stri
* lec sees a TLV it uses the pointer to call this function.
*
*/
-static void lane2_assoc_ind(struct net_device *dev, uint8_t *mac_addr,
- uint8_t *tlvs, uint32_t sizeoftlvs)
+static void lane2_assoc_ind(struct net_device *dev, const u8 *mac_addr,
+ const u8 *tlvs, u32 sizeoftlvs)
{
uint32_t type;
uint8_t length, mpoa_device_type, number_of_mps_macs;
- uint8_t *end_of_tlvs;
+ const uint8_t *end_of_tlvs;
struct mpoa_client *mpc;
mpoa_device_type = number_of_mps_macs = 0; /* silence gcc */
@@ -430,8 +432,10 @@ static void lane2_assoc_ind(struct net_d
* plus the possible MAC address(es) to mpc->mps_macs.
* For a freshly allocated MPOA client mpc->mps_macs == 0.
*/
-static uint8_t *copy_macs(struct mpoa_client *mpc, uint8_t *router_mac,
- uint8_t *tlvs, uint8_t mps_macs, uint8_t device_type)
+static const uint8_t *copy_macs(struct mpoa_client *mpc,
+ const uint8_t *router_mac,
+ const uint8_t *tlvs, uint8_t mps_macs,
+ uint8_t device_type)
{
int num_macs;
num_macs = (mps_macs > 1) ? mps_macs : 1;
@@ -811,7 +815,7 @@ static int atm_mpoa_mpoad_attach (struct
return arg;
}
-static void send_set_mps_ctrl_addr(char *addr, struct mpoa_client *mpc)
+static void send_set_mps_ctrl_addr(const char *addr, struct mpoa_client *mpc)
{
struct k_message mesg;
_
^ permalink raw reply [flat|nested] 2+ messages in thread* Re: [patch 05/11] atm: fix const assignment/discard warnings in the ATM networking driver
2008-07-30 19:37 [patch 05/11] atm: fix const assignment/discard warnings in the ATM networking driver akpm
@ 2008-07-30 23:32 ` David Miller
0 siblings, 0 replies; 2+ messages in thread
From: David Miller @ 2008-07-30 23:32 UTC (permalink / raw)
To: akpm; +Cc: netdev, dhowells, chas
From: akpm@linux-foundation.org
Date: Wed, 30 Jul 2008 12:37:37 -0700
> 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).
>
> 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>
Applied, but please provide commit header line text when referencing
SHA commit IDs in the future, as per the commit log I actually used
for this change below:
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>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2008-07-30 23:32 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-07-30 19:37 [patch 05/11] atm: fix const assignment/discard warnings in the ATM networking driver akpm
2008-07-30 23:32 ` David Miller
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).