[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CABFUUZG2pNxwgJzw1hiCj8OL988Ed=2xBhsFuNo09rRLTUF9aw@mail.gmail.com>
Date: Wed, 4 Feb 2026 19:33:26 +0800
From: sun jian <sun.jian.kdev@...il.com>
To: 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 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()).
Thanks,
Sun Jian
Powered by blists - more mailing lists