[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <82523993-61c8-4c03-8826-61da9081d3ba@huawei.com>
Date: Tue, 27 Aug 2024 15:29:47 +0800
From: Hongbo Li <lihongbo22@...wei.com>
To: Johannes Berg <johannes@...solutions.net>, <davem@...emloft.net>,
<edumazet@...gle.com>, <kuba@...nel.org>, <pabeni@...hat.com>,
<kvalo@...nel.org>
CC: <linux-wireless@...r.kernel.org>, <netdev@...r.kernel.org>
Subject: Re: [PATCH -next v2] wifi: mac80211: use max to simplify the code
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
>
Powered by blists - more mailing lists