From: Johannes Berg <johannes@sipsolutions.net>
To: Pei Xiao <xiaopei01@kylinos.cn>,
miriam.rachel.korenblit@intel.com, emmanuel.grumbach@intel.com,
linux-wireless@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] wifi: iwlwifi: cfg: Limit cb_size to valid range
Date: Fri, 23 May 2025 09:59:34 +0200 [thread overview]
Message-ID: <af7b544920184403a22f326c3c8f0d560bf1b4d0.camel@sipsolutions.net> (raw)
In-Reply-To: <5a603a35a2d05ac9bd44c87efc605d35051d5d12.1747980220.git.xiaopei01@kylinos.cn>
On Fri, 2025-05-23 at 14:04 +0800, Pei Xiao wrote:
>
>
> - WARN_ON(RX_QUEUE_CB_SIZE(iwl_trans_get_num_rbds(trans)) > 12);
> + cb_size = RX_QUEUE_CB_SIZE(iwl_trans_get_num_rbds(trans));
> + if (unlikely(cb_size > 12)) {
> + WARN_ON(1);
>
What's wrong with "if (WARN_ON(...))"?!?
Not that I think it even really needs to be there but I guess working
around a compiler warning could be worth it.
johannes
next prev parent reply other threads:[~2025-05-23 7:59 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-05-23 6:04 Pei Xiao
2025-05-23 7:59 ` Johannes Berg [this message]
2025-05-27 8:05 ` Pei Xiao
2025-05-27 8:06 ` Pei Xiao
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=af7b544920184403a22f326c3c8f0d560bf1b4d0.camel@sipsolutions.net \
--to=johannes@sipsolutions.net \
--cc=emmanuel.grumbach@intel.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-wireless@vger.kernel.org \
--cc=miriam.rachel.korenblit@intel.com \
--cc=xiaopei01@kylinos.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®