From: Joe Perches <joe@perches.com>
To: cgel.zte@gmail.com, luciano.coelho@intel.com
Cc: kvalo@codeaurora.org, davem@davemloft.net, kuba@kernel.org,
miriam.rachel.korenblit@intel.com, ye.guojin@zte.com.cn,
johannes.berg@intel.com, linux-wireless@vger.kernel.org,
netdev@vger.kernel.org, linux-kernel@vger.kernel.org,
Zeal Robot <zealci@zte.com.cn>
Subject: Re: [PATCH] iwlwifi: rs: fixup the return value type of iwl_legacy_rate_to_fw_idx()
Date: Tue, 16 Nov 2021 22:41:20 -0800 [thread overview]
Message-ID: <977fbfb8aaae8a54d8769f49d397d68f6387a0e8.camel@perches.com> (raw)
In-Reply-To: <20211117063621.160695-1-ye.guojin@zte.com.cn>
On Wed, 2021-11-17 at 06:36 +0000, cgel.zte@gmail.com wrote:
> From: Ye Guojin <ye.guojin@zte.com.cn>
>
> This was found by coccicheck:
> ./drivers/net/wireless/intel/iwlwifi/fw/rs.c, 147, 10-21, WARNING
> Unsigned expression compared with zero legacy_rate < 0
[]
> diff --git a/drivers/net/wireless/intel/iwlwifi/fw/rs.c b/drivers/net/wireless/intel/iwlwifi/fw/rs.c
[]
> @@ -142,7 +142,7 @@ u32 iwl_new_rate_from_v1(u32 rate_v1)
> }
> /* if legacy format */
> } else {
> - u32 legacy_rate = iwl_legacy_rate_to_fw_idx(rate_v1);
> + int legacy_rate = iwl_legacy_rate_to_fw_idx(rate_v1);
>
> WARN_ON(legacy_rate < 0);
Why not just remove the WARN_ON instead?
next prev parent reply other threads:[~2021-11-17 6:41 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-11-17 6:36 cgel.zte
2021-11-17 6:41 ` Joe Perches [this message]
2021-11-17 6:56 ` Coelho, Luciano
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=977fbfb8aaae8a54d8769f49d397d68f6387a0e8.camel@perches.com \
--to=joe@perches.com \
--cc=cgel.zte@gmail.com \
--cc=davem@davemloft.net \
--cc=johannes.berg@intel.com \
--cc=kuba@kernel.org \
--cc=kvalo@codeaurora.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-wireless@vger.kernel.org \
--cc=luciano.coelho@intel.com \
--cc=miriam.rachel.korenblit@intel.com \
--cc=netdev@vger.kernel.org \
--cc=ye.guojin@zte.com.cn \
--cc=zealci@zte.com.cn \
/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
all inboxes | Powered by JetHome®