Search Linux Wireless

[mac80211-next:vht-he 7/14] net/wireless/util.c:1948:13: warning: 'max_vht_nss' may be used uninitialized in this function

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



tree:   https://git.kernel.org/pub/scm/linux/kernel/git/jberg/mac80211-next.git vht-he
head:   fb4566483cf87f72333e1a3f65d99d9a24227b10
commit: 944d0b05ebf7bf2ae2cc4b7184e86d7cd3a9f18b [7/14] ieee80211: add new VHT capability fields/parsing
config: x86_64-randconfig-x009-201707 (attached as .config)
compiler: gcc-6 (Debian 6.2.0-3) 6.2.0 20160901
reproduce:
        git checkout 944d0b05ebf7bf2ae2cc4b7184e86d7cd3a9f18b
        # save the attached .config to linux build tree
        make ARCH=x86_64 

Note: it may well be a FALSE warning. FWIW you are at least aware of it now.
http://gcc.gnu.org/wiki/Better_Uninitialized_Warnings

All warnings (new ones prefixed by >>):

   net/wireless/util.c: In function 'ieee80211_get_vht_max_nss':
>> net/wireless/util.c:1948:13: warning: 'max_vht_nss' may be used uninitialized in this function [-Wmaybe-uninitialized]
       return 2 * max_vht_nss;
              ~~^~~~~~~~~~~~~

vim +/max_vht_nss +1948 net/wireless/util.c

  1932		switch (bw) {
  1933		case IEEE80211_VHT_CHANWIDTH_USE_HT:
  1934		case IEEE80211_VHT_CHANWIDTH_80MHZ:
  1935			if ((supp_width == 1 || supp_width == 2) &&
  1936			    ext_nss_bw == 3)
  1937				return 2 * max_vht_nss;
  1938			break;
  1939		case IEEE80211_VHT_CHANWIDTH_160MHZ:
  1940			if (supp_width == 0 &&
  1941			    (ext_nss_bw == 1 || ext_nss_bw == 2))
  1942				return DIV_ROUND_UP(max_vht_nss, 2);
  1943			if (supp_width == 0 &&
  1944			    ext_nss_bw == 3)
  1945				return DIV_ROUND_UP(3 * max_vht_nss, 4);
  1946			if (supp_width == 1 &&
  1947			    ext_nss_bw == 3)
> 1948				return 2 * max_vht_nss;
  1949			break;
  1950		case IEEE80211_VHT_CHANWIDTH_80P80MHZ:
  1951			if (supp_width == 0 &&
  1952			    ext_nss_bw == 2)
  1953				return DIV_ROUND_UP(max_vht_nss, 2);
  1954			if (supp_width == 0 &&
  1955			    ext_nss_bw == 3)
  1956				return DIV_ROUND_UP(3 * max_vht_nss, 4);

---
0-DAY kernel test infrastructure                Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all                   Intel Corporation

Attachment: .config.gz
Description: application/gzip


[Index of Archives]     [Linux Host AP]     [ATH6KL]     [Linux Wireless Personal Area Network]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Linux Kernel]     [IDE]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite Hiking]     [MIPS Linux]     [ARM Linux]     [Linux RAID]

  Powered by Linux