net/mac80211/sta_info.c:1921:4: note: in expansion of macro 'atomic_add'

From: kbuild test robot
Date: Thu May 28 2020 - 04:48:17 EST


tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: b0c3ba31be3e45a130e13b278cf3b90f69bda6f6
commit: 3ace10f5b5ad94bdbd4b419dc9da2217d57720a9 mac80211: Implement Airtime-based Queue Limit (AQL)
date: 6 months ago
config: ia64-randconfig-r035-20200528 (attached as .config)
compiler: ia64-linux-gcc (GCC) 9.3.0
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
git checkout 3ace10f5b5ad94bdbd4b419dc9da2217d57720a9
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=ia64

If you fix the issue, kindly add following tag as appropriate
Reported-by: kbuild test robot <lkp@xxxxxxxxx>

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

In file included from arch/ia64/include/asm/pgtable.h:154,
from include/linux/mm.h:99,
from include/linux/bvec.h:13,
from include/linux/skbuff.h:17,
from include/linux/if_ether.h:19,
from include/linux/etherdevice.h:20,
from net/mac80211/sta_info.c:12:
arch/ia64/include/asm/mmu_context.h: In function 'reload_context':
arch/ia64/include/asm/mmu_context.h:137:41: warning: variable 'old_rr4' set but not used [-Wunused-but-set-variable]
137 | unsigned long rr0, rr1, rr2, rr3, rr4, old_rr4;
| ^~~~~~~
In file included from include/linux/atomic.h:7,
from arch/ia64/include/asm/processor.h:79,
from arch/ia64/include/asm/thread_info.h:12,
from include/linux/thread_info.h:38,
from include/asm-generic/preempt.h:5,
from ./arch/ia64/include/generated/asm/preempt.h:1,
from include/linux/preempt.h:78,
from include/linux/spinlock.h:51,
from include/linux/seqlock.h:36,
from include/linux/time.h:6,
from include/linux/stat.h:19,
from include/linux/module.h:10,
from net/mac80211/sta_info.c:10:
net/mac80211/sta_info.c: In function 'ieee80211_sta_update_pending_airtime':
arch/ia64/include/asm/atomic.h:72:8: warning: comparison is always false due to limited range of data type [-Wtype-limits]
72 | (i) == -1 || (i) == -4 || (i) == -8 || (i) == -16) : 0; | ^~
arch/ia64/include/asm/atomic.h:81:2: note: in expansion of macro '__ia64_atomic_const'
81 | __ia64_atomic_const(i) | ^~~~~~~~~~~~~~~~~~~
>> arch/ia64/include/asm/atomic.h:218:33: note: in expansion of macro 'atomic_add_return'
218 | #define atomic_add(i,v) (void)atomic_add_return((i), (v))
| ^~~~~~~~~~~~~~~~~
>> net/mac80211/sta_info.c:1921:4: note: in expansion of macro 'atomic_add'
1921 | atomic_add(tx_airtime,
| ^~~~~~~~~~
arch/ia64/include/asm/atomic.h:72:21: warning: comparison is always false due to limited range of data type [-Wtype-limits]
72 | (i) == -1 || (i) == -4 || (i) == -8 || (i) == -16) : 0; | ^~
arch/ia64/include/asm/atomic.h:81:2: note: in expansion of macro '__ia64_atomic_const'
81 | __ia64_atomic_const(i) | ^~~~~~~~~~~~~~~~~~~
>> arch/ia64/include/asm/atomic.h:218:33: note: in expansion of macro 'atomic_add_return'
218 | #define atomic_add(i,v) (void)atomic_add_return((i), (v))
| ^~~~~~~~~~~~~~~~~
>> net/mac80211/sta_info.c:1921:4: note: in expansion of macro 'atomic_add'
1921 | atomic_add(tx_airtime,
| ^~~~~~~~~~
arch/ia64/include/asm/atomic.h:72:34: warning: comparison is always false due to limited range of data type [-Wtype-limits]
72 | (i) == -1 || (i) == -4 || (i) == -8 || (i) == -16) : 0; | ^~
arch/ia64/include/asm/atomic.h:81:2: note: in expansion of macro '__ia64_atomic_const'
81 | __ia64_atomic_const(i) | ^~~~~~~~~~~~~~~~~~~
>> arch/ia64/include/asm/atomic.h:218:33: note: in expansion of macro 'atomic_add_return'
218 | #define atomic_add(i,v) (void)atomic_add_return((i), (v))
| ^~~~~~~~~~~~~~~~~
>> net/mac80211/sta_info.c:1921:4: note: in expansion of macro 'atomic_add'
1921 | atomic_add(tx_airtime,
| ^~~~~~~~~~
arch/ia64/include/asm/atomic.h:72:47: warning: comparison is always false due to limited range of data type [-Wtype-limits]
72 | (i) == -1 || (i) == -4 || (i) == -8 || (i) == -16) : 0; | ^~
arch/ia64/include/asm/atomic.h:81:2: note: in expansion of macro '__ia64_atomic_const'
81 | __ia64_atomic_const(i) | ^~~~~~~~~~~~~~~~~~~
>> arch/ia64/include/asm/atomic.h:218:33: note: in expansion of macro 'atomic_add_return'
218 | #define atomic_add(i,v) (void)atomic_add_return((i), (v))
| ^~~~~~~~~~~~~~~~~
>> net/mac80211/sta_info.c:1921:4: note: in expansion of macro 'atomic_add'
1921 | atomic_add(tx_airtime,
| ^~~~~~~~~~
arch/ia64/include/asm/atomic.h:72:8: warning: comparison is always false due to limited range of data type [-Wtype-limits]
72 | (i) == -1 || (i) == -4 || (i) == -8 || (i) == -16) : 0; | ^~
arch/ia64/include/asm/atomic.h:81:2: note: in expansion of macro '__ia64_atomic_const'
81 | __ia64_atomic_const(i) | ^~~~~~~~~~~~~~~~~~~
>> arch/ia64/include/asm/atomic.h:218:33: note: in expansion of macro 'atomic_add_return'
218 | #define atomic_add(i,v) (void)atomic_add_return((i), (v))
| ^~~~~~~~~~~~~~~~~
net/mac80211/sta_info.c:1924:3: note: in expansion of macro 'atomic_add'
1924 | atomic_add(tx_airtime, &local->aql_total_pending_airtime);
| ^~~~~~~~~~
arch/ia64/include/asm/atomic.h:72:21: warning: comparison is always false due to limited range of data type [-Wtype-limits]
72 | (i) == -1 || (i) == -4 || (i) == -8 || (i) == -16) : 0; | ^~
arch/ia64/include/asm/atomic.h:81:2: note: in expansion of macro '__ia64_atomic_const'
81 | __ia64_atomic_const(i) | ^~~~~~~~~~~~~~~~~~~
>> arch/ia64/include/asm/atomic.h:218:33: note: in expansion of macro 'atomic_add_return'
218 | #define atomic_add(i,v) (void)atomic_add_return((i), (v))
| ^~~~~~~~~~~~~~~~~
net/mac80211/sta_info.c:1924:3: note: in expansion of macro 'atomic_add'
1924 | atomic_add(tx_airtime, &local->aql_total_pending_airtime);
| ^~~~~~~~~~
arch/ia64/include/asm/atomic.h:72:34: warning: comparison is always false due to limited range of data type [-Wtype-limits]
72 | (i) == -1 || (i) == -4 || (i) == -8 || (i) == -16) : 0; | ^~
arch/ia64/include/asm/atomic.h:81:2: note: in expansion of macro '__ia64_atomic_const'
81 | __ia64_atomic_const(i) | ^~~~~~~~~~~~~~~~~~~
>> arch/ia64/include/asm/atomic.h:218:33: note: in expansion of macro 'atomic_add_return'
218 | #define atomic_add(i,v) (void)atomic_add_return((i), (v))
| ^~~~~~~~~~~~~~~~~
net/mac80211/sta_info.c:1924:3: note: in expansion of macro 'atomic_add'
1924 | atomic_add(tx_airtime, &local->aql_total_pending_airtime);
| ^~~~~~~~~~
arch/ia64/include/asm/atomic.h:72:47: warning: comparison is always false due to limited range of data type [-Wtype-limits]
72 | (i) == -1 || (i) == -4 || (i) == -8 || (i) == -16) : 0; | ^~
arch/ia64/include/asm/atomic.h:81:2: note: in expansion of macro '__ia64_atomic_const'
81 | __ia64_atomic_const(i) | ^~~~~~~~~~~~~~~~~~~
>> arch/ia64/include/asm/atomic.h:218:33: note: in expansion of macro 'atomic_add_return'
218 | #define atomic_add(i,v) (void)atomic_add_return((i), (v))
| ^~~~~~~~~~~~~~~~~
net/mac80211/sta_info.c:1924:3: note: in expansion of macro 'atomic_add'
1924 | atomic_add(tx_airtime, &local->aql_total_pending_airtime);
| ^~~~~~~~~~
arch/ia64/include/asm/atomic.h:72:8: warning: comparison is always false due to limited range of data type [-Wtype-limits]
72 | (i) == -1 || (i) == -4 || (i) == -8 || (i) == -16) : 0; | ^~
arch/ia64/include/asm/atomic.h:89:2: note: in expansion of macro '__ia64_atomic_const'
89 | __ia64_atomic_const(i) | ^~~~~~~~~~~~~~~~~~~
>> net/mac80211/sta_info.c:1929:16: note: in expansion of macro 'atomic_sub_return'
1929 | tx_pending = atomic_sub_return(tx_airtime,
| ^~~~~~~~~~~~~~~~~
arch/ia64/include/asm/atomic.h:72:21: warning: comparison is always false due to limited range of data type [-Wtype-limits]
72 | (i) == -1 || (i) == -4 || (i) == -8 || (i) == -16) : 0; | ^~
arch/ia64/include/asm/atomic.h:89:2: note: in expansion of macro '__ia64_atomic_const'
89 | __ia64_atomic_const(i) | ^~~~~~~~~~~~~~~~~~~
>> net/mac80211/sta_info.c:1929:16: note: in expansion of macro 'atomic_sub_return'
1929 | tx_pending = atomic_sub_return(tx_airtime,
| ^~~~~~~~~~~~~~~~~
arch/ia64/include/asm/atomic.h:72:34: warning: comparison is always false due to limited range of data type [-Wtype-limits]
72 | (i) == -1 || (i) == -4 || (i) == -8 || (i) == -16) : 0; | ^~
arch/ia64/include/asm/atomic.h:89:2: note: in expansion of macro '__ia64_atomic_const'
89 | __ia64_atomic_const(i) | ^~~~~~~~~~~~~~~~~~~
>> net/mac80211/sta_info.c:1929:16: note: in expansion of macro 'atomic_sub_return'
1929 | tx_pending = atomic_sub_return(tx_airtime,
| ^~~~~~~~~~~~~~~~~
arch/ia64/include/asm/atomic.h:72:47: warning: comparison is always false due to limited range of data type [-Wtype-limits]
72 | (i) == -1 || (i) == -4 || (i) == -8 || (i) == -16) : 0; | ^~
arch/ia64/include/asm/atomic.h:89:2: note: in expansion of macro '__ia64_atomic_const'
89 | __ia64_atomic_const(i) | ^~~~~~~~~~~~~~~~~~~
>> net/mac80211/sta_info.c:1929:16: note: in expansion of macro 'atomic_sub_return'
1929 | tx_pending = atomic_sub_return(tx_airtime,
| ^~~~~~~~~~~~~~~~~
arch/ia64/include/asm/atomic.h:72:8: warning: comparison is always false due to limited range of data type [-Wtype-limits]
72 | (i) == -1 || (i) == -4 || (i) == -8 || (i) == -16) : 0; | ^~
arch/ia64/include/asm/atomic.h:89:2: note: in expansion of macro '__ia64_atomic_const'
89 | __ia64_atomic_const(i) | ^~~~~~~~~~~~~~~~~~~
net/mac80211/sta_info.c:1938:15: note: in expansion of macro 'atomic_sub_return'
1938 | tx_pending = atomic_sub_return(tx_airtime,
| ^~~~~~~~~~~~~~~~~
arch/ia64/include/asm/atomic.h:72:21: warning: comparison is always false due to limited range of data type [-Wtype-limits]
72 | (i) == -1 || (i) == -4 || (i) == -8 || (i) == -16) : 0; | ^~
arch/ia64/include/asm/atomic.h:89:2: note: in expansion of macro '__ia64_atomic_const'
89 | __ia64_atomic_const(i) | ^~~~~~~~~~~~~~~~~~~
net/mac80211/sta_info.c:1938:15: note: in expansion of macro 'atomic_sub_return'
1938 | tx_pending = atomic_sub_return(tx_airtime,
| ^~~~~~~~~~~~~~~~~
arch/ia64/include/asm/atomic.h:72:34: warning: comparison is always false due to limited range of data type [-Wtype-limits]
72 | (i) == -1 || (i) == -4 || (i) == -8 || (i) == -16) : 0; | ^~
arch/ia64/include/asm/atomic.h:89:2: note: in expansion of macro '__ia64_atomic_const'
89 | __ia64_atomic_const(i) | ^~~~~~~~~~~~~~~~~~~
net/mac80211/sta_info.c:1938:15: note: in expansion of macro 'atomic_sub_return'
1938 | tx_pending = atomic_sub_return(tx_airtime,
| ^~~~~~~~~~~~~~~~~
arch/ia64/include/asm/atomic.h:72:47: warning: comparison is always false due to limited range of data type [-Wtype-limits]
72 | (i) == -1 || (i) == -4 || (i) == -8 || (i) == -16) : 0; | ^~
arch/ia64/include/asm/atomic.h:89:2: note: in expansion of macro '__ia64_atomic_const'
89 | __ia64_atomic_const(i) | ^~~~~~~~~~~~~~~~~~~
net/mac80211/sta_info.c:1938:15: note: in expansion of macro 'atomic_sub_return'
1938 | tx_pending = atomic_sub_return(tx_airtime,
| ^~~~~~~~~~~~~~~~~

vim +/atomic_add +1921 net/mac80211/sta_info.c

1912
1913 void ieee80211_sta_update_pending_airtime(struct ieee80211_local *local,
1914 struct sta_info *sta, u8 ac,
1915 u16 tx_airtime, bool tx_completed)
1916 {
1917 int tx_pending;
1918
1919 if (!tx_completed) {
1920 if (sta)
> 1921 atomic_add(tx_airtime,
1922 &sta->airtime[ac].aql_tx_pending);
1923
1924 atomic_add(tx_airtime, &local->aql_total_pending_airtime);
1925 return;
1926 }
1927
1928 if (sta) {
> 1929 tx_pending = atomic_sub_return(tx_airtime,
1930 &sta->airtime[ac].aql_tx_pending);
1931 if (WARN_ONCE(tx_pending < 0,
1932 "STA %pM AC %d txq pending airtime underflow: %u, %u",
1933 sta->addr, ac, tx_pending, tx_airtime))
1934 atomic_cmpxchg(&sta->airtime[ac].aql_tx_pending,
1935 tx_pending, 0);
1936 }
1937
1938 tx_pending = atomic_sub_return(tx_airtime,
1939 &local->aql_total_pending_airtime);
1940 if (WARN_ONCE(tx_pending < 0,
1941 "Device %s AC %d pending airtime underflow: %u, %u",
1942 wiphy_name(local->hw.wiphy), ac, tx_pending,
1943 tx_airtime))
1944 atomic_cmpxchg(&local->aql_total_pending_airtime,
1945 tx_pending, 0);
1946 }
1947

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

Attachment: .config.gz
Description: application/gzip