From mboxrd@z Thu Jan 1 00:00:00 1970 Return-path: Received: from mail-px0-f174.google.com ([209.85.212.174]:33274 "EHLO mail-px0-f174.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751076Ab0HCBi5 (ORCPT ); Mon, 2 Aug 2010 21:38:57 -0400 Received: by pxi14 with SMTP id 14so1505561pxi.19 for ; Mon, 02 Aug 2010 18:38:57 -0700 (PDT) Message-ID: <4C57733F.70408@gmail.com> Date: Mon, 02 Aug 2010 18:39:11 -0700 From: "Justin P. Mattock" MIME-Version: 1.0 To: Julian Calaby CC: "Luis R. Rodriguez" , linux-wireless@vger.kernel.org, j@w1.fi, linville@tuxdriver.com Subject: Re: [PATCH v2]hostap/hostap_ioctl.c Fix variable 'ret' set but not used References: <1280796706-4384-1-git-send-email-justinmattock@gmail.com> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Sender: linux-wireless-owner@vger.kernel.org List-ID: On 08/02/2010 06:15 PM, Julian Calaby wrote: > On Tue, Aug 3, 2010 at 11:03, Luis R. Rodriguez wrote: >> On Mon, Aug 2, 2010 at 5:51 PM, Justin P. Mattock >> wrote: >>> This a resend after receiving feedback on a better solution. >>> >>> The below patch fixes a warning message generated by GCC: >>> CC [M] drivers/net/wireless/hostap/hostap_ioctl.o >>> drivers/net/wireless/hostap/hostap_ioctl.c: In function 'prism2_request_scan': >>> drivers/net/wireless/hostap/hostap_ioctl.c:1666:6: warning: variable 'ret' set but not used >>> >>> Signed-off-by: Justin P. Mattock >>> >>> --- >>> drivers/net/wireless/hostap/hostap_ioctl.c | 1 + >>> 1 files changed, 1 insertions(+), 0 deletions(-) >>> >>> diff --git a/drivers/net/wireless/hostap/hostap_ioctl.c b/drivers/net/wireless/hostap/hostap_ioctl.c >>> index a85e43a..955e070 100644 >>> --- a/drivers/net/wireless/hostap/hostap_ioctl.c >>> +++ b/drivers/net/wireless/hostap/hostap_ioctl.c >>> @@ -1690,6 +1690,7 @@ static int prism2_request_scan(struct net_device *dev) >>> sizeof(scan_req))) { >>> printk(KERN_DEBUG "SCANREQUEST failed\n"); >>> ret = -EINVAL; >>> + return ret; >>> } >>> >>> if (!local->host_roaming) >> >> NACK, just make the routine return the ret instead of 0. > > As in something along the lines of: > > --- hostap_ioctl.c 2010-08-03 11:13:24.000000000 +1000 > +++ hostap_ioctl.c~new 2010-08-03 11:14:08.000000000 +1000 > @@ -1696,7 +1696,7 @@ > hostap_set_word(dev, HFA384X_RID_CNFROAMINGMODE, > HFA384X_ROAMING_FIRMWARE); > > - return 0; > + return ret; > } > > #else /* !PRISM2_NO_STATION_MODES */ > > (whitespace damange, missing paths, and incorrect names are intentional) > > Thanks, > ahh.. now I see.. so no EINVAL just 0. let me resend. Justin P. Mattock