lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [day] [month] [year] [list]
Message-ID: <202006222149.WSuS2xdG%lkp@intel.com>
Date:   Mon, 22 Jun 2020 21:37:54 +0800
From:   kernel test robot <lkp@...el.com>
To:     Ryder Lee <ryder.lee@...iatek.com>
Cc:     kbuild-all@...ts.01.org, linux-kernel@...r.kernel.org,
        Felix Fietkau <nbd@....name>
Subject: drivers/net/wireless/mediatek/mt76/mt76x02.h:249:2: note: in
 expansion of macro 'if'

Hi Ryder,

FYI, the error/warning still remains.

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head:   625d3449788f85569096780592549d0340e9c0c7
commit: 49e649c3e0a6ec8a12976e331a2c1f29dc7dd3a9 mt76: adjust wcid size to support new 802.11ax generation
date:   6 weeks ago
config: x86_64-randconfig-a003-20200622 (attached as .config)
compiler: gcc-9 (Debian 9.3.0-13) 9.3.0
reproduce (this is a W=1 build):
        git checkout 49e649c3e0a6ec8a12976e331a2c1f29dc7dd3a9
        # save the attached .config to linux build tree
        make W=1 ARCH=x86_64 

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@...el.com>

All warnings (new ones prefixed by >>, old ones prefixed by <<):

