* Re: [PATCH 1/1] Ath9k: fix uninitialized value in ath9k_hw_reset
2008-10-10 17:56 [PATCH 1/1] Ath9k: fix uninitialized value in ath9k_hw_reset Jiri Slaby
@ 2008-10-10 11:01 ` Luis R. Rodriguez
2008-10-10 18:53 ` David Miller
1 sibling, 0 replies; 7+ messages in thread
From: Luis R. Rodriguez @ 2008-10-10 11:01 UTC (permalink / raw)
To: Jiri Slaby
Cc: John W. Linville, linux-wireless@vger.kernel.org,
linux-kernel@vger.kernel.org, Luis Rodriguez, Jouni Malinen
On Fri, Oct 10, 2008 at 10:56:43AM -0700, Jiri Slaby wrote:
> status ath9k_hw_reset() parameter should be set in every case, since
> it is used in callers to find out an error code.
>
> Signed-off-by: Jiri Slaby <jirislaby@gmail.com>
Thanks!
Acked-by: Luis R. Rodriguez <lrodriguez@atheros.com>
Luis
^ permalink raw reply [flat|nested] 7+ messages in thread
* [PATCH 1/1] Ath9k: fix uninitialized value in ath9k_hw_reset
@ 2008-10-10 17:56 Jiri Slaby
2008-10-10 11:01 ` Luis R. Rodriguez
2008-10-10 18:53 ` David Miller
0 siblings, 2 replies; 7+ messages in thread
From: Jiri Slaby @ 2008-10-10 17:56 UTC (permalink / raw)
To: John W. Linville
Cc: linux-wireless, linux-kernel, Jiri Slaby, Luis R. Rodriguez,
Jouni Malinen
status ath9k_hw_reset() parameter should be set in every case, since
it is used in callers to find out an error code.
Signed-off-by: Jiri Slaby <jirislaby@gmail.com>
Cc: Luis R. Rodriguez <lrodriguez@atheros.com>
Cc: Jouni Malinen <jmalinen@atheros.com>
---
drivers/net/wireless/ath9k/hw.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/drivers/net/wireless/ath9k/hw.c b/drivers/net/wireless/ath9k/hw.c
index 62e44a0..fb6727b 100644
--- a/drivers/net/wireless/ath9k/hw.c
+++ b/drivers/net/wireless/ath9k/hw.c
@@ -5893,7 +5893,7 @@ bool ath9k_hw_reset(struct ath_hal *ah,
}
if (!ath9k_hw_setpower(ah, ATH9K_PM_AWAKE))
- return false;
+ FAIL(-EIO);
if (curchan)
ath9k_hw_getnf(ah, curchan);
--
1.6.0.2
^ permalink raw reply related [flat|nested] 7+ messages in thread
* Re: [PATCH 1/1] Ath9k: fix uninitialized value in ath9k_hw_reset
2008-10-10 17:56 [PATCH 1/1] Ath9k: fix uninitialized value in ath9k_hw_reset Jiri Slaby
2008-10-10 11:01 ` Luis R. Rodriguez
@ 2008-10-10 18:53 ` David Miller
2008-10-10 19:00 ` Luis R. Rodriguez
1 sibling, 1 reply; 7+ messages in thread
From: David Miller @ 2008-10-10 18:53 UTC (permalink / raw)
To: jirislaby; +Cc: linville, linux-wireless, linux-kernel, lrodriguez, jmalinen
From: Jiri Slaby <jirislaby@gmail.com>
Date: Fri, 10 Oct 2008 19:56:43 +0200
> status ath9k_hw_reset() parameter should be set in every case, since
> it is used in callers to find out an error code.
>
> Signed-off-by: Jiri Slaby <jirislaby@gmail.com>
> Cc: Luis R. Rodriguez <lrodriguez@atheros.com>
> Cc: Jouni Malinen <jmalinen@atheros.com>
> ---
> drivers/net/wireless/ath9k/hw.c | 2 +-
> 1 files changed, 1 insertions(+), 1 deletions(-)
>
> diff --git a/drivers/net/wireless/ath9k/hw.c b/drivers/net/wireless/ath9k/hw.c
> index 62e44a0..fb6727b 100644
> --- a/drivers/net/wireless/ath9k/hw.c
> +++ b/drivers/net/wireless/ath9k/hw.c
> @@ -5893,7 +5893,7 @@ bool ath9k_hw_reset(struct ath_hal *ah,
> }
>
> if (!ath9k_hw_setpower(ah, ATH9K_PM_AWAKE))
> - return false;
> + FAIL(-EIO);
>
This fix may be correct, but this is the first time I've noticed
these error status updating macros and they are super ugly.
I really think they should be removed. Someone casually scanning
this code won't be able to discern the side effects and that makes
auditing harder and more error prone.
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH 1/1] Ath9k: fix uninitialized value in ath9k_hw_reset
2008-10-10 18:53 ` David Miller
@ 2008-10-10 19:00 ` Luis R. Rodriguez
2008-10-10 19:00 ` David Miller
0 siblings, 1 reply; 7+ messages in thread
From: Luis R. Rodriguez @ 2008-10-10 19:00 UTC (permalink / raw)
To: David Miller; +Cc: jirislaby, linville, linux-wireless, linux-kernel, jmalinen
On Fri, Oct 10, 2008 at 11:53 AM, David Miller <davem@davemloft.net> wrote:
> From: Jiri Slaby <jirislaby@gmail.com>
> Date: Fri, 10 Oct 2008 19:56:43 +0200
>
>> status ath9k_hw_reset() parameter should be set in every case, since
>> it is used in callers to find out an error code.
>>
>> Signed-off-by: Jiri Slaby <jirislaby@gmail.com>
>> Cc: Luis R. Rodriguez <lrodriguez@atheros.com>
>> Cc: Jouni Malinen <jmalinen@atheros.com>
>> ---
>> drivers/net/wireless/ath9k/hw.c | 2 +-
>> 1 files changed, 1 insertions(+), 1 deletions(-)
>>
>> diff --git a/drivers/net/wireless/ath9k/hw.c b/drivers/net/wireless/ath9k/hw.c
>> index 62e44a0..fb6727b 100644
>> --- a/drivers/net/wireless/ath9k/hw.c
>> +++ b/drivers/net/wireless/ath9k/hw.c
>> @@ -5893,7 +5893,7 @@ bool ath9k_hw_reset(struct ath_hal *ah,
>> }
>>
>> if (!ath9k_hw_setpower(ah, ATH9K_PM_AWAKE))
>> - return false;
>> + FAIL(-EIO);
>>
>
> This fix may be correct, but this is the first time I've noticed
> these error status updating macros and they are super ugly.
>
> I really think they should be removed. Someone casually scanning
> this code won't be able to discern the side effects and that makes
> auditing harder and more error prone.
Agreed, patches welcomed.
Luis
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH 1/1] Ath9k: fix uninitialized value in ath9k_hw_reset
2008-10-10 19:00 ` Luis R. Rodriguez
@ 2008-10-10 19:00 ` David Miller
2008-10-10 19:07 ` Luis R. Rodriguez
0 siblings, 1 reply; 7+ messages in thread
From: David Miller @ 2008-10-10 19:00 UTC (permalink / raw)
To: lrodriguez; +Cc: jirislaby, linville, linux-wireless, linux-kernel, jmalinen
From: "Luis R. Rodriguez" <lrodriguez@atheros.com>
Date: Fri, 10 Oct 2008 12:00:17 -0700
> Agreed, patches welcomed.
Translation: "Fix it yourself if you care so much." :-/
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH 1/1] Ath9k: fix uninitialized value in ath9k_hw_reset
2008-10-10 19:00 ` David Miller
@ 2008-10-10 19:07 ` Luis R. Rodriguez
2008-10-10 19:08 ` David Miller
0 siblings, 1 reply; 7+ messages in thread
From: Luis R. Rodriguez @ 2008-10-10 19:07 UTC (permalink / raw)
To: David Miller; +Cc: jirislaby, linville, linux-wireless, linux-kernel, jmalinen
On Fri, Oct 10, 2008 at 12:00 PM, David Miller <davem@davemloft.net> wrote:
> From: "Luis R. Rodriguez" <lrodriguez@atheros.com>
> Date: Fri, 10 Oct 2008 12:00:17 -0700
>
>> Agreed, patches welcomed.
>
> Translation: "Fix it yourself if you care so much." :-/
Not really, I want to fix it, just want to fix aggregation too. OK
fine, I'll send a patch now.
Luis
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH 1/1] Ath9k: fix uninitialized value in ath9k_hw_reset
2008-10-10 19:07 ` Luis R. Rodriguez
@ 2008-10-10 19:08 ` David Miller
0 siblings, 0 replies; 7+ messages in thread
From: David Miller @ 2008-10-10 19:08 UTC (permalink / raw)
To: lrodriguez; +Cc: jirislaby, linville, linux-wireless, linux-kernel, jmalinen
From: "Luis R. Rodriguez" <lrodriguez@atheros.com>
Date: Fri, 10 Oct 2008 12:07:47 -0700
> On Fri, Oct 10, 2008 at 12:00 PM, David Miller <davem@davemloft.net> wrote:
> > From: "Luis R. Rodriguez" <lrodriguez@atheros.com>
> > Date: Fri, 10 Oct 2008 12:00:17 -0700
> >
> >> Agreed, patches welcomed.
> >
> > Translation: "Fix it yourself if you care so much." :-/
>
> Not really, I want to fix it, just want to fix aggregation too.
Ok, as long as your intentions are clear :-)
> OK fine, I'll send a patch now.
Thank you.
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2008-10-10 19:08 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-10-10 17:56 [PATCH 1/1] Ath9k: fix uninitialized value in ath9k_hw_reset Jiri Slaby
2008-10-10 11:01 ` Luis R. Rodriguez
2008-10-10 18:53 ` David Miller
2008-10-10 19:00 ` Luis R. Rodriguez
2008-10-10 19:00 ` David Miller
2008-10-10 19:07 ` Luis R. Rodriguez
2008-10-10 19:08 ` David Miller
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).