From: Kalle Valo <kvalo@qca.qualcomm.com>
To: Frederic Danis <frederic.danis@linux.intel.com>
Cc: <linville@tuxdriver.com>, <linux-wireless@vger.kernel.org>,
<ath6kl@lists.infradead.org>
Subject: Re: [PATCH] ath6kl: Fix ath6kl_bmi_read_hi32 macro
Date: Wed, 28 May 2014 16:52:21 +0300 [thread overview]
Message-ID: <87oayi6mei.fsf@kamboji.qca.qualcomm.com> (raw)
In-Reply-To: <1400249504-23739-1-git-send-email-frederic.danis@linux.intel.com> (Frederic Danis's message of "Fri, 16 May 2014 16:11:44 +0200")
Frederic Danis <frederic.danis@linux.intel.com> writes:
> tmp may be used uninitialized if ath6kl_bmi_read() returns an error.
>
> Signed-off-by: Frederic Danis <frederic.danis@linux.intel.com>
> ---
> drivers/net/wireless/ath/ath6kl/bmi.h | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/net/wireless/ath/ath6kl/bmi.h b/drivers/net/wireless/ath/ath6kl/bmi.h
> index 18fdd69..397a52f 100644
> --- a/drivers/net/wireless/ath/ath6kl/bmi.h
> +++ b/drivers/net/wireless/ath/ath6kl/bmi.h
> @@ -242,7 +242,8 @@ struct ath6kl_bmi_target_info {
> (void) (check_type == val); \
> addr = ath6kl_get_hi_item_addr(ar, HI_ITEM(item)); \
> ret = ath6kl_bmi_read(ar, addr, (u8 *) &tmp, 4); \
> - *val = le32_to_cpu(tmp); \
> + if (!ret) \
> + *val = le32_to_cpu(tmp); \
> ret; \
> })
I see new warnings with this patch:
drivers/net/wireless/ath/ath6kl/init.c: In function '__ath6kl_init_hw_start.part.5':
drivers/net/wireless/ath/ath6kl/init.c:1196:13: warning: 'board_ext_address' may be used uninitialized in this function [-Wuninitialized]
drivers/net/wireless/ath/ath6kl/init.c:1147:21: note: 'board_ext_address' was declared here
drivers/net/wireless/ath/ath6kl/init.c:1224:6: warning: 'board_address' may be used uninitialized in this function [-Wuninitialized]
drivers/net/wireless/ath/ath6kl/init.c:1147:6: note: 'board_address' was declared here
--
Kalle Valo
next prev parent reply other threads:[~2014-05-28 13:52 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-05-16 14:11 [PATCH] ath6kl: Fix ath6kl_bmi_read_hi32 macro Frederic Danis
2014-05-28 13:52 ` Kalle Valo [this message]
2014-06-02 12:17 ` [PATCH v2] " Frederic Danis
2014-07-14 12:50 ` Kalle Valo
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=87oayi6mei.fsf@kamboji.qca.qualcomm.com \
--to=kvalo@qca.qualcomm.com \
--cc=ath6kl@lists.infradead.org \
--cc=frederic.danis@linux.intel.com \
--cc=linux-wireless@vger.kernel.org \
--cc=linville@tuxdriver.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 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.