* [PATCH v2]hostap/hostap_ioctl.c Fix variable 'ret' set but not used @ 2010-08-03 0:51 Justin P. Mattock 2010-08-03 1:03 ` Luis R. Rodriguez 0 siblings, 1 reply; 4+ messages in thread From: Justin P. Mattock @ 2010-08-03 0:51 UTC (permalink / raw) To: linux-wireless; +Cc: j, linville, Justin P. Mattock 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 <justinmattock@gmail.com> --- 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) -- 1.7.1.rc1.21.gf3bd6 ^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH v2]hostap/hostap_ioctl.c Fix variable 'ret' set but not used 2010-08-03 0:51 [PATCH v2]hostap/hostap_ioctl.c Fix variable 'ret' set but not used Justin P. Mattock @ 2010-08-03 1:03 ` Luis R. Rodriguez 2010-08-03 1:15 ` Julian Calaby 0 siblings, 1 reply; 4+ messages in thread From: Luis R. Rodriguez @ 2010-08-03 1:03 UTC (permalink / raw) To: Justin P. Mattock; +Cc: linux-wireless, j, linville On Mon, Aug 2, 2010 at 5:51 PM, Justin P. Mattock <justinmattock@gmail.com> 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 <justinmattock@gmail.com> > > --- > 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. Luis ^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH v2]hostap/hostap_ioctl.c Fix variable 'ret' set but not used 2010-08-03 1:03 ` Luis R. Rodriguez @ 2010-08-03 1:15 ` Julian Calaby 2010-08-03 1:39 ` Justin P. Mattock 0 siblings, 1 reply; 4+ messages in thread From: Julian Calaby @ 2010-08-03 1:15 UTC (permalink / raw) To: Luis R. Rodriguez; +Cc: Justin P. Mattock, linux-wireless, j, linville On Tue, Aug 3, 2010 at 11:03, Luis R. Rodriguez <mcgrof@gmail.com> wrote: > On Mon, Aug 2, 2010 at 5:51 PM, Justin P. Mattock > <justinmattock@gmail.com> 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 <justinmattock@gmail.com> >> >> --- >> 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, -- Julian Calaby Email: julian.calaby@gmail.com .Plan: http://sites.google.com/site/juliancalaby/ ^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH v2]hostap/hostap_ioctl.c Fix variable 'ret' set but not used 2010-08-03 1:15 ` Julian Calaby @ 2010-08-03 1:39 ` Justin P. Mattock 0 siblings, 0 replies; 4+ messages in thread From: Justin P. Mattock @ 2010-08-03 1:39 UTC (permalink / raw) To: Julian Calaby; +Cc: Luis R. Rodriguez, linux-wireless, j, linville On 08/02/2010 06:15 PM, Julian Calaby wrote: > On Tue, Aug 3, 2010 at 11:03, Luis R. Rodriguez<mcgrof@gmail.com> wrote: >> On Mon, Aug 2, 2010 at 5:51 PM, Justin P. Mattock >> <justinmattock@gmail.com> 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<justinmattock@gmail.com> >>> >>> --- >>> 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 ^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2010-08-03 1:38 UTC | newest] Thread overview: 4+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2010-08-03 0:51 [PATCH v2]hostap/hostap_ioctl.c Fix variable 'ret' set but not used Justin P. Mattock 2010-08-03 1:03 ` Luis R. Rodriguez 2010-08-03 1:15 ` Julian Calaby 2010-08-03 1:39 ` Justin P. Mattock
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).