login
Login
/
Register
Search
Search this site:
Forums
News
Blogs
Features
Site
Home
»
Mailing list archives
»
linux-kernel
»
2010
»
August
»
3
Re: [PATCH]hostap:hostap_ioctl.c Fix variable 'ret' set but not used
view
thread
Previous message: [
thread
] [
date
] [
author
]
Next message: [thread] [
date
] [
author
]
[view in full thread]
From: Luis R. Rodriguez
Subject:
Re: [PATCH]hostap:hostap_ioctl.c Fix variable 'ret' set but not used
Date: Monday, August 2, 2010 - 5:16 pm
On Mon, Aug 2, 2010 at 5:15 PM, Luis R. Rodriguez <mcgrof@gmail.com> wrote:
quoted text
> On Mon, Aug 2, 2010 at 5:04 PM, Justin P. Mattock > <justinmattock@gmail.com> wrote: >> 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 >> >> Keep in mind Im not sure if this is the right fix for this, so please >> feedback is appreciated. >> >> Signed-off-by: Justin P. Mattock <justinmattock@gmail.com> >> >> --- >> drivers/net/wireless/hostap/hostap_ioctl.c | 3 +-- >> 1 files changed, 1 insertions(+), 2 deletions(-) >> >> diff --git a/drivers/net/wireless/hostap/hostap_ioctl.c b/drivers/net/wireless/hostap/hostap_ioctl.c >> index a85e43a..27d462f 100644 >> --- a/drivers/net/wireless/hostap/hostap_ioctl.c >> +++ b/drivers/net/wireless/hostap/hostap_ioctl.c >> @@ -1663,7 +1663,6 @@ static int prism2_request_scan(struct net_device *dev) >> struct hostap_interface *iface; >> local_info_t *local; >> struct hfa384x_scan_request scan_req; >> - int ret = 0; >> >> iface = netdev_priv(dev); >> local = iface->local; >> @@ -1689,7 +1688,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 -EINVAL; >> } >> >> if (!local->host_roaming) > > NACK please read the code instead of just patching blindly to cure a > compile issue. For example read this big block: > > > /* FIX: > * It seems to be enough to set roaming mode for a short moment to > * host-based and then setup scanrequest data and return the mode to > * firmware-based. > * > * Master mode would need to drop to Managed mode for a short while > * to make scanning work.. Or sweep through the different channels and > * use passive scan based on beacons. */ > > So.. it seems to me you likely want to flip back to > HFA384X_ROAMING_FIRMWARE *after* you've tried to issue the > HFA384X_RID_SCANREQUEST, even if it has failed. So the compile fix > should require just changing the last return statement of the function > to return ret value.
And for 802.11 there is no need to cc netdev and lkml. Just use linux-wireless. Luis --
unsubscribe notice
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to
majordomo@vger.kernel.org
More majordomo info at
http://vger.kernel.org/majordomo-info.html
Please read the FAQ at
http://www.tux.org/lkml/
Previous message: [
thread
] [
date
] [
author
]
Next message: [thread] [
date
] [
author
]
Messages in current thread:
[PATCH]hostap:hostap_ioctl.c Fix variable 'ret' set but no ...
, Justin P. Mattock
, (Mon Aug 2, 5:04 pm)
Re: [PATCH]hostap:hostap_ioctl.c Fix variable 'ret' set bu ...
, Luis R. Rodriguez
, (Mon Aug 2, 5:15 pm)
Re: [PATCH]hostap:hostap_ioctl.c Fix variable 'ret' set bu ...
, Luis R. Rodriguez
, (Mon Aug 2, 5:16 pm)
Navigation
Create content
Mailing list archives
Recent posts
Popular discussions
linux-kernel
:
Paul Turner
[tg_shares_up rewrite v4 11/11] sched: update tg->shares after cpu.shares write
Mr. James W. Laferriere
Re: Linux 2.6.25-rc1 , syntax error near unexpected token `;'
Robin Lee Powell
NFS hang + umount -f: better behaviour requested.
Linus Torvalds
Linux 2.6.34-rc4
Colin Cross
[PATCH 12/21] ARM: tegra: Add suspend and hotplug support
git
:
Fredrik Kuivinen
Re: fatal: unable to create '.git/index': File exists
Wink Saville
How-to combine several separate git repos?
Emily Ren
How to pull remote branch with specified commit id?
Denis Bueno
Git clone error
pradeep singh
git-update-server-info may be required,cannot clone and pull from a remote reposit...
openbsd-misc
:
Sevan / Venture37
Re: This is what Linus Torvalds calls openBSD crowd
Netmaffia.hu
Tini Lányok AKCIÓBAN OTTHON
Siju George
This is what Linus Torvalds calls openBSD crowd
Darrin Chandler
Re: OT: Python (was Re: vi in /bin)
frantisek holop
Re: splassert: vwakeup: and friends
linux-netdev
:
Jamie Lokier
Re: POHMELFS high performance network filesystem. Transactions, failover, performa...
Timo Teräs
ip xfrm policy semantics
Ron Mercer
[net-next PATCH 2/2] qlge: Version change to v1.00.00.27
Maciej W. Rozycki
Re: [PATCH] flush_work_sync vs. flush_scheduled_work Re: [PATCH] PHYLIB: IRQ event...
Jarek Poplawski
Re: socket api problem: can't bind an ipv6 socket to ::ffff:0.0.0.0
git-commits-head
:
Linux Kernel Mailing List
powerpc/fsl_msi: enable msi allocation in all banks
Linux Kernel Mailing List
ASoC: fix registration of the SoC card in the Freescale MPC8610 drivers
Linux Kernel Mailing List
drivers/acpi: use kasprintf
Linux Kernel Mailing List
bnx2x: Moving includes
Linux Kernel Mailing List
[ARM] mmp: add dma support to mmp2
Colocation donated by:
Syndicate