* [PATCH net-next] net: remove needless (now buggy) & from dev->dev_addr
@ 2009-05-12 9:37 Jiri Pirko
2009-05-13 1:20 ` Wei Yongjun
2009-05-13 6:37 ` [PATCH net-next] net: remove needless (now buggy) & from dev->dev_addr Stephen Rothwell
0 siblings, 2 replies; 8+ messages in thread
From: Jiri Pirko @ 2009-05-12 9:37 UTC (permalink / raw)
To: netdev; +Cc: davem, sfr, sachinp, yjwei
Patch fixes issues with dev->dev_addr changing from array to pointer.
Hopefully there are no others.
Compile tested only.
Signed-off-by: Jiri Pirko <jpirko@redhat.com>
diff --git a/drivers/net/bonding/bond_3ad.c b/drivers/net/bonding/bond_3ad.c
index 8c2e5ab..06009dc 100644
--- a/drivers/net/bonding/bond_3ad.c
+++ b/drivers/net/bonding/bond_3ad.c
@@ -1845,9 +1845,10 @@ static u16 aggregator_identifier;
* Can be called only after the mac address of the bond is set.
*/
void bond_3ad_initialize(struct bonding *bond, u16 tick_resolution, int lacp_fast)
-{
+{
// check that the bond is not initialized yet
- if (MAC_ADDRESS_COMPARE(&(BOND_AD_INFO(bond).system.sys_mac_addr), &(bond->dev->dev_addr))) {
+ if (MAC_ADDRESS_COMPARE(&(BOND_AD_INFO(bond).system.sys_mac_addr),
+ bond->dev->dev_addr)) {
aggregator_identifier = 0;
diff --git a/drivers/net/ibmveth.c b/drivers/net/ibmveth.c
index 7902e5e..53af71a 100644
--- a/drivers/net/ibmveth.c
+++ b/drivers/net/ibmveth.c
@@ -1374,8 +1374,8 @@ static void ibmveth_proc_unregister_driver(void)
static int ibmveth_show(struct seq_file *seq, void *v)
{
struct ibmveth_adapter *adapter = seq->private;
- char *current_mac = ((char*) &adapter->netdev->dev_addr);
- char *firmware_mac = ((char*) &adapter->mac_addr) ;
+ char *current_mac = (char *) adapter->netdev->dev_addr;
+ char *firmware_mac = (char *) &adapter->mac_addr;
seq_printf(seq, "%s %s\n\n", ibmveth_driver_string, ibmveth_driver_version);
diff --git a/drivers/net/wireless/hostap/hostap_hw.c b/drivers/net/wireless/hostap/hostap_hw.c
index 3dad1cf..ff9b5c8 100644
--- a/drivers/net/wireless/hostap/hostap_hw.c
+++ b/drivers/net/wireless/hostap/hostap_hw.c
@@ -1423,7 +1423,7 @@ static int prism2_hw_init2(struct net_device *dev, int initial)
prism2_check_sta_fw_version(local);
if (hfa384x_get_rid(dev, HFA384X_RID_CNFOWNMACADDR,
- &dev->dev_addr, 6, 1) < 0) {
+ dev->dev_addr, 6, 1) < 0) {
printk("%s: could not get own MAC address\n",
dev->name);
}
diff --git a/drivers/net/wireless/ray_cs.c b/drivers/net/wireless/ray_cs.c
index fa90d1d..22e7185 100644
--- a/drivers/net/wireless/ray_cs.c
+++ b/drivers/net/wireless/ray_cs.c
@@ -892,7 +892,7 @@ static int ray_dev_init(struct net_device *dev)
#endif /* RAY_IMMEDIATE_INIT */
/* copy mac and broadcast addresses to linux device */
- memcpy(&dev->dev_addr, &local->sparm.b4.a_mac_addr, ADDRLEN);
+ memcpy(dev->dev_addr, &local->sparm.b4.a_mac_addr, ADDRLEN);
memset(dev->broadcast, 0xff, ETH_ALEN);
DEBUG(2, "ray_dev_init ending\n");
diff --git a/net/ipv6/ip6_tunnel.c b/net/ipv6/ip6_tunnel.c
index d994c55..af256d4 100644
--- a/net/ipv6/ip6_tunnel.c
+++ b/net/ipv6/ip6_tunnel.c
@@ -1100,8 +1100,8 @@ static void ip6_tnl_link_config(struct ip6_tnl *t)
struct ip6_tnl_parm *p = &t->parms;
struct flowi *fl = &t->fl;
- memcpy(&dev->dev_addr, &p->laddr, sizeof(struct in6_addr));
- memcpy(&dev->broadcast, &p->raddr, sizeof(struct in6_addr));
+ memcpy(dev->dev_addr, &p->laddr, sizeof(struct in6_addr));
+ memcpy(dev->broadcast, &p->raddr, sizeof(struct in6_addr));
/* Set up flowi template */
ipv6_addr_copy(&fl->fl6_src, &p->laddr);
diff --git a/net/tipc/eth_media.c b/net/tipc/eth_media.c
index f72ba77..524ba56 100644
--- a/net/tipc/eth_media.c
+++ b/net/tipc/eth_media.c
@@ -167,7 +167,7 @@ static int enable_bearer(struct tipc_bearer *tb_ptr)
tb_ptr->mtu = dev->mtu;
tb_ptr->blocked = 0;
tb_ptr->addr.type = htonl(TIPC_MEDIA_TYPE_ETH);
- memcpy(&tb_ptr->addr.dev_addr, &dev->dev_addr, ETH_ALEN);
+ memcpy(&tb_ptr->addr.dev_addr, dev->dev_addr, ETH_ALEN);
return 0;
}
^ permalink raw reply related [flat|nested] 8+ messages in thread
* Re: [PATCH net-next] net: remove needless (now buggy) & from dev->dev_addr
2009-05-12 9:37 [PATCH net-next] net: remove needless (now buggy) & from dev->dev_addr Jiri Pirko
@ 2009-05-13 1:20 ` Wei Yongjun
2009-05-13 8:40 ` [PATCH net-next] net: remove needless (now buggy) & from dev->dev_addr (part2) Jiri Pirko
2009-05-13 6:37 ` [PATCH net-next] net: remove needless (now buggy) & from dev->dev_addr Stephen Rothwell
1 sibling, 1 reply; 8+ messages in thread
From: Wei Yongjun @ 2009-05-13 1:20 UTC (permalink / raw)
To: Jiri Pirko; +Cc: netdev, davem, sfr, sachinp
Jiri Pirko wrote:
> Patch fixes issues with dev->dev_addr changing from array to pointer.
> Hopefully there are no others.
>
> Compile tested only.
>
> Signed-off-by: Jiri Pirko <jpirko@redhat.com>
>
> diff --git a/drivers/net/bonding/bond_3ad.c b/drivers/net/bonding/bond_3ad.c
> index 8c2e5ab..06009dc 100644
> --- a/drivers/net/bonding/bond_3ad.c
> +++ b/drivers/net/bonding/bond_3ad.c
> @@ -1845,9 +1845,10 @@ static u16 aggregator_identifier;
> * Can be called only after the mac address of the bond is set.
> */
> void bond_3ad_initialize(struct bonding *bond, u16 tick_resolution, int lacp_fast)
> -{
> +{
> // check that the bond is not initialized yet
> - if (MAC_ADDRESS_COMPARE(&(BOND_AD_INFO(bond).system.sys_mac_addr), &(bond->dev->dev_addr))) {
> + if (MAC_ADDRESS_COMPARE(&(BOND_AD_INFO(bond).system.sys_mac_addr),
> + bond->dev->dev_addr)) {
>
> aggregator_identifier = 0;
>
> diff --git a/drivers/net/ibmveth.c b/drivers/net/ibmveth.c
> index 7902e5e..53af71a 100644
> --- a/drivers/net/ibmveth.c
> +++ b/drivers/net/ibmveth.c
> @@ -1374,8 +1374,8 @@ static void ibmveth_proc_unregister_driver(void)
> static int ibmveth_show(struct seq_file *seq, void *v)
> {
> struct ibmveth_adapter *adapter = seq->private;
> - char *current_mac = ((char*) &adapter->netdev->dev_addr);
> - char *firmware_mac = ((char*) &adapter->mac_addr) ;
> + char *current_mac = (char *) adapter->netdev->dev_addr;
> + char *firmware_mac = (char *) &adapter->mac_addr;
>
> seq_printf(seq, "%s %s\n\n", ibmveth_driver_string, ibmveth_driver_version);
>
> diff --git a/drivers/net/wireless/hostap/hostap_hw.c b/drivers/net/wireless/hostap/hostap_hw.c
> index 3dad1cf..ff9b5c8 100644
> --- a/drivers/net/wireless/hostap/hostap_hw.c
> +++ b/drivers/net/wireless/hostap/hostap_hw.c
> @@ -1423,7 +1423,7 @@ static int prism2_hw_init2(struct net_device *dev, int initial)
> prism2_check_sta_fw_version(local);
>
> if (hfa384x_get_rid(dev, HFA384X_RID_CNFOWNMACADDR,
> - &dev->dev_addr, 6, 1) < 0) {
> + dev->dev_addr, 6, 1) < 0) {
> printk("%s: could not get own MAC address\n",
> dev->name);
> }
> diff --git a/drivers/net/wireless/ray_cs.c b/drivers/net/wireless/ray_cs.c
> index fa90d1d..22e7185 100644
> --- a/drivers/net/wireless/ray_cs.c
> +++ b/drivers/net/wireless/ray_cs.c
> @@ -892,7 +892,7 @@ static int ray_dev_init(struct net_device *dev)
> #endif /* RAY_IMMEDIATE_INIT */
>
> /* copy mac and broadcast addresses to linux device */
> - memcpy(&dev->dev_addr, &local->sparm.b4.a_mac_addr, ADDRLEN);
> + memcpy(dev->dev_addr, &local->sparm.b4.a_mac_addr, ADDRLEN);
> memset(dev->broadcast, 0xff, ETH_ALEN);
>
> DEBUG(2, "ray_dev_init ending\n");
> diff --git a/net/ipv6/ip6_tunnel.c b/net/ipv6/ip6_tunnel.c
> index d994c55..af256d4 100644
> --- a/net/ipv6/ip6_tunnel.c
> +++ b/net/ipv6/ip6_tunnel.c
> @@ -1100,8 +1100,8 @@ static void ip6_tnl_link_config(struct ip6_tnl *t)
> struct ip6_tnl_parm *p = &t->parms;
> struct flowi *fl = &t->fl;
>
> - memcpy(&dev->dev_addr, &p->laddr, sizeof(struct in6_addr));
> - memcpy(&dev->broadcast, &p->raddr, sizeof(struct in6_addr));
> + memcpy(dev->dev_addr, &p->laddr, sizeof(struct in6_addr));
> + memcpy(dev->broadcast, &p->raddr, sizeof(struct in6_addr));
>
> /* Set up flowi template */
> ipv6_addr_copy(&fl->fl6_src, &p->laddr);
> diff --git a/net/tipc/eth_media.c b/net/tipc/eth_media.c
> index f72ba77..524ba56 100644
> --- a/net/tipc/eth_media.c
> +++ b/net/tipc/eth_media.c
> @@ -167,7 +167,7 @@ static int enable_bearer(struct tipc_bearer *tb_ptr)
> tb_ptr->mtu = dev->mtu;
> tb_ptr->blocked = 0;
> tb_ptr->addr.type = htonl(TIPC_MEDIA_TYPE_ETH);
> - memcpy(&tb_ptr->addr.dev_addr, &dev->dev_addr, ETH_ALEN);
> + memcpy(&tb_ptr->addr.dev_addr, dev->dev_addr, ETH_ALEN);
> return 0;
> }
>
missing this one:
diff -u -p a/llc/af_llc.c b/llc/af_llc.c
--- a/llc/af_llc.c 2009-03-28 04:06:16.000000000 +0800
+++ b/llc/af_llc.c 2009-05-12 16:36:26.000000000 +0800
@@ -935,7 +935,7 @@ static int llc_ui_getname(struct socket
if (llc->dev) {
sllc.sllc_arphrd = llc->dev->type;
- memcpy(&sllc.sllc_mac, &llc->dev->dev_addr,
+ memcpy(&sllc.sllc_mac, llc->dev->dev_addr,
IFHWADDRLEN);
}
}
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH net-next] net: remove needless (now buggy) & from dev->dev_addr
2009-05-12 9:37 [PATCH net-next] net: remove needless (now buggy) & from dev->dev_addr Jiri Pirko
2009-05-13 1:20 ` Wei Yongjun
@ 2009-05-13 6:37 ` Stephen Rothwell
1 sibling, 0 replies; 8+ messages in thread
From: Stephen Rothwell @ 2009-05-13 6:37 UTC (permalink / raw)
To: Jiri Pirko; +Cc: netdev, davem, sachinp, yjwei
[-- Attachment #1: Type: text/plain, Size: 402 bytes --]
Hi Jiri,
On Tue, 12 May 2009 11:37:15 +0200 Jiri Pirko <jpirko@redhat.com> wrote:
>
> Patch fixes issues with dev->dev_addr changing from array to pointer.
> Hopefully there are no others.
Since Dave is away, I have applied this to linux-next until Dave decides
what to do with it.
--
Cheers,
Stephen Rothwell sfr@canb.auug.org.au
http://www.canb.auug.org.au/~sfr/
[-- Attachment #2: Type: application/pgp-signature, Size: 197 bytes --]
^ permalink raw reply [flat|nested] 8+ messages in thread
* [PATCH net-next] net: remove needless (now buggy) & from dev->dev_addr (part2)
2009-05-13 1:20 ` Wei Yongjun
@ 2009-05-13 8:40 ` Jiri Pirko
2009-05-14 0:36 ` Stephen Rothwell
0 siblings, 1 reply; 8+ messages in thread
From: Jiri Pirko @ 2009-05-13 8:40 UTC (permalink / raw)
To: netdev; +Cc: davem, sfr, sachinp, Wei Yongjun
Missed part of "&" removal.
Signed-off-by: Jiri Pirko <jpirko@redhat.com>
diff --git a/net/llc/af_llc.c b/net/llc/af_llc.c
index febae70..9208cf5 100644
--- a/net/llc/af_llc.c
+++ b/net/llc/af_llc.c
@@ -935,7 +935,7 @@ static int llc_ui_getname(struct socket *sock, struct sockaddr *uaddr,
if (llc->dev) {
sllc.sllc_arphrd = llc->dev->type;
- memcpy(&sllc.sllc_mac, &llc->dev->dev_addr,
+ memcpy(&sllc.sllc_mac, llc->dev->dev_addr,
IFHWADDRLEN);
}
}
^ permalink raw reply related [flat|nested] 8+ messages in thread
* Re: [PATCH net-next] net: remove needless (now buggy) & from dev->dev_addr (part2)
2009-05-13 8:40 ` [PATCH net-next] net: remove needless (now buggy) & from dev->dev_addr (part2) Jiri Pirko
@ 2009-05-14 0:36 ` Stephen Rothwell
2009-05-17 21:00 ` David Miller
0 siblings, 1 reply; 8+ messages in thread
From: Stephen Rothwell @ 2009-05-14 0:36 UTC (permalink / raw)
To: Jiri Pirko; +Cc: netdev, davem, sachinp, Wei Yongjun
[-- Attachment #1: Type: text/plain, Size: 317 bytes --]
Hi Jiri,
On Wed, 13 May 2009 10:40:12 +0200 Jiri Pirko <jpirko@redhat.com> wrote:
>
> Missed part of "&" removal.
Also added to linux-next until Dave has time.
All three are now in my "fixes" tree.
--
Cheers,
Stephen Rothwell sfr@canb.auug.org.au
http://www.canb.auug.org.au/~sfr/
[-- Attachment #2: Type: application/pgp-signature, Size: 197 bytes --]
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH net-next] net: remove needless (now buggy) & from dev->dev_addr (part2)
2009-05-14 0:36 ` Stephen Rothwell
@ 2009-05-17 21:00 ` David Miller
2009-05-18 0:32 ` Stephen Rothwell
0 siblings, 1 reply; 8+ messages in thread
From: David Miller @ 2009-05-17 21:00 UTC (permalink / raw)
To: sfr; +Cc: jpirko, netdev, sachinp, yjwei
From: Stephen Rothwell <sfr@canb.auug.org.au>
Date: Thu, 14 May 2009 10:36:11 +1000
> Hi Jiri,
>
> On Wed, 13 May 2009 10:40:12 +0200 Jiri Pirko <jpirko@redhat.com> wrote:
>>
>> Missed part of "&" removal.
>
> Also added to linux-next until Dave has time.
>
> All three are now in my "fixes" tree.
I've put these fixes into net-next-2.6 and pushed them out to
kernel.org, so you shouldn't need to carry them in your
fixes tree any longer.
Thanks!
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH net-next] net: remove needless (now buggy) & from dev->dev_addr (part2)
2009-05-17 21:00 ` David Miller
@ 2009-05-18 0:32 ` Stephen Rothwell
2009-05-18 3:25 ` David Miller
0 siblings, 1 reply; 8+ messages in thread
From: Stephen Rothwell @ 2009-05-18 0:32 UTC (permalink / raw)
To: David Miller; +Cc: jpirko, netdev, sachinp, yjwei
[-- Attachment #1: Type: text/plain, Size: 545 bytes --]
Hi Dave,
On Sun, 17 May 2009 14:00:04 -0700 (PDT) David Miller <davem@davemloft.net> wrote:
>
> I've put these fixes into net-next-2.6 and pushed them out to
> kernel.org, so you shouldn't need to carry them in your
> fixes tree any longer.
Yep, thanks.
Though if you had put them into net-current and sent them to Linus (as
preemptive fixes) there would have been no bisection hole in Linus'
tree. Just a minor point.
--
Cheers,
Stephen Rothwell sfr@canb.auug.org.au
http://www.canb.auug.org.au/~sfr/
[-- Attachment #2: Type: application/pgp-signature, Size: 197 bytes --]
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH net-next] net: remove needless (now buggy) & from dev->dev_addr (part2)
2009-05-18 0:32 ` Stephen Rothwell
@ 2009-05-18 3:25 ` David Miller
0 siblings, 0 replies; 8+ messages in thread
From: David Miller @ 2009-05-18 3:25 UTC (permalink / raw)
To: sfr; +Cc: jpirko, netdev, sachinp, yjwei
From: Stephen Rothwell <sfr@canb.auug.org.au>
Date: Mon, 18 May 2009 10:32:51 +1000
> Though if you had put them into net-current and sent them to Linus (as
> preemptive fixes) there would have been no bisection hole in Linus'
> tree. Just a minor point.
Indeed, in retrospect that might have been a better approach.
I will keep that in mind for similar future situations, thanks.
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2009-05-18 3:25 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-05-12 9:37 [PATCH net-next] net: remove needless (now buggy) & from dev->dev_addr Jiri Pirko
2009-05-13 1:20 ` Wei Yongjun
2009-05-13 8:40 ` [PATCH net-next] net: remove needless (now buggy) & from dev->dev_addr (part2) Jiri Pirko
2009-05-14 0:36 ` Stephen Rothwell
2009-05-17 21:00 ` David Miller
2009-05-18 0:32 ` Stephen Rothwell
2009-05-18 3:25 ` David Miller
2009-05-13 6:37 ` [PATCH net-next] net: remove needless (now buggy) & from dev->dev_addr Stephen Rothwell
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.