Netdev List
 help / color / mirror / Atom feed
From: Hongbo Li <lihongbo22@huawei.com>
To: Johannes Berg <johannes@sipsolutions.net>, <davem@davemloft.net>,
	<edumazet@google.com>, <kuba@kernel.org>, <pabeni@redhat.com>,
	<kvalo@kernel.org>
Cc: <linux-wireless@vger.kernel.org>, <netdev@vger.kernel.org>
Subject: Re: [PATCH -next v2] wifi: mac80211: use max to simplify the code
Date: Tue, 27 Aug 2024 15:29:47 +0800	[thread overview]
Message-ID: <82523993-61c8-4c03-8826-61da9081d3ba@huawei.com> (raw)
In-Reply-To: <d5f495b67fe6bf128e7a51b9fcfe11f70c9b66ae.camel@sipsolutions.net>



On 2024/8/27 15:25, Johannes Berg wrote:
> On Tue, 2024-08-27 at 11:03 +0800, Hongbo Li wrote:
>> The following Coccinelle/coccicheck warning reported by
>> minmax.cocci:
>>      WARNING opportunity for max()
> 
> Yeah well, maybe sometimes we shouldn't blindly follow tools ...
> 
>> Let's use max() to simplify the code and fix the warning.
> 
> You should explain why.
> 
> I think only one out of four changes in this patch is correct,
> semantically.
> 
You mean sometimes we should keep the variable type in comparison?

Thanks,
Hongbo

> johannes
> 

  reply	other threads:[~2024-08-27  7:29 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-08-27  3:03 [PATCH -next v2] wifi: mac80211: use max to simplify the code Hongbo Li
2024-08-27  7:25 ` Johannes Berg
2024-08-27  7:29   ` Hongbo Li [this message]
2024-08-27  7:39     ` Johannes Berg

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=82523993-61c8-4c03-8826-61da9081d3ba@huawei.com \
    --to=lihongbo22@huawei.com \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=johannes@sipsolutions.net \
    --cc=kuba@kernel.org \
    --cc=kvalo@kernel.org \
    --cc=linux-wireless@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.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