All of lore.kernel.org
 help / color / mirror / Atom feed
* [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)'
@ 2026-08-10  9:51 kernel test robot
  0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2026-08-10  9:51 UTC (permalink / raw)
  To: oe-kbuild; +Cc: lkp, Dan Carpenter

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

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2026-08-10  9:52 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-08-10  9:51 [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)' kernel test robot

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.