All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] ath6kl: fix compiler warning in ath6kl_init_hw_params()
@ 2012-01-31 19:26 Kalle Valo
  2012-02-02  8:14 ` Kalle Valo
  0 siblings, 1 reply; 2+ messages in thread
From: Kalle Valo @ 2012-01-31 19:26 UTC (permalink / raw)
  To: kvalo; +Cc: ath6kl-devel, linux-wireless

Both Luis and John reported that they see a compiler warning:

drivers/net/wireless/ath/ath6kl/init.c: In function 'ath6kl_init_hw_params':
drivers/net/wireless/ath/ath6kl/init.c:1377:26: warning: ‘hw’
may be used uninitialized in this function

Oddly enough I have never seen it. But AFAICT the code is correct and
hw is not used uninitalized so add uninitialized_var() to inform that to
the compiler.

Reported-by: Luis R. Rodriguez <mcgrof@qca.qualcomm.com>
Reported-by: John W. Linville <linville@tuxdriver.com>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
---
 drivers/net/wireless/ath/ath6kl/init.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/drivers/net/wireless/ath/ath6kl/init.c b/drivers/net/wireless/ath/ath6kl/init.c
index bf56e5f..0d76c37 100644
--- a/drivers/net/wireless/ath/ath6kl/init.c
+++ b/drivers/net/wireless/ath/ath6kl/init.c
@@ -1470,7 +1470,7 @@ static int ath6kl_init_upload(struct ath6kl *ar)
 
 int ath6kl_init_hw_params(struct ath6kl *ar)
 {
-	const struct ath6kl_hw *hw;
+	const struct ath6kl_hw *uninitialized_var(hw);
 	int i;
 
 	for (i = 0; i < ARRAY_SIZE(hw_list); i++) {


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] ath6kl: fix compiler warning in ath6kl_init_hw_params()
  2012-01-31 19:26 [PATCH] ath6kl: fix compiler warning in ath6kl_init_hw_params() Kalle Valo
@ 2012-02-02  8:14 ` Kalle Valo
  0 siblings, 0 replies; 2+ messages in thread
From: Kalle Valo @ 2012-02-02  8:14 UTC (permalink / raw)
  To: Kalle Valo; +Cc: ath6kl-devel, linux-wireless

On 01/31/2012 09:26 PM, Kalle Valo wrote:
> Both Luis and John reported that they see a compiler warning:
> 
> drivers/net/wireless/ath/ath6kl/init.c: In function 'ath6kl_init_hw_params':
> drivers/net/wireless/ath/ath6kl/init.c:1377:26: warning: ‘hw’
> may be used uninitialized in this function
> 
> Oddly enough I have never seen it. But AFAICT the code is correct and
> hw is not used uninitalized so add uninitialized_var() to inform that to
> the compiler.
> 
> Reported-by: Luis R. Rodriguez <mcgrof@qca.qualcomm.com>
> Reported-by: John W. Linville <linville@tuxdriver.com>
> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>

Applied.

Kalle

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2012-02-02  8:14 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-01-31 19:26 [PATCH] ath6kl: fix compiler warning in ath6kl_init_hw_params() Kalle Valo
2012-02-02  8:14 ` Kalle Valo

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.