From: Julian Calaby <julian.calaby@gmail.com>
To: "Justin P. Mattock" <justinmattock@gmail.com>
Cc: linux-wireless@vger.kernel.org, j@w1.fi, linville@tuxdriver.com,
mcgrof@gmail.com
Subject: Re: [PATCH v3]hostap:hostap_ioctl.c Fix variable 'ret' set but not used
Date: Tue, 3 Aug 2010 11:58:52 +1000 [thread overview]
Message-ID: <AANLkTimmiraT1wV_=zxUmfKPz7D78uOdY4s67pVXOntA@mail.gmail.com> (raw)
In-Reply-To: <1280799971-7091-1-git-send-email-justinmattock@gmail.com>
[-- Attachment #1: Type: text/plain, Size: 1581 bytes --]
On Tue, Aug 3, 2010 at 11:46, Justin P. Mattock <justinmattock@gmail.com> wrote:
> Resend version 3
>
> 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 <justinmattock@gmail.com>
>
> ---
> drivers/net/wireless/hostap/hostap_ioctl.c | 2 +-
> 1 files changed, 1 insertions(+), 1 deletions(-)
>
> diff --git a/drivers/net/wireless/hostap/hostap_ioctl.c b/drivers/net/wireless/hostap/hostap_ioctl.c
> index a85e43a..2cf6532 100644
> --- a/drivers/net/wireless/hostap/hostap_ioctl.c
> +++ b/drivers/net/wireless/hostap/hostap_ioctl.c
> @@ -1689,7 +1689,7 @@ static int prism2_request_scan(struct net_device *dev)
> if (local->func->set_rid(dev, HFA384X_RID_SCANREQUEST, &scan_req,
> sizeof(scan_req))) {
> printk(KERN_DEBUG "SCANREQUEST failed\n");
> - ret = -EINVAL;
> + return ret;
> }
>
> if (!local->host_roaming)
NACK: This doesn't actually fix the error mentioned.
Attached is a more correct patch.
Apologies for the attachment, I'm building the patch by hand at work
and only have gMail to send it with.
This should apply to wireless-testing.
Thanks,
--
Julian Calaby
Email: julian.calaby@gmail.com
.Plan: http://sites.google.com/site/juliancalaby/
[-- Attachment #2: fix-ret-not-used-hostap.diff --]
[-- Type: text/x-patch, Size: 633 bytes --]
Hostap: Fix "'ret' set but not used" warning message from GCC in hostap
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: Julian Calaby <julian.calaby@gmail.com>
---
--- a/drivers/net/wireless/hostap/hostap_ioctl.c
+++ b/drivers/net/wireless/hostap/hostap_ioctl.c
@@ -1696,7 +1696,7 @@
hostap_set_word(dev, HFA384X_RID_CNFROAMINGMODE,
HFA384X_ROAMING_FIRMWARE);
- return 0;
+ return ret;
}
#else /* !PRISM2_NO_STATION_MODES */
next prev parent reply other threads:[~2010-08-03 1:59 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-08-03 1:46 [PATCH v3]hostap:hostap_ioctl.c Fix variable 'ret' set but not used Justin P. Mattock
2010-08-03 1:58 ` Julian Calaby [this message]
2010-08-03 2:23 ` Justin P. Mattock
2010-08-03 2:31 ` Julian Calaby
2010-08-03 2:49 ` Justin P. Mattock
2010-08-03 3:31 ` Julian Calaby
2010-08-03 3:44 ` Justin P. Mattock
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='AANLkTimmiraT1wV_=zxUmfKPz7D78uOdY4s67pVXOntA@mail.gmail.com' \
--to=julian.calaby@gmail.com \
--cc=j@w1.fi \
--cc=justinmattock@gmail.com \
--cc=linux-wireless@vger.kernel.org \
--cc=linville@tuxdriver.com \
--cc=mcgrof@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).