From patchwork Fri Sep 21 10:02:02 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Paul Bolle X-Patchwork-Id: 1490901 Return-Path: X-Original-To: patchwork-linux-wireless@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork1.kernel.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by patchwork1.kernel.org (Postfix) with ESMTP id 1EE513FE65 for ; Fri, 21 Sep 2012 10:02:23 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932886Ab2IUKCF (ORCPT ); Fri, 21 Sep 2012 06:02:05 -0400 Received: from cpsmtpb-ews05.kpnxchange.com ([213.75.39.8]:1986 "EHLO cpsmtpb-ews05.kpnxchange.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932742Ab2IUKCE (ORCPT ); Fri, 21 Sep 2012 06:02:04 -0400 Received: from cpsps-ews06.kpnxchange.com ([10.94.84.173]) by cpsmtpb-ews05.kpnxchange.com with Microsoft SMTPSVC(6.0.3790.4675); Fri, 21 Sep 2012 12:02:03 +0200 Received: from CPSMTPM-TLF104.kpnxchange.com ([195.121.3.7]) by cpsps-ews06.kpnxchange.com with Microsoft SMTPSVC(7.5.7601.17514); Fri, 21 Sep 2012 12:02:02 +0200 Received: from [192.168.1.100] ([212.123.169.34]) by CPSMTPM-TLF104.kpnxchange.com with Microsoft SMTPSVC(7.5.7601.17514); Fri, 21 Sep 2012 12:02:02 +0200 Message-ID: <1348221722.1581.12.camel@x61.thuisdomein> Subject: [PATCH] ipw2x00: silence GCC warning for unused variable 'dev' From: Paul Bolle To: Stanislav Yakovlev Cc: "John W. Linville" , linux-wireless@vger.kernel.org, netdev@vger.kernel.org, linux-kernel@vger.kernel.org Date: Fri, 21 Sep 2012 12:02:02 +0200 X-Mailer: Evolution 3.4.4 (3.4.4-1.fc17) Mime-Version: 1.0 X-OriginalArrivalTime: 21 Sep 2012 10:02:02.0679 (UTC) FILETIME=[25D4E470:01CD97E0] Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org Building the libipw component without CONFIG_LIBIPW_DEBUG set triggers this GCC warning: drivers/net/wireless/ipw2x00/libipw_wx.c:526:21: warning: unused variable 'dev' [-Wunused-variable] The cause of this warning is that, without CONFIG_LIBIPW_DEBUG set, LIBIPW_DEBUG_WX compiles away. Fix it by substituting ieee->dev for (its equivalent) dev. Signed-off-by: Paul Bolle --- 0) I noticed this warning while building v3.6-rc6 on current Fedora 17, using Fedora's default config. 1) Compile tested only (by just compiling libipw_wx.o). drivers/net/wireless/ipw2x00/libipw_wx.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/wireless/ipw2x00/libipw_wx.c b/drivers/net/wireless/ipw2x00/libipw_wx.c index 1571505..54aba47 100644 --- a/drivers/net/wireless/ipw2x00/libipw_wx.c +++ b/drivers/net/wireless/ipw2x00/libipw_wx.c @@ -675,7 +675,7 @@ int libipw_wx_set_encodeext(struct libipw_device *ieee, } done: if (ieee->set_security) - ieee->set_security(ieee->dev, &sec); + ieee->set_security(dev, &sec); return ret; }