[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <9f3b472d-a8d1-4c51-9eed-6ef0ec5b28a3@oss.qualcomm.com>
Date: Wed, 4 Feb 2026 08:20:55 -0800
From: Jeff Johnson <jeff.johnson@....qualcomm.com>
To: sun jian <sun.jian.kdev@...il.com>,
Johannes Berg <johannes@...solutions.net>
Cc: linux-wireless@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] wifi: nl80211: drop impossible negative band check
On 2/4/2026 3:33 AM, sun jian wrote:
> On Wed, Feb 4, 2026 at 7:29 PM Johannes Berg <johannes@...solutions.net> wrote:
>>
>> On Wed, 2026-02-04 at 19:21 +0800, sun jian wrote:
>>>>
>>>> applies _only_ to signed short, not to signed char?
>>> Fair point, thanks. I'll drop this patch.
>>
>> I've thought the better way to address that warning would be to simply
>> use 'int' instead of the enum there, but I forgot where the warning even
>> appears. I don't think it's generally with gcc/clang, is it?
>>
>
> Right, I only saw it from sparse, not from gcc/clang.
>
> It was reported for net/wireless/nl80211.c at the checks around lines
> ~5762 and ~10539 in my tree (both are "band < 0 || band >=
> NUM_NL80211_BANDS" with band coming from nla_type()).
For future reference, if you are fixing a warning, then your commit text
should include that information. That way someone else who has that warning
can search the archives for that warning and then find your fix.
/jeff
Powered by blists - more mailing lists