In file included from include/linux/export.h:43,
from include/linux/linkage.h:7,
from include/linux/kernel.h:8,
from include/linux/list.h:9,
from include/linux/module.h:12,
from drivers/net/wireless/mediatek/mt76/mt76x02_util.c:7:
drivers/net/wireless/mediatek/mt76/mt76x02.h: In function 'mt76x02_rx_get_sta':
drivers/net/wireless/mediatek/mt76/mt76x02.h:249:10: warning: comparison is always false due to limited range of data type [-Wtype-limits]
249 |  if (idx >= ARRAY_SIZE(dev->wcid))
|          ^~
include/linux/compiler.h:58:52: note: in definition of macro '__trace_if_var'
58 | #define __trace_if_var(cond) (__builtin_constant_p(cond) ? (cond) : __trace_if_value(cond))
|                                                    ^~~~
>> drivers/net/wireless/mediatek/mt76/mt76x02.h:249:2: note: in expansion of macro 'if'
249 |  if (idx >= ARRAY_SIZE(dev->wcid))
|  ^~
drivers/net/wireless/mediatek/mt76/mt76x02.h:249:10: warning: comparison is always false due to limited range of data type [-Wtype-limits]
249 |  if (idx >= ARRAY_SIZE(dev->wcid))
|          ^~
include/linux/compiler.h:58:61: note: in definition of macro '__trace_if_var'
58 | #define __trace_if_var(cond) (__builtin_constant_p(cond) ? (cond) : __trace_if_value(cond))
|                                                             ^~~~
>> drivers/net/wireless/mediatek/mt76/mt76x02.h:249:2: note: in expansion of macro 'if'
249 |  if (idx >= ARRAY_SIZE(dev->wcid))
|  ^~
drivers/net/wireless/mediatek/mt76/mt76x02.h:249:10: warning: comparison is always false due to limited range of data type [-Wtype-limits]
249 |  if (idx >= ARRAY_SIZE(dev->wcid))
|          ^~
include/linux/compiler.h:69:3: note: in definition of macro '__trace_if_value'
69 |  (cond) ?              |   ^~~~
include/linux/compiler.h:56:28: note: in expansion of macro '__trace_if_var'
56 | #define if(cond, ...) if ( __trace_if_var( !!(cond , ## __VA_ARGS__) ) )
|                            ^~~~~~~~~~~~~~
>> drivers/net/wireless/mediatek/mt76/mt76x02.h:249:2: note: in expansion of macro 'if'
249 |  if (idx >= ARRAY_SIZE(dev->wcid))
|  ^~
--
In file included from include/linux/export.h:43,
from include/linux/linkage.h:7,
from include/linux/kernel.h:8,
from drivers/net/wireless/mediatek/mt76/mt76x0/pci.c:6:
drivers/net/wireless/mediatek/mt76/mt76x0/../mt76x02.h: In function 'mt76x02_rx_get_sta':
drivers/net/wireless/mediatek/mt76/mt76x0/../mt76x02.h:249:10: warning: comparison is always false due to limited range of data type [-Wtype-limits]
249 |  if (idx >= ARRAY_SIZE(dev->wcid))
|          ^~
include/linux/compiler.h:58:52: note: in definition of macro '__trace_if_var'
58 | #define __trace_if_var(cond) (__builtin_constant_p(cond) ? (cond) : __trace_if_value(cond))
|                                                    ^~~~
>> drivers/net/wireless/mediatek/mt76/mt76x0/../mt76x02.h:249:2: note: in expansion of macro 'if'
249 |  if (idx >= ARRAY_SIZE(dev->wcid))
|  ^~
drivers/net/wireless/mediatek/mt76/mt76x0/../mt76x02.h:249:10: warning: comparison is always false due to limited range of data type [-Wtype-limits]
249 |  if (idx >= ARRAY_SIZE(dev->wcid))
|          ^~
include/linux/compiler.h:58:61: note: in definition of macro '__trace_if_var'
58 | #define __trace_if_var(cond) (__builtin_constant_p(cond) ? (cond) : __trace_if_value(cond))
|                                                             ^~~~
>> drivers/net/wireless/mediatek/mt76/mt76x0/../mt76x02.h:249:2: note: in expansion of macro 'if'
249 |  if (idx >= ARRAY_SIZE(dev->wcid))
|  ^~
drivers/net/wireless/mediatek/mt76/mt76x0/../mt76x02.h:249:10: warning: comparison is always false due to limited range of data type [-Wtype-limits]
249 |  if (idx >= ARRAY_SIZE(dev->wcid))
|          ^~
include/linux/compiler.h:69:3: note: in definition of macro '__trace_if_value'
69 |  (cond) ?              |   ^~~~
include/linux/compiler.h:56:28: note: in expansion of macro '__trace_if_var'
56 | #define if(cond, ...) if ( __trace_if_var( !!(cond , ## __VA_ARGS__) ) )
|                            ^~~~~~~~~~~~~~
>> drivers/net/wireless/mediatek/mt76/mt76x0/../mt76x02.h:249:2: note: in expansion of macro 'if'
249 |  if (idx >= ARRAY_SIZE(dev->wcid))
|  ^~
--
In file included from include/linux/export.h:43,
from include/linux/linkage.h:7,
from include/linux/kernel.h:8,
from drivers/net/wireless/mediatek/mt76/mt76x0/phy.c:9:
drivers/net/wireless/mediatek/mt76/mt76x0/../mt76x02.h: In function 'mt76x02_rx_get_sta':
drivers/net/wireless/mediatek/mt76/mt76x0/../mt76x02.h:249:10: warning: comparison is always false due to limited range of data type [-Wtype-limits]
249 |  if (idx >= ARRAY_SIZE(dev->wcid))
|          ^~
include/linux/compiler.h:58:52: note: in definition of macro '__trace_if_var'
58 | #define __trace_if_var(cond) (__builtin_constant_p(cond) ? (cond) : __trace_if_value(cond))
|                                                    ^~~~
>> drivers/net/wireless/mediatek/mt76/mt76x0/../mt76x02.h:249:2: note: in expansion of macro 'if'
249 |  if (idx >= ARRAY_SIZE(dev->wcid))
|  ^~
drivers/net/wireless/mediatek/mt76/mt76x0/../mt76x02.h:249:10: warning: comparison is always false due to limited range of data type [-Wtype-limits]
249 |  if (idx >= ARRAY_SIZE(dev->wcid))
|          ^~
include/linux/compiler.h:58:61: note: in definition of macro '__trace_if_var'
58 | #define __trace_if_var(cond) (__builtin_constant_p(cond) ? (cond) : __trace_if_value(cond))
|                                                             ^~~~
>> drivers/net/wireless/mediatek/mt76/mt76x0/../mt76x02.h:249:2: note: in expansion of macro 'if'
249 |  if (idx >= ARRAY_SIZE(dev->wcid))
|  ^~
drivers/net/wireless/mediatek/mt76/mt76x0/../mt76x02.h:249:10: warning: comparison is always false due to limited range of data type [-Wtype-limits]
249 |  if (idx >= ARRAY_SIZE(dev->wcid))
|          ^~
include/linux/compiler.h:69:3: note: in definition of macro '__trace_if_value'
69 |  (cond) ?              |   ^~~~
include/linux/compiler.h:56:28: note: in expansion of macro '__trace_if_var'
56 | #define if(cond, ...) if ( __trace_if_var( !!(cond , ## __VA_ARGS__) ) )
|                            ^~~~~~~~~~~~~~
>> drivers/net/wireless/mediatek/mt76/mt76x0/../mt76x02.h:249:2: note: in expansion of macro 'if'
249 |  if (idx >= ARRAY_SIZE(dev->wcid))
|  ^~
In file included from drivers/net/wireless/mediatek/mt76/mt76x0/phy.c:16:
At top level:
drivers/net/wireless/mediatek/mt76/mt76x0/initvals.h:218:35: warning: 'mt76x0_dcoc_tab' defined but not used [-Wunused-const-variable=]
218 | static const struct mt76_reg_pair mt76x0_dcoc_tab[] = {
|                                   ^~~~~~~~~~~~~~~
drivers/net/wireless/mediatek/mt76/mt76x0/initvals.h:86:35: warning: 'mt76x0_bbp_init_tab' defined but not used [-Wunused-const-variable=]
86 | static const struct mt76_reg_pair mt76x0_bbp_init_tab[] = {
|                                   ^~~~~~~~~~~~~~~~~~~
drivers/net/wireless/mediatek/mt76/mt76x0/initvals.h:48:35: warning: 'mt76x0_mac_reg_table' defined but not used [-Wunused-const-variable=]
48 | static const struct mt76_reg_pair mt76x0_mac_reg_table[] = {
|                                   ^~~~~~~~~~~~~~~~~~~~
drivers/net/wireless/mediatek/mt76/mt76x0/initvals.h:14:35: warning: 'common_mac_reg_table' defined but not used [-Wunused-const-variable=]
14 | static const struct mt76_reg_pair common_mac_reg_table[] = {
|                                   ^~~~~~~~~~~~~~~~~~~~

vim +/if +249 drivers/net/wireless/mediatek/mt76/mt76x02.h

713224164b5dfb drivers/net/wireless/mediatek/mt76/mt76x02_util.h Lorenzo Bianconi 2018-09-28  243  
56e8d4dd5ce24c drivers/net/wireless/mediatek/mt76/mt76x02_util.h Lorenzo Bianconi 2018-10-04  244  static inline struct mt76x02_sta *
56e8d4dd5ce24c drivers/net/wireless/mediatek/mt76/mt76x02_util.h Lorenzo Bianconi 2018-10-04  245  mt76x02_rx_get_sta(struct mt76_dev *dev, u8 idx)
56e8d4dd5ce24c drivers/net/wireless/mediatek/mt76/mt76x02_util.h Lorenzo Bianconi 2018-10-04  246  {
56e8d4dd5ce24c drivers/net/wireless/mediatek/mt76/mt76x02_util.h Lorenzo Bianconi 2018-10-04  247  	struct mt76_wcid *wcid;
56e8d4dd5ce24c drivers/net/wireless/mediatek/mt76/mt76x02_util.h Lorenzo Bianconi 2018-10-04  248  
56e8d4dd5ce24c drivers/net/wireless/mediatek/mt76/mt76x02_util.h Lorenzo Bianconi 2018-10-04 @249  	if (idx >= ARRAY_SIZE(dev->wcid))
56e8d4dd5ce24c drivers/net/wireless/mediatek/mt76/mt76x02_util.h Lorenzo Bianconi 2018-10-04  250  		return NULL;
56e8d4dd5ce24c drivers/net/wireless/mediatek/mt76/mt76x02_util.h Lorenzo Bianconi 2018-10-04  251  
56e8d4dd5ce24c drivers/net/wireless/mediatek/mt76/mt76x02_util.h Lorenzo Bianconi 2018-10-04  252  	wcid = rcu_dereference(dev->wcid[idx]);
56e8d4dd5ce24c drivers/net/wireless/mediatek/mt76/mt76x02_util.h Lorenzo Bianconi 2018-10-04  253  	if (!wcid)
56e8d4dd5ce24c drivers/net/wireless/mediatek/mt76/mt76x02_util.h Lorenzo Bianconi 2018-10-04  254  		return NULL;
56e8d4dd5ce24c drivers/net/wireless/mediatek/mt76/mt76x02_util.h Lorenzo Bianconi 2018-10-04  255  
56e8d4dd5ce24c drivers/net/wireless/mediatek/mt76/mt76x02_util.h Lorenzo Bianconi 2018-10-04  256  	return container_of(wcid, struct mt76x02_sta, wcid);
56e8d4dd5ce24c drivers/net/wireless/mediatek/mt76/mt76x02_util.h Lorenzo Bianconi 2018-10-04  257  }
56e8d4dd5ce24c drivers/net/wireless/mediatek/mt76/mt76x02_util.h Lorenzo Bianconi 2018-10-04  258  

:::::: The code at line 249 was first introduced by commit
:::::: 56e8d4dd5ce24cf534114c67de33861e86501981 mt76: move mt76x02_rx_get_sta and mt76x02_rx_get_sta_wcid in mt76x02_util.h

:::::: TO: Lorenzo Bianconi <lorenzo.bianconi@...hat.com>
:::::: CC: Felix Fietkau <nbd@....name>

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org

Download attachment ".config.gz" of type "application/gzip" (32283 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