linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
* [linux-next:master 9724/13542] net/mac80211/mlme.c:1161:4: warning: Value stored to 'at_extension' is never read [clang-analyzer-deadcode.DeadStores]
       [not found] <202208030858.knIauqwf-lkp@intel.com>
@ 2022-08-05  3:06 ` kernel test robot
  0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2022-08-05  3:06 UTC (permalink / raw)
  To: Johannes Berg; +Cc: llvm, kbuild-all, Linux Memory Management List

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master
head:   7c5e07b73ff3011c9b82d4a3286a3362b951ad2b
commit: 81151ce462e533551f3284bfdb8e0f461c9220e6 [9724/13542] wifi: mac80211: support MLO authentication/association with one link
config: x86_64-randconfig-c007 (https://download.01.org/0day-ci/archive/20220803/202208030858.knIauqwf-lkp@intel.com/config)
compiler: clang version 16.0.0 (https://github.com/llvm/llvm-project 52cd00cabf479aa7eb6dbb063b7ba41ea57bce9e)
reproduce (this is a W=1 build):
         wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
         chmod +x ~/bin/make.cross
         # https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git/commit/?id=81151ce462e533551f3284bfdb8e0f461c9220e6
         git remote add linux-next https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git
         git fetch --no-tags linux-next master
         git checkout 81151ce462e533551f3284bfdb8e0f461c9220e6
         # save the config file
         COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=x86_64 clang-analyzer

If you fix the issue, kindly add following tag where applicable
Reported-by: kernel test robot <yujie.liu@intel.com>

clang-analyzer warnings: (new ones prefixed by >>)

 >> net/mac80211/mlme.c:1161:4: warning: Value stored to 'at_extension' is never read [clang-analyzer-deadcode.DeadStores]
                            at_extension = true;
                            ^              ~~~~

vim +/at_extension +1161 net/mac80211/mlme.c

978420c2105ca9 Johannes Berg 2022-07-12  1137
81151ce462e533 Johannes Berg 2022-06-01  1138  static void ieee80211_add_non_inheritance_elem(struct sk_buff *skb,
81151ce462e533 Johannes Berg 2022-06-01  1139  					       const u16 *outer,
81151ce462e533 Johannes Berg 2022-06-01  1140  					       const u16 *inner)
81151ce462e533 Johannes Berg 2022-06-01  1141  {
81151ce462e533 Johannes Berg 2022-06-01  1142  	unsigned int skb_len = skb->len;
81151ce462e533 Johannes Berg 2022-06-01  1143  	bool added = false;
81151ce462e533 Johannes Berg 2022-06-01  1144  	int i, j;
81151ce462e533 Johannes Berg 2022-06-01  1145  	u8 *len, *list_len = NULL;
81151ce462e533 Johannes Berg 2022-06-01  1146
81151ce462e533 Johannes Berg 2022-06-01  1147  	skb_put_u8(skb, WLAN_EID_EXTENSION);
81151ce462e533 Johannes Berg 2022-06-01  1148  	len = skb_put(skb, 1);
81151ce462e533 Johannes Berg 2022-06-01  1149  	skb_put_u8(skb, WLAN_EID_EXT_NON_INHERITANCE);
81151ce462e533 Johannes Berg 2022-06-01  1150
81151ce462e533 Johannes Berg 2022-06-01  1151  	for (i = 0; i < PRESENT_ELEMS_MAX && outer[i]; i++) {
81151ce462e533 Johannes Berg 2022-06-01  1152  		u16 elem = outer[i];
81151ce462e533 Johannes Berg 2022-06-01  1153  		bool have_inner = false;
81151ce462e533 Johannes Berg 2022-06-01 @1154  		bool at_extension = false;
81151ce462e533 Johannes Berg 2022-06-01  1155
81151ce462e533 Johannes Berg 2022-06-01  1156  		/* should at least be sorted in the sense of normal -> ext */
81151ce462e533 Johannes Berg 2022-06-01  1157  		WARN_ON(at_extension && elem < PRESENT_ELEM_EXT_OFFS);
81151ce462e533 Johannes Berg 2022-06-01  1158
81151ce462e533 Johannes Berg 2022-06-01  1159  		/* switch to extension list */
81151ce462e533 Johannes Berg 2022-06-01  1160  		if (!at_extension && elem >= PRESENT_ELEM_EXT_OFFS) {
81151ce462e533 Johannes Berg 2022-06-01 @1161  			at_extension = true;
81151ce462e533 Johannes Berg 2022-06-01  1162  			if (!list_len)
81151ce462e533 Johannes Berg 2022-06-01  1163  				skb_put_u8(skb, 0);
81151ce462e533 Johannes Berg 2022-06-01  1164  			list_len = NULL;
81151ce462e533 Johannes Berg 2022-06-01  1165  		}
81151ce462e533 Johannes Berg 2022-06-01  1166
81151ce462e533 Johannes Berg 2022-06-01  1167  		for (j = 0; j < PRESENT_ELEMS_MAX && inner[j]; j++) {
81151ce462e533 Johannes Berg 2022-06-01  1168  			if (elem == inner[j]) {
81151ce462e533 Johannes Berg 2022-06-01  1169  				have_inner = true;
81151ce462e533 Johannes Berg 2022-06-01  1170  				break;
81151ce462e533 Johannes Berg 2022-06-01  1171  			}
81151ce462e533 Johannes Berg 2022-06-01  1172  		}
81151ce462e533 Johannes Berg 2022-06-01  1173
81151ce462e533 Johannes Berg 2022-06-01  1174  		if (have_inner)
81151ce462e533 Johannes Berg 2022-06-01  1175  			continue;
81151ce462e533 Johannes Berg 2022-06-01  1176
81151ce462e533 Johannes Berg 2022-06-01  1177  		if (!list_len) {
81151ce462e533 Johannes Berg 2022-06-01  1178  			list_len = skb_put(skb, 1);
81151ce462e533 Johannes Berg 2022-06-01  1179  			*list_len = 0;
81151ce462e533 Johannes Berg 2022-06-01  1180  		}
81151ce462e533 Johannes Berg 2022-06-01  1181  		*list_len += 1;
81151ce462e533 Johannes Berg 2022-06-01  1182  		skb_put_u8(skb, (u8)elem);
81151ce462e533 Johannes Berg 2022-06-01  1183  	}
81151ce462e533 Johannes Berg 2022-06-01  1184
81151ce462e533 Johannes Berg 2022-06-01  1185  	if (!added)
81151ce462e533 Johannes Berg 2022-06-01  1186  		skb_trim(skb, skb_len);
81151ce462e533 Johannes Berg 2022-06-01  1187  	else
81151ce462e533 Johannes Berg 2022-06-01  1188  		*len = skb->len - skb_len - 2;
81151ce462e533 Johannes Berg 2022-06-01  1189  }
81151ce462e533 Johannes Berg 2022-06-01  1190

-- 
0-DAY CI Kernel Test Service
https://01.org/lkp


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

only message in thread, other threads:[~2022-08-05  3:06 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <202208030858.knIauqwf-lkp@intel.com>
2022-08-05  3:06 ` [linux-next:master 9724/13542] net/mac80211/mlme.c:1161:4: warning: Value stored to 'at_extension' is never read [clang-analyzer-deadcode.DeadStores] kernel test robot

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox