From: kernel test robot <lkp@intel.com>
To: oe-kbuild@lists.linux.dev
Cc: lkp@intel.com, Dan Carpenter <error27@gmail.com>
Subject: [linux-next:master 10145/13846] drivers/net/wireless/mediatek/mt76/mt7925/nan.c:210 mt7925_nan_mp_tlv() warn: impossible condition '(master_pref > 255) => (0-255 > 255)'
Date: Mon, 10 Aug 2026 17:51:02 +0800 [thread overview]
Message-ID: <202608101725.AtQNuubl-lkp@intel.com> (raw)
BCC: lkp@intel.com
CC: oe-kbuild-all@lists.linux.dev
TO: Sean Wang <sean.wang@mediatek.com>
CC: Felix Fietkau <nbd@nbd.name>
CC: Stella Liu <yu-ching.liu@mediatek.com>
CC: Jeremy Yu <chengwei.yu@mediatek.com>
tree: https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master
head: 6b8c8af514d739d0335f5579b585e02babe8a727
commit: a5487a6824068cba6fab02f3e5186940a59275ed [10145/13846] wifi: mt76: mt7925: add NAN MCU helpers
:::::: branch date: 3 days ago
:::::: commit date: 10 days ago
config: x86_64-randconfig-161-20260810 (https://download.01.org/0day-ci/archive/20260810/202608101725.AtQNuubl-lkp@intel.com/config)
compiler: clang version 22.1.3 (https://github.com/llvm/llvm-project e9846648fd6183ee6d8cbdb4502213fcf902a211)
smatch: v0.5.0-9187-g5189e3fb
If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@intel.com>
| Reported-by: Dan Carpenter <error27@gmail.com>
| Closes: https://lore.kernel.org/r/202608101725.AtQNuubl-lkp@intel.com/
smatch warnings:
drivers/net/wireless/mediatek/mt76/mt7925/nan.c:210 mt7925_nan_mp_tlv() warn: impossible condition '(master_pref > 255) => (0-255 > 255)'
vim +210 drivers/net/wireless/mediatek/mt76/mt7925/nan.c
a5487a6824068cb Sean Wang 2026-06-24 193
a5487a6824068cb Sean Wang 2026-06-24 194 static int
a5487a6824068cb Sean Wang 2026-06-24 195 mt7925_nan_mp_tlv(struct sk_buff *skb, u8 master_pref)
a5487a6824068cb Sean Wang 2026-06-24 196 {
a5487a6824068cb Sean Wang 2026-06-24 197 struct mt7925_nan_master_preference_tlv *mp_tlv = NULL;
a5487a6824068cb Sean Wang 2026-06-24 198 struct tlv *tlv = NULL;
a5487a6824068cb Sean Wang 2026-06-24 199
a5487a6824068cb Sean Wang 2026-06-24 200 if (!skb)
a5487a6824068cb Sean Wang 2026-06-24 201 return -EINVAL;
a5487a6824068cb Sean Wang 2026-06-24 202
a5487a6824068cb Sean Wang 2026-06-24 203 tlv = mt76_connac_mcu_add_tlv(skb, NAN_UNI_CMD_SET_MASTER_PREFERENCE,
a5487a6824068cb Sean Wang 2026-06-24 204 sizeof(struct mt7925_nan_master_preference_tlv));
a5487a6824068cb Sean Wang 2026-06-24 205 if (!tlv)
a5487a6824068cb Sean Wang 2026-06-24 206 return -ENOMEM;
a5487a6824068cb Sean Wang 2026-06-24 207
a5487a6824068cb Sean Wang 2026-06-24 208 mp_tlv = (struct mt7925_nan_master_preference_tlv *)tlv;
a5487a6824068cb Sean Wang 2026-06-24 209
a5487a6824068cb Sean Wang 2026-06-24 @210 if (master_pref > NAN_MAX_MASTER_PREFERENCE)
a5487a6824068cb Sean Wang 2026-06-24 211 return 0;
a5487a6824068cb Sean Wang 2026-06-24 212
a5487a6824068cb Sean Wang 2026-06-24 213 mp_tlv->master_preference = master_pref;
a5487a6824068cb Sean Wang 2026-06-24 214
a5487a6824068cb Sean Wang 2026-06-24 215 return 0;
a5487a6824068cb Sean Wang 2026-06-24 216 }
a5487a6824068cb Sean Wang 2026-06-24 217
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
reply other threads:[~2026-08-10 9:52 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=202608101725.AtQNuubl-lkp@intel.com \
--to=lkp@intel.com \
--cc=error27@gmail.com \
--cc=oe-kbuild@lists.linux.dev \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.