From: Simon Horman <simon.horman@corigine.com>
To: Randy Dunlap <rdunlap@infradead.org>
Cc: linux-kernel@vger.kernel.org,
Geert Uytterhoeven <geert@linux-m68k.org>,
Kalle Valo <kvalo@kernel.org>,
linux-wireless@vger.kernel.org,
"David S. Miller" <davem@davemloft.net>,
Eric Dumazet <edumazet@google.com>,
Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>,
netdev@vger.kernel.org
Subject: Re: [PATCH net] wifi: airo: avoid uninitialized warning in airo_get_rate()
Date: Tue, 11 Jul 2023 18:25:12 +0100 [thread overview]
Message-ID: <ZK2QeBZKWi0Q6vuW@corigine.com> (raw)
In-Reply-To: <20230709133154.26206-1-rdunlap@infradead.org>
On Sun, Jul 09, 2023 at 06:31:54AM -0700, Randy Dunlap wrote:
> Quieten a gcc (11.3.0) build error or warning by checking the function
> call status and returning -EBUSY if the function call failed.
> This is similar to what several other wireless drivers do for the
> SIOCGIWRATE ioctl call when there is a locking problem.
>
> drivers/net/wireless/cisco/airo.c: error: 'status_rid.currentXmitRate' is used uninitialized [-Werror=uninitialized]
Hi Randy,
There seem to be other calls to readStatusRid() in the same file
with similar properties. Perhaps it would be best to fix them too?
> Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2")
> Signed-off-by: Randy Dunlap <rdunlap@infradead.org>
> Reported-by: Geert Uytterhoeven <geert@linux-m68k.org>
> Link: lore.kernel.org/r/39abf2c7-24a-f167-91da-ed4c5435d1c4@linux-m68k.org
> Cc: Kalle Valo <kvalo@kernel.org>
> Cc: linux-wireless@vger.kernel.org
> Cc: "David S. Miller" <davem@davemloft.net>
> Cc: Eric Dumazet <edumazet@google.com>
> Cc: Jakub Kicinski <kuba@kernel.org>
> Cc: Paolo Abeni <pabeni@redhat.com>
> Cc: netdev@vger.kernel.org
> ---
> drivers/net/wireless/cisco/airo.c | 5 ++++-
> 1 file changed, 4 insertions(+), 1 deletion(-)
>
> diff -- a/drivers/net/wireless/cisco/airo.c b/drivers/net/wireless/cisco/airo.c
> --- a/drivers/net/wireless/cisco/airo.c
> +++ b/drivers/net/wireless/cisco/airo.c
> @@ -6157,8 +6157,11 @@ static int airo_get_rate(struct net_devi
> struct iw_param *vwrq = &wrqu->bitrate;
> struct airo_info *local = dev->ml_priv;
> StatusRid status_rid; /* Card status info */
> + int ret;
>
> - readStatusRid(local, &status_rid, 1);
> + ret = readStatusRid(local, &status_rid, 1);
> + if (ret)
> + return -EBUSY;
>
> vwrq->value = le16_to_cpu(status_rid.currentXmitRate) * 500000;
> /* If more than one rate, set auto */
>
next prev parent reply other threads:[~2023-07-11 17:26 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-07-09 13:31 [PATCH net] wifi: airo: avoid uninitialized warning in airo_get_rate() Randy Dunlap
2023-07-11 17:25 ` Simon Horman [this message]
2023-07-11 21:07 ` Randy Dunlap
2023-07-13 8:38 ` Simon Horman
2023-07-12 2:30 ` patchwork-bot+netdevbpf
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=ZK2QeBZKWi0Q6vuW@corigine.com \
--to=simon.horman@corigine.com \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=geert@linux-m68k.org \
--cc=kuba@kernel.org \
--cc=kvalo@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-wireless@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=rdunlap@infradead.org \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox