lists.openwall.net | lists / announce owl-users owl-dev john-users john-dev passwdqc-users yescrypt popa3d-users / oss-security kernel-hardening musl sabotage tlsify passwords / crypt-dev xvendor / Bugtraq Full-Disclosure linux-kernel linux-netdev linux-ext4 linux-hardening linux-cve-announce PHC | |
Open Source and information security mailing list archives
| ||
|
Date: Tue, 28 Feb 2012 15:49:14 -0500 (EST) From: David Miller <davem@...emloft.net> To: geert@...ux-m68k.org Cc: danny.kukawka@...ect.de, dkukawka@...e.de, jeffrey.t.kirsher@...el.com, jpirko@...hat.com, netdev@...r.kernel.org, linux-kernel@...r.kernel.org Subject: Re: [PATCH 03/11] cirrus/mac89x0: print MAC via printk format specifier From: Geert Uytterhoeven <geert@...ux-m68k.org> Date: Tue, 28 Feb 2012 21:45:30 +0100 > drivers/net/ethernet/cirrus/mac89x0.c: In function ‘set_mac_address’: > drivers/net/ethernet/cirrus/mac89x0.c:597: warning: dereferencing > ‘void *’ pointer > drivers/net/ethernet/cirrus/mac89x0.c:597: error: request for member > ‘sa_data’ in something not a structure or union > drivers/net/ethernet/cirrus/mac89x0.c:600: warning: dereferencing > ‘void *’ pointer > drivers/net/ethernet/cirrus/mac89x0.c:600: error: request for member > ‘sa_data’ in something not a structure or union > drivers/net/ethernet/cirrus/mac89x0.c:595: warning: unused variable ‘saddr’ Thanks, I've fixed this as follows and pushed to net-next: -------------------- mac89x0: Fix build error. Need to use the new 'saddr' variable not the void 'addr' in set_mac_address(). Reported-by: Geert Uytterhoeven <geert@...ux-m68k.org> Signed-off-by: David S. Miller <davem@...emloft.net> --- drivers/net/ethernet/cirrus/mac89x0.c | 6 +++--- 1 files changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/net/ethernet/cirrus/mac89x0.c b/drivers/net/ethernet/cirrus/mac89x0.c index 419825c..932fdcc 100644 --- a/drivers/net/ethernet/cirrus/mac89x0.c +++ b/drivers/net/ethernet/cirrus/mac89x0.c @@ -591,13 +591,13 @@ static void set_multicast_list(struct net_device *dev) static int set_mac_address(struct net_device *dev, void *addr) { - int i; struct sockaddr *saddr = addr; + int i; - if (!is_valid_ether_addr(addr->sa_data)) + if (!is_valid_ether_addr(saddr->sa_data)) return -EADDRNOTAVAIL; - memcpy(dev->dev_addr, addr->sa_data, ETH_ALEN); + memcpy(dev->dev_addr, saddr->sa_data, ETH_ALEN); printk("%s: Setting MAC address to %pM\n", dev->name, dev->dev_addr); /* set the Ethernet address */ -- 1.7.7.6
Powered by blists - more mailing lists