Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S965175Ab2B1Uwh (ORCPT ); Tue, 28 Feb 2012 15:52:37 -0500 Received: from shards.monkeyblade.net ([198.137.202.13]:49234 "EHLO shards.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755086Ab2B1Uwf (ORCPT ); Tue, 28 Feb 2012 15:52:35 -0500 Date: Tue, 28 Feb 2012 15:49:14 -0500 (EST) Message-Id: <20120228.154914.662485432055205683.davem@davemloft.net> To: geert@linux-m68k.org Cc: danny.kukawka@bisect.de, dkukawka@suse.de, jeffrey.t.kirsher@intel.com, jpirko@redhat.com, netdev@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH 03/11] cirrus/mac89x0: print MAC via printk format specifier From: David Miller In-Reply-To: References: <1330091162-8141-4-git-send-email-danny.kukawka@bisect.de> X-Mailer: Mew version 6.4 on Emacs 23.3 / Mule 6.0 (HANACHIRUSATO) Mime-Version: 1.0 Content-Type: Text/Plain; charset=iso-8859-7 X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.2.6 (shards.monkeyblade.net [198.137.202.13]); Tue, 28 Feb 2012 12:49:17 -0800 (PST) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Transfer-Encoding: 8bit X-MIME-Autoconverted: from base64 to 8bit by nfs id q1SKqhxG029811 Content-Length: 1962 Lines: 53 From: Geert Uytterhoeven 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 Signed-off-by: David S. Miller --- 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 ????{.n?+???????+%?????ݶ??w??{.n?+????{??G?????{ay?ʇڙ?,j??f???h?????????z_??(?階?ݢj"???m??????G????????????&???~???iO???z??v?^?m???? ????????I?