mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Pei Xiao <xiaopei01@kylinos.cn>
To: Johannes Berg <johannes@sipsolutions.net>,
	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: Tue, 27 May 2025 16:06:22 +0800	[thread overview]
Message-ID: <fadefef6-5e16-4cc3-87d5-33e94ac1ad1a@kylinos.cn> (raw)
In-Reply-To: <af7b544920184403a22f326c3c8f0d560bf1b4d0.camel@sipsolutions.net>


在 2025/5/23 15:59, Johannes Berg 写道:
> 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(...))"?!?

thanks!

V2:

https://lore.kernel.org/lkml/7b373a4426070d50b5afb3269fd116c18ce3aea8.1748332709.git.xiaopei01@kylinos.cn/

> Not that I think it even really needs to be there but I guess working
> around a compiler warning could be worth it.
>
> johannes
Pei.Thanks!

      parent reply	other threads:[~2025-05-27  8:06 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
2025-05-27  8:05   ` Pei Xiao
2025-05-27  8:06   ` Pei Xiao [this message]

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=fadefef6-5e16-4cc3-87d5-33e94ac1ad1a@kylinos.cn \
    --to=xiaopei01@kylinos.cn \
    --cc=emmanuel.grumbach@intel.com \
    --cc=johannes@sipsolutions.net \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-wireless@vger.kernel.org \
    --cc=miriam.rachel.korenblit@intel.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 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®