[csky-linux:v5.12-rc4-riscv-atomic-arch-v3 4/5] lib/atomic64_test.c:58:9: error: implicit declaration of function 'atomic64_fetch_and_acquire'; did you mean 'atomic64_fetch_add_acquire'?
by kernel test robot
tree: https://github.com/c-sky/csky-linux v5.12-rc4-riscv-atomic-arch-v3
head: 516baf028b48129e1941ad764ef9a13271830bdc
commit: d985500eec5b9fa31462e5aa2b712b719d0de356 [4/5] locking/atomics: Fixup GENERIC_ATOMIC64 conflict with atomic-arch-fallback.h
config: microblaze-randconfig-r023-20210419 (attached as .config)
compiler: microblaze-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
# https://github.com/c-sky/csky-linux/commit/d985500eec5b9fa31462e5aa2b712b...
git remote add csky-linux https://github.com/c-sky/csky-linux
git fetch --no-tags csky-linux v5.12-rc4-riscv-atomic-arch-v3
git checkout d985500eec5b9fa31462e5aa2b712b719d0de356
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross W=1 ARCH=microblaze
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All errors (new ones prefixed by >>):
In file included from include/linux/init.h:5,
from lib/atomic64_test.c:10:
lib/atomic64_test.c: In function 'test_atomic64':
>> lib/atomic64_test.c:49:9: error: implicit declaration of function 'atomic64_sub_return_acquire'; did you mean 'atomic_sub_return_acquire'? [-Werror=implicit-function-declaration]
49 | BUG_ON(atomic##bit##_##op(val, &v) != r); \
| ^~~~~~
include/linux/compiler.h:78:42: note: in definition of macro 'unlikely'
78 | # define unlikely(x) __builtin_expect(!!(x), 0)
| ^
lib/atomic64_test.c:49:2: note: in expansion of macro 'BUG_ON'
49 | BUG_ON(atomic##bit##_##op(val, &v) != r); \
| ^~~~~~
lib/atomic64_test.c:39:2: note: in expansion of macro 'TEST_RETURN'
39 | test(bit, op##_acquire, ##args); \
| ^~~~
lib/atomic64_test.c:64:2: note: in expansion of macro 'FAMILY_TEST'
64 | FAMILY_TEST(TEST_RETURN, bit, op, c_op, val); \
| ^~~~~~~~~~~
lib/atomic64_test.c:177:2: note: in expansion of macro 'RETURN_FAMILY_TEST'
177 | RETURN_FAMILY_TEST(64, sub_return, -=, onestwos);
| ^~~~~~~~~~~~~~~~~~
>> lib/atomic64_test.c:49:9: error: implicit declaration of function 'atomic64_sub_return_release'; did you mean 'atomic_sub_return_release'? [-Werror=implicit-function-declaration]
49 | BUG_ON(atomic##bit##_##op(val, &v) != r); \
| ^~~~~~
include/linux/compiler.h:78:42: note: in definition of macro 'unlikely'
78 | # define unlikely(x) __builtin_expect(!!(x), 0)
| ^
lib/atomic64_test.c:49:2: note: in expansion of macro 'BUG_ON'
49 | BUG_ON(atomic##bit##_##op(val, &v) != r); \
| ^~~~~~
lib/atomic64_test.c:40:2: note: in expansion of macro 'TEST_RETURN'
40 | test(bit, op##_release, ##args); \
| ^~~~
lib/atomic64_test.c:64:2: note: in expansion of macro 'FAMILY_TEST'
64 | FAMILY_TEST(TEST_RETURN, bit, op, c_op, val); \
| ^~~~~~~~~~~
lib/atomic64_test.c:177:2: note: in expansion of macro 'RETURN_FAMILY_TEST'
177 | RETURN_FAMILY_TEST(64, sub_return, -=, onestwos);
| ^~~~~~~~~~~~~~~~~~
>> lib/atomic64_test.c:49:9: error: implicit declaration of function 'atomic64_sub_return_relaxed'; did you mean 'atomic_sub_return_relaxed'? [-Werror=implicit-function-declaration]
49 | BUG_ON(atomic##bit##_##op(val, &v) != r); \
| ^~~~~~
include/linux/compiler.h:78:42: note: in definition of macro 'unlikely'
78 | # define unlikely(x) __builtin_expect(!!(x), 0)
| ^
lib/atomic64_test.c:49:2: note: in expansion of macro 'BUG_ON'
49 | BUG_ON(atomic##bit##_##op(val, &v) != r); \
| ^~~~~~
lib/atomic64_test.c:41:2: note: in expansion of macro 'TEST_RETURN'
41 | test(bit, op##_relaxed, ##args); \
| ^~~~
lib/atomic64_test.c:64:2: note: in expansion of macro 'FAMILY_TEST'
64 | FAMILY_TEST(TEST_RETURN, bit, op, c_op, val); \
| ^~~~~~~~~~~
lib/atomic64_test.c:177:2: note: in expansion of macro 'RETURN_FAMILY_TEST'
177 | RETURN_FAMILY_TEST(64, sub_return, -=, onestwos);
| ^~~~~~~~~~~~~~~~~~
>> lib/atomic64_test.c:58:9: error: implicit declaration of function 'atomic64_fetch_sub_acquire'; did you mean 'atomic_fetch_sub_acquire'? [-Werror=implicit-function-declaration]
58 | BUG_ON(atomic##bit##_##op(val, &v) != v0); \
| ^~~~~~
include/linux/compiler.h:78:42: note: in definition of macro 'unlikely'
78 | # define unlikely(x) __builtin_expect(!!(x), 0)
| ^
lib/atomic64_test.c:58:2: note: in expansion of macro 'BUG_ON'
58 | BUG_ON(atomic##bit##_##op(val, &v) != v0); \
| ^~~~~~
lib/atomic64_test.c:39:2: note: in expansion of macro 'TEST_FETCH'
39 | test(bit, op##_acquire, ##args); \
| ^~~~
lib/atomic64_test.c:69:2: note: in expansion of macro 'FAMILY_TEST'
69 | FAMILY_TEST(TEST_FETCH, bit, op, c_op, val); \
| ^~~~~~~~~~~
lib/atomic64_test.c:182:2: note: in expansion of macro 'FETCH_FAMILY_TEST'
182 | FETCH_FAMILY_TEST(64, fetch_sub, -=, onestwos);
| ^~~~~~~~~~~~~~~~~
>> lib/atomic64_test.c:58:9: error: implicit declaration of function 'atomic64_fetch_sub_release'; did you mean 'atomic_fetch_sub_release'? [-Werror=implicit-function-declaration]
58 | BUG_ON(atomic##bit##_##op(val, &v) != v0); \
| ^~~~~~
include/linux/compiler.h:78:42: note: in definition of macro 'unlikely'
78 | # define unlikely(x) __builtin_expect(!!(x), 0)
| ^
lib/atomic64_test.c:58:2: note: in expansion of macro 'BUG_ON'
58 | BUG_ON(atomic##bit##_##op(val, &v) != v0); \
| ^~~~~~
lib/atomic64_test.c:40:2: note: in expansion of macro 'TEST_FETCH'
40 | test(bit, op##_release, ##args); \
| ^~~~
lib/atomic64_test.c:69:2: note: in expansion of macro 'FAMILY_TEST'
69 | FAMILY_TEST(TEST_FETCH, bit, op, c_op, val); \
| ^~~~~~~~~~~
lib/atomic64_test.c:182:2: note: in expansion of macro 'FETCH_FAMILY_TEST'
182 | FETCH_FAMILY_TEST(64, fetch_sub, -=, onestwos);
| ^~~~~~~~~~~~~~~~~
>> lib/atomic64_test.c:58:9: error: implicit declaration of function 'atomic64_fetch_sub_relaxed'; did you mean 'atomic_fetch_sub_relaxed'? [-Werror=implicit-function-declaration]
58 | BUG_ON(atomic##bit##_##op(val, &v) != v0); \
| ^~~~~~
include/linux/compiler.h:78:42: note: in definition of macro 'unlikely'
78 | # define unlikely(x) __builtin_expect(!!(x), 0)
| ^
lib/atomic64_test.c:58:2: note: in expansion of macro 'BUG_ON'
58 | BUG_ON(atomic##bit##_##op(val, &v) != v0); \
| ^~~~~~
lib/atomic64_test.c:41:2: note: in expansion of macro 'TEST_FETCH'
41 | test(bit, op##_relaxed, ##args); \
| ^~~~
lib/atomic64_test.c:69:2: note: in expansion of macro 'FAMILY_TEST'
69 | FAMILY_TEST(TEST_FETCH, bit, op, c_op, val); \
| ^~~~~~~~~~~
lib/atomic64_test.c:182:2: note: in expansion of macro 'FETCH_FAMILY_TEST'
182 | FETCH_FAMILY_TEST(64, fetch_sub, -=, onestwos);
| ^~~~~~~~~~~~~~~~~
>> lib/atomic64_test.c:58:9: error: implicit declaration of function 'atomic64_fetch_or_acquire'; did you mean 'atomic_fetch_or_acquire'? [-Werror=implicit-function-declaration]
58 | BUG_ON(atomic##bit##_##op(val, &v) != v0); \
| ^~~~~~
include/linux/compiler.h:78:42: note: in definition of macro 'unlikely'
78 | # define unlikely(x) __builtin_expect(!!(x), 0)
| ^
lib/atomic64_test.c:58:2: note: in expansion of macro 'BUG_ON'
58 | BUG_ON(atomic##bit##_##op(val, &v) != v0); \
| ^~~~~~
lib/atomic64_test.c:39:2: note: in expansion of macro 'TEST_FETCH'
39 | test(bit, op##_acquire, ##args); \
| ^~~~
lib/atomic64_test.c:69:2: note: in expansion of macro 'FAMILY_TEST'
69 | FAMILY_TEST(TEST_FETCH, bit, op, c_op, val); \
| ^~~~~~~~~~~
lib/atomic64_test.c:185:2: note: in expansion of macro 'FETCH_FAMILY_TEST'
185 | FETCH_FAMILY_TEST(64, fetch_or, |=, v1);
| ^~~~~~~~~~~~~~~~~
>> lib/atomic64_test.c:58:9: error: implicit declaration of function 'atomic64_fetch_or_release'; did you mean 'atomic_fetch_or_release'? [-Werror=implicit-function-declaration]
58 | BUG_ON(atomic##bit##_##op(val, &v) != v0); \
| ^~~~~~
include/linux/compiler.h:78:42: note: in definition of macro 'unlikely'
78 | # define unlikely(x) __builtin_expect(!!(x), 0)
| ^
lib/atomic64_test.c:58:2: note: in expansion of macro 'BUG_ON'
58 | BUG_ON(atomic##bit##_##op(val, &v) != v0); \
| ^~~~~~
lib/atomic64_test.c:40:2: note: in expansion of macro 'TEST_FETCH'
40 | test(bit, op##_release, ##args); \
| ^~~~
lib/atomic64_test.c:69:2: note: in expansion of macro 'FAMILY_TEST'
69 | FAMILY_TEST(TEST_FETCH, bit, op, c_op, val); \
| ^~~~~~~~~~~
lib/atomic64_test.c:185:2: note: in expansion of macro 'FETCH_FAMILY_TEST'
185 | FETCH_FAMILY_TEST(64, fetch_or, |=, v1);
| ^~~~~~~~~~~~~~~~~
>> lib/atomic64_test.c:58:9: error: implicit declaration of function 'atomic64_fetch_or_relaxed'; did you mean 'atomic_fetch_or_relaxed'? [-Werror=implicit-function-declaration]
58 | BUG_ON(atomic##bit##_##op(val, &v) != v0); \
| ^~~~~~
include/linux/compiler.h:78:42: note: in definition of macro 'unlikely'
78 | # define unlikely(x) __builtin_expect(!!(x), 0)
| ^
lib/atomic64_test.c:58:2: note: in expansion of macro 'BUG_ON'
58 | BUG_ON(atomic##bit##_##op(val, &v) != v0); \
| ^~~~~~
lib/atomic64_test.c:41:2: note: in expansion of macro 'TEST_FETCH'
41 | test(bit, op##_relaxed, ##args); \
| ^~~~
lib/atomic64_test.c:69:2: note: in expansion of macro 'FAMILY_TEST'
69 | FAMILY_TEST(TEST_FETCH, bit, op, c_op, val); \
| ^~~~~~~~~~~
lib/atomic64_test.c:185:2: note: in expansion of macro 'FETCH_FAMILY_TEST'
185 | FETCH_FAMILY_TEST(64, fetch_or, |=, v1);
| ^~~~~~~~~~~~~~~~~
>> lib/atomic64_test.c:58:9: error: implicit declaration of function 'atomic64_fetch_and_acquire'; did you mean 'atomic64_fetch_add_acquire'? [-Werror=implicit-function-declaration]
58 | BUG_ON(atomic##bit##_##op(val, &v) != v0); \
| ^~~~~~
include/linux/compiler.h:78:42: note: in definition of macro 'unlikely'
78 | # define unlikely(x) __builtin_expect(!!(x), 0)
| ^
lib/atomic64_test.c:58:2: note: in expansion of macro 'BUG_ON'
58 | BUG_ON(atomic##bit##_##op(val, &v) != v0); \
| ^~~~~~
lib/atomic64_test.c:39:2: note: in expansion of macro 'TEST_FETCH'
39 | test(bit, op##_acquire, ##args); \
| ^~~~
lib/atomic64_test.c:69:2: note: in expansion of macro 'FAMILY_TEST'
69 | FAMILY_TEST(TEST_FETCH, bit, op, c_op, val); \
| ^~~~~~~~~~~
lib/atomic64_test.c:186:2: note: in expansion of macro 'FETCH_FAMILY_TEST'
186 | FETCH_FAMILY_TEST(64, fetch_and, &=, v1);
| ^~~~~~~~~~~~~~~~~
>> lib/atomic64_test.c:58:9: error: implicit declaration of function 'atomic64_fetch_and_release'; did you mean 'atomic64_fetch_add_release'? [-Werror=implicit-function-declaration]
58 | BUG_ON(atomic##bit##_##op(val, &v) != v0); \
| ^~~~~~
include/linux/compiler.h:78:42: note: in definition of macro 'unlikely'
78 | # define unlikely(x) __builtin_expect(!!(x), 0)
| ^
lib/atomic64_test.c:58:2: note: in expansion of macro 'BUG_ON'
58 | BUG_ON(atomic##bit##_##op(val, &v) != v0); \
| ^~~~~~
lib/atomic64_test.c:40:2: note: in expansion of macro 'TEST_FETCH'
40 | test(bit, op##_release, ##args); \
| ^~~~
lib/atomic64_test.c:69:2: note: in expansion of macro 'FAMILY_TEST'
69 | FAMILY_TEST(TEST_FETCH, bit, op, c_op, val); \
| ^~~~~~~~~~~
lib/atomic64_test.c:186:2: note: in expansion of macro 'FETCH_FAMILY_TEST'
186 | FETCH_FAMILY_TEST(64, fetch_and, &=, v1);
| ^~~~~~~~~~~~~~~~~
>> lib/atomic64_test.c:58:9: error: implicit declaration of function 'atomic64_fetch_and_relaxed'; did you mean 'atomic64_fetch_add_relaxed'? [-Werror=implicit-function-declaration]
58 | BUG_ON(atomic##bit##_##op(val, &v) != v0); \
| ^~~~~~
include/linux/compiler.h:78:42: note: in definition of macro 'unlikely'
78 | # define unlikely(x) __builtin_expect(!!(x), 0)
| ^
lib/atomic64_test.c:58:2: note: in expansion of macro 'BUG_ON'
58 | BUG_ON(atomic##bit##_##op(val, &v) != v0); \
| ^~~~~~
lib/atomic64_test.c:41:2: note: in expansion of macro 'TEST_FETCH'
41 | test(bit, op##_relaxed, ##args); \
| ^~~~
lib/atomic64_test.c:69:2: note: in expansion of macro 'FAMILY_TEST'
69 | FAMILY_TEST(TEST_FETCH, bit, op, c_op, val); \
| ^~~~~~~~~~~
lib/atomic64_test.c:186:2: note: in expansion of macro 'FETCH_FAMILY_TEST'
186 | FETCH_FAMILY_TEST(64, fetch_and, &=, v1);
| ^~~~~~~~~~~~~~~~~
>> lib/atomic64_test.c:58:9: error: implicit declaration of function 'atomic64_fetch_andnot_acquire'; did you mean 'atomic_fetch_andnot_acquire'? [-Werror=implicit-function-declaration]
58 | BUG_ON(atomic##bit##_##op(val, &v) != v0); \
| ^~~~~~
include/linux/compiler.h:78:42: note: in definition of macro 'unlikely'
78 | # define unlikely(x) __builtin_expect(!!(x), 0)
| ^
lib/atomic64_test.c:58:2: note: in expansion of macro 'BUG_ON'
58 | BUG_ON(atomic##bit##_##op(val, &v) != v0); \
| ^~~~~~
lib/atomic64_test.c:39:2: note: in expansion of macro 'TEST_FETCH'
39 | test(bit, op##_acquire, ##args); \
| ^~~~
lib/atomic64_test.c:69:2: note: in expansion of macro 'FAMILY_TEST'
69 | FAMILY_TEST(TEST_FETCH, bit, op, c_op, val); \
| ^~~~~~~~~~~
lib/atomic64_test.c:187:2: note: in expansion of macro 'FETCH_FAMILY_TEST'
187 | FETCH_FAMILY_TEST(64, fetch_andnot, &= ~, v1);
| ^~~~~~~~~~~~~~~~~
>> lib/atomic64_test.c:58:9: error: implicit declaration of function 'atomic64_fetch_andnot_release'; did you mean 'atomic_fetch_andnot_release'? [-Werror=implicit-function-declaration]
58 | BUG_ON(atomic##bit##_##op(val, &v) != v0); \
| ^~~~~~
include/linux/compiler.h:78:42: note: in definition of macro 'unlikely'
78 | # define unlikely(x) __builtin_expect(!!(x), 0)
| ^
lib/atomic64_test.c:58:2: note: in expansion of macro 'BUG_ON'
58 | BUG_ON(atomic##bit##_##op(val, &v) != v0); \
| ^~~~~~
lib/atomic64_test.c:40:2: note: in expansion of macro 'TEST_FETCH'
40 | test(bit, op##_release, ##args); \
| ^~~~
lib/atomic64_test.c:69:2: note: in expansion of macro 'FAMILY_TEST'
69 | FAMILY_TEST(TEST_FETCH, bit, op, c_op, val); \
| ^~~~~~~~~~~
lib/atomic64_test.c:187:2: note: in expansion of macro 'FETCH_FAMILY_TEST'
187 | FETCH_FAMILY_TEST(64, fetch_andnot, &= ~, v1);
| ^~~~~~~~~~~~~~~~~
>> lib/atomic64_test.c:58:9: error: implicit declaration of function 'atomic64_fetch_andnot_relaxed'; did you mean 'atomic_fetch_andnot_relaxed'? [-Werror=implicit-function-declaration]
58 | BUG_ON(atomic##bit##_##op(val, &v) != v0); \
| ^~~~~~
include/linux/compiler.h:78:42: note: in definition of macro 'unlikely'
78 | # define unlikely(x) __builtin_expect(!!(x), 0)
| ^
lib/atomic64_test.c:58:2: note: in expansion of macro 'BUG_ON'
58 | BUG_ON(atomic##bit##_##op(val, &v) != v0); \
| ^~~~~~
lib/atomic64_test.c:41:2: note: in expansion of macro 'TEST_FETCH'
41 | test(bit, op##_relaxed, ##args); \
| ^~~~
lib/atomic64_test.c:69:2: note: in expansion of macro 'FAMILY_TEST'
69 | FAMILY_TEST(TEST_FETCH, bit, op, c_op, val); \
| ^~~~~~~~~~~
lib/atomic64_test.c:187:2: note: in expansion of macro 'FETCH_FAMILY_TEST'
187 | FETCH_FAMILY_TEST(64, fetch_andnot, &= ~, v1);
| ^~~~~~~~~~~~~~~~~
>> lib/atomic64_test.c:58:9: error: implicit declaration of function 'atomic64_fetch_xor_acquire'; did you mean 'atomic_fetch_xor_acquire'? [-Werror=implicit-function-declaration]
58 | BUG_ON(atomic##bit##_##op(val, &v) != v0); \
| ^~~~~~
include/linux/compiler.h:78:42: note: in definition of macro 'unlikely'
78 | # define unlikely(x) __builtin_expect(!!(x), 0)
| ^
lib/atomic64_test.c:58:2: note: in expansion of macro 'BUG_ON'
58 | BUG_ON(atomic##bit##_##op(val, &v) != v0); \
| ^~~~~~
lib/atomic64_test.c:39:2: note: in expansion of macro 'TEST_FETCH'
39 | test(bit, op##_acquire, ##args); \
| ^~~~
lib/atomic64_test.c:69:2: note: in expansion of macro 'FAMILY_TEST'
69 | FAMILY_TEST(TEST_FETCH, bit, op, c_op, val); \
| ^~~~~~~~~~~
lib/atomic64_test.c:188:2: note: in expansion of macro 'FETCH_FAMILY_TEST'
188 | FETCH_FAMILY_TEST(64, fetch_xor, ^=, v1);
| ^~~~~~~~~~~~~~~~~
>> lib/atomic64_test.c:58:9: error: implicit declaration of function 'atomic64_fetch_xor_release'; did you mean 'atomic_fetch_xor_release'? [-Werror=implicit-function-declaration]
58 | BUG_ON(atomic##bit##_##op(val, &v) != v0); \
| ^~~~~~
include/linux/compiler.h:78:42: note: in definition of macro 'unlikely'
78 | # define unlikely(x) __builtin_expect(!!(x), 0)
| ^
lib/atomic64_test.c:58:2: note: in expansion of macro 'BUG_ON'
58 | BUG_ON(atomic##bit##_##op(val, &v) != v0); \
| ^~~~~~
lib/atomic64_test.c:40:2: note: in expansion of macro 'TEST_FETCH'
40 | test(bit, op##_release, ##args); \
| ^~~~
lib/atomic64_test.c:69:2: note: in expansion of macro 'FAMILY_TEST'
69 | FAMILY_TEST(TEST_FETCH, bit, op, c_op, val); \
| ^~~~~~~~~~~
lib/atomic64_test.c:188:2: note: in expansion of macro 'FETCH_FAMILY_TEST'
188 | FETCH_FAMILY_TEST(64, fetch_xor, ^=, v1);
| ^~~~~~~~~~~~~~~~~
>> lib/atomic64_test.c:58:9: error: implicit declaration of function 'atomic64_fetch_xor_relaxed'; did you mean 'atomic_fetch_xor_relaxed'? [-Werror=implicit-function-declaration]
58 | BUG_ON(atomic##bit##_##op(val, &v) != v0); \
| ^~~~~~
include/linux/compiler.h:78:42: note: in definition of macro 'unlikely'
78 | # define unlikely(x) __builtin_expect(!!(x), 0)
| ^
lib/atomic64_test.c:58:2: note: in expansion of macro 'BUG_ON'
58 | BUG_ON(atomic##bit##_##op(val, &v) != v0); \
| ^~~~~~
lib/atomic64_test.c:41:2: note: in expansion of macro 'TEST_FETCH'
41 | test(bit, op##_relaxed, ##args); \
| ^~~~
lib/atomic64_test.c:69:2: note: in expansion of macro 'FAMILY_TEST'
69 | FAMILY_TEST(TEST_FETCH, bit, op, c_op, val); \
| ^~~~~~~~~~~
lib/atomic64_test.c:188:2: note: in expansion of macro 'FETCH_FAMILY_TEST'
188 | FETCH_FAMILY_TEST(64, fetch_xor, ^=, v1);
| ^~~~~~~~~~~~~~~~~
>> lib/atomic64_test.c:75:9: error: implicit declaration of function 'atomic64_inc_return_acquire'; did you mean 'atomic_inc_return_acquire'? [-Werror=implicit-function-declaration]
75 | BUG_ON(atomic##bit##_##op(&v, ##args) != ret); \
| ^~~~~~
include/linux/compiler.h:78:42: note: in definition of macro 'unlikely'
78 | # define unlikely(x) __builtin_expect(!!(x), 0)
| ^
lib/atomic64_test.c:75:2: note: in expansion of macro 'BUG_ON'
75 | BUG_ON(atomic##bit##_##op(&v, ##args) != ret); \
| ^~~~~~
lib/atomic64_test.c:39:2: note: in expansion of macro 'TEST_ARGS'
39 | test(bit, op##_acquire, ##args); \
| ^~~~
lib/atomic64_test.c:94:2: note: in expansion of macro 'FAMILY_TEST'
94 | FAMILY_TEST(TEST_ARGS, bit, inc_return, \
| ^~~~~~~~~~~
lib/atomic64_test.c:200:2: note: in expansion of macro 'INC_RETURN_FAMILY_TEST'
200 | INC_RETURN_FAMILY_TEST(64, v0);
| ^~~~~~~~~~~~~~~~~~~~~~
>> lib/atomic64_test.c:75:9: error: implicit declaration of function 'atomic64_inc_return_release'; did you mean 'atomic_inc_return_release'? [-Werror=implicit-function-declaration]
75 | BUG_ON(atomic##bit##_##op(&v, ##args) != ret); \
| ^~~~~~
include/linux/compiler.h:78:42: note: in definition of macro 'unlikely'
78 | # define unlikely(x) __builtin_expect(!!(x), 0)
| ^
lib/atomic64_test.c:75:2: note: in expansion of macro 'BUG_ON'
75 | BUG_ON(atomic##bit##_##op(&v, ##args) != ret); \
| ^~~~~~
lib/atomic64_test.c:40:2: note: in expansion of macro 'TEST_ARGS'
40 | test(bit, op##_release, ##args); \
| ^~~~
lib/atomic64_test.c:94:2: note: in expansion of macro 'FAMILY_TEST'
94 | FAMILY_TEST(TEST_ARGS, bit, inc_return, \
| ^~~~~~~~~~~
lib/atomic64_test.c:200:2: note: in expansion of macro 'INC_RETURN_FAMILY_TEST'
200 | INC_RETURN_FAMILY_TEST(64, v0);
| ^~~~~~~~~~~~~~~~~~~~~~
lib/atomic64_test.c:75:9: error: implicit declaration of function 'atomic64_inc_return_relaxed'; did you mean 'atomic_inc_return_relaxed'? [-Werror=implicit-function-declaration]
75 | BUG_ON(atomic##bit##_##op(&v, ##args) != ret); \
| ^~~~~~
include/linux/compiler.h:78:42: note: in definition of macro 'unlikely'
78 | # define unlikely(x) __builtin_expect(!!(x), 0)
| ^
lib/atomic64_test.c:75:2: note: in expansion of macro 'BUG_ON'
75 | BUG_ON(atomic##bit##_##op(&v, ##args) != ret); \
| ^~~~~~
lib/atomic64_test.c:41:2: note: in expansion of macro 'TEST_ARGS'
41 | test(bit, op##_relaxed, ##args); \
| ^~~~
lib/atomic64_test.c:94:2: note: in expansion of macro 'FAMILY_TEST'
94 | FAMILY_TEST(TEST_ARGS, bit, inc_return, \
| ^~~~~~~~~~~
lib/atomic64_test.c:200:2: note: in expansion of macro 'INC_RETURN_FAMILY_TEST'
200 | INC_RETURN_FAMILY_TEST(64, v0);
| ^~~~~~~~~~~~~~~~~~~~~~
lib/atomic64_test.c:75:9: error: implicit declaration of function 'atomic64_dec_return_acquire'; did you mean 'atomic_dec_return_acquire'? [-Werror=implicit-function-declaration]
75 | BUG_ON(atomic##bit##_##op(&v, ##args) != ret); \
| ^~~~~~
include/linux/compiler.h:78:42: note: in definition of macro 'unlikely'
78 | # define unlikely(x) __builtin_expect(!!(x), 0)
| ^
lib/atomic64_test.c:75:2: note: in expansion of macro 'BUG_ON'
75 | BUG_ON(atomic##bit##_##op(&v, ##args) != ret); \
| ^~~~~~
lib/atomic64_test.c:39:2: note: in expansion of macro 'TEST_ARGS'
39 | test(bit, op##_acquire, ##args); \
| ^~~~
lib/atomic64_test.c:100:2: note: in expansion of macro 'FAMILY_TEST'
100 | FAMILY_TEST(TEST_ARGS, bit, dec_return, \
| ^~~~~~~~~~~
lib/atomic64_test.c:201:2: note: in expansion of macro 'DEC_RETURN_FAMILY_TEST'
201 | DEC_RETURN_FAMILY_TEST(64, v0);
| ^~~~~~~~~~~~~~~~~~~~~~
lib/atomic64_test.c:75:9: error: implicit declaration of function 'atomic64_dec_return_release'; did you mean 'atomic_dec_return_release'? [-Werror=implicit-function-declaration]
75 | BUG_ON(atomic##bit##_##op(&v, ##args) != ret); \
| ^~~~~~
include/linux/compiler.h:78:42: note: in definition of macro 'unlikely'
78 | # define unlikely(x) __builtin_expect(!!(x), 0)
| ^
lib/atomic64_test.c:75:2: note: in expansion of macro 'BUG_ON'
75 | BUG_ON(atomic##bit##_##op(&v, ##args) != ret); \
| ^~~~~~
lib/atomic64_test.c:40:2: note: in expansion of macro 'TEST_ARGS'
40 | test(bit, op##_release, ##args); \
| ^~~~
lib/atomic64_test.c:100:2: note: in expansion of macro 'FAMILY_TEST'
100 | FAMILY_TEST(TEST_ARGS, bit, dec_return, \
| ^~~~~~~~~~~
lib/atomic64_test.c:201:2: note: in expansion of macro 'DEC_RETURN_FAMILY_TEST'
201 | DEC_RETURN_FAMILY_TEST(64, v0);
| ^~~~~~~~~~~~~~~~~~~~~~
lib/atomic64_test.c:75:9: error: implicit declaration of function 'atomic64_dec_return_relaxed'; did you mean 'atomic_dec_return_relaxed'? [-Werror=implicit-function-declaration]
75 | BUG_ON(atomic##bit##_##op(&v, ##args) != ret); \
| ^~~~~~
include/linux/compiler.h:78:42: note: in definition of macro 'unlikely'
78 | # define unlikely(x) __builtin_expect(!!(x), 0)
| ^
lib/atomic64_test.c:75:2: note: in expansion of macro 'BUG_ON'
75 | BUG_ON(atomic##bit##_##op(&v, ##args) != ret); \
| ^~~~~~
lib/atomic64_test.c:41:2: note: in expansion of macro 'TEST_ARGS'
41 | test(bit, op##_relaxed, ##args); \
| ^~~~
lib/atomic64_test.c:100:2: note: in expansion of macro 'FAMILY_TEST'
100 | FAMILY_TEST(TEST_ARGS, bit, dec_return, \
| ^~~~~~~~~~~
lib/atomic64_test.c:201:2: note: in expansion of macro 'DEC_RETURN_FAMILY_TEST'
201 | DEC_RETURN_FAMILY_TEST(64, v0);
| ^~~~~~~~~~~~~~~~~~~~~~
lib/atomic64_test.c:207:9: error: implicit declaration of function 'atomic64_add_unless'; did you mean 'atomic_add_unless'? [-Werror=implicit-function-declaration]
207 | BUG_ON(atomic64_add_unless(&v, one, v0));
| ^~~~~~~~~~~~~~~~~~~
include/linux/compiler.h:78:42: note: in definition of macro 'unlikely'
78 | # define unlikely(x) __builtin_expect(!!(x), 0)
| ^
lib/atomic64_test.c:207:2: note: in expansion of macro 'BUG_ON'
207 | BUG_ON(atomic64_add_unless(&v, one, v0));
| ^~~~~~
lib/atomic64_test.c:229:10: error: implicit declaration of function 'atomic64_inc_not_zero'; did you mean 'atomic_inc_not_zero'? [-Werror=implicit-function-declaration]
229 | BUG_ON(!atomic64_inc_not_zero(&v));
vim +58 lib/atomic64_test.c
978e5a3692c3b6 Boqun Feng 2015-11-04 43
978e5a3692c3b6 Boqun Feng 2015-11-04 44 #define TEST_RETURN(bit, op, c_op, val) \
978e5a3692c3b6 Boqun Feng 2015-11-04 45 do { \
978e5a3692c3b6 Boqun Feng 2015-11-04 46 atomic##bit##_set(&v, v0); \
978e5a3692c3b6 Boqun Feng 2015-11-04 47 r = v0; \
978e5a3692c3b6 Boqun Feng 2015-11-04 48 r c_op val; \
978e5a3692c3b6 Boqun Feng 2015-11-04 @49 BUG_ON(atomic##bit##_##op(val, &v) != r); \
978e5a3692c3b6 Boqun Feng 2015-11-04 50 BUG_ON(atomic##bit##_read(&v) != r); \
978e5a3692c3b6 Boqun Feng 2015-11-04 51 } while (0)
978e5a3692c3b6 Boqun Feng 2015-11-04 52
28aa2bda2211f4 Peter Zijlstra 2016-04-18 53 #define TEST_FETCH(bit, op, c_op, val) \
28aa2bda2211f4 Peter Zijlstra 2016-04-18 54 do { \
28aa2bda2211f4 Peter Zijlstra 2016-04-18 55 atomic##bit##_set(&v, v0); \
28aa2bda2211f4 Peter Zijlstra 2016-04-18 56 r = v0; \
28aa2bda2211f4 Peter Zijlstra 2016-04-18 57 r c_op val; \
28aa2bda2211f4 Peter Zijlstra 2016-04-18 @58 BUG_ON(atomic##bit##_##op(val, &v) != v0); \
28aa2bda2211f4 Peter Zijlstra 2016-04-18 59 BUG_ON(atomic##bit##_read(&v) != r); \
28aa2bda2211f4 Peter Zijlstra 2016-04-18 60 } while (0)
28aa2bda2211f4 Peter Zijlstra 2016-04-18 61
978e5a3692c3b6 Boqun Feng 2015-11-04 62 #define RETURN_FAMILY_TEST(bit, op, c_op, val) \
978e5a3692c3b6 Boqun Feng 2015-11-04 63 do { \
978e5a3692c3b6 Boqun Feng 2015-11-04 64 FAMILY_TEST(TEST_RETURN, bit, op, c_op, val); \
978e5a3692c3b6 Boqun Feng 2015-11-04 65 } while (0)
978e5a3692c3b6 Boqun Feng 2015-11-04 66
28aa2bda2211f4 Peter Zijlstra 2016-04-18 67 #define FETCH_FAMILY_TEST(bit, op, c_op, val) \
28aa2bda2211f4 Peter Zijlstra 2016-04-18 68 do { \
28aa2bda2211f4 Peter Zijlstra 2016-04-18 69 FAMILY_TEST(TEST_FETCH, bit, op, c_op, val); \
28aa2bda2211f4 Peter Zijlstra 2016-04-18 70 } while (0)
28aa2bda2211f4 Peter Zijlstra 2016-04-18 71
978e5a3692c3b6 Boqun Feng 2015-11-04 72 #define TEST_ARGS(bit, op, init, ret, expect, args...) \
978e5a3692c3b6 Boqun Feng 2015-11-04 73 do { \
978e5a3692c3b6 Boqun Feng 2015-11-04 74 atomic##bit##_set(&v, init); \
978e5a3692c3b6 Boqun Feng 2015-11-04 @75 BUG_ON(atomic##bit##_##op(&v, ##args) != ret); \
978e5a3692c3b6 Boqun Feng 2015-11-04 76 BUG_ON(atomic##bit##_read(&v) != expect); \
978e5a3692c3b6 Boqun Feng 2015-11-04 77 } while (0)
978e5a3692c3b6 Boqun Feng 2015-11-04 78
978e5a3692c3b6 Boqun Feng 2015-11-04 79 #define XCHG_FAMILY_TEST(bit, init, new) \
978e5a3692c3b6 Boqun Feng 2015-11-04 80 do { \
978e5a3692c3b6 Boqun Feng 2015-11-04 81 FAMILY_TEST(TEST_ARGS, bit, xchg, init, init, new, new); \
978e5a3692c3b6 Boqun Feng 2015-11-04 82 } while (0)
978e5a3692c3b6 Boqun Feng 2015-11-04 83
978e5a3692c3b6 Boqun Feng 2015-11-04 84 #define CMPXCHG_FAMILY_TEST(bit, init, new, wrong) \
978e5a3692c3b6 Boqun Feng 2015-11-04 85 do { \
978e5a3692c3b6 Boqun Feng 2015-11-04 86 FAMILY_TEST(TEST_ARGS, bit, cmpxchg, \
978e5a3692c3b6 Boqun Feng 2015-11-04 87 init, init, new, init, new); \
978e5a3692c3b6 Boqun Feng 2015-11-04 88 FAMILY_TEST(TEST_ARGS, bit, cmpxchg, \
978e5a3692c3b6 Boqun Feng 2015-11-04 89 init, init, init, wrong, new); \
978e5a3692c3b6 Boqun Feng 2015-11-04 90 } while (0)
978e5a3692c3b6 Boqun Feng 2015-11-04 91
978e5a3692c3b6 Boqun Feng 2015-11-04 92 #define INC_RETURN_FAMILY_TEST(bit, i) \
978e5a3692c3b6 Boqun Feng 2015-11-04 93 do { \
978e5a3692c3b6 Boqun Feng 2015-11-04 94 FAMILY_TEST(TEST_ARGS, bit, inc_return, \
978e5a3692c3b6 Boqun Feng 2015-11-04 95 i, (i) + one, (i) + one); \
978e5a3692c3b6 Boqun Feng 2015-11-04 96 } while (0)
978e5a3692c3b6 Boqun Feng 2015-11-04 97
978e5a3692c3b6 Boqun Feng 2015-11-04 98 #define DEC_RETURN_FAMILY_TEST(bit, i) \
978e5a3692c3b6 Boqun Feng 2015-11-04 99 do { \
978e5a3692c3b6 Boqun Feng 2015-11-04 100 FAMILY_TEST(TEST_ARGS, bit, dec_return, \
978e5a3692c3b6 Boqun Feng 2015-11-04 101 i, (i) - one, (i) - one); \
978e5a3692c3b6 Boqun Feng 2015-11-04 102 } while (0)
978e5a3692c3b6 Boqun Feng 2015-11-04 103
41b9e9fcc1c44b Peter Zijlstra 2015-07-13 104 static __init void test_atomic(void)
41b9e9fcc1c44b Peter Zijlstra 2015-07-13 105 {
41b9e9fcc1c44b Peter Zijlstra 2015-07-13 106 int v0 = 0xaaa31337;
41b9e9fcc1c44b Peter Zijlstra 2015-07-13 107 int v1 = 0xdeadbeef;
41b9e9fcc1c44b Peter Zijlstra 2015-07-13 108 int onestwos = 0x11112222;
41b9e9fcc1c44b Peter Zijlstra 2015-07-13 109 int one = 1;
41b9e9fcc1c44b Peter Zijlstra 2015-07-13 110
41b9e9fcc1c44b Peter Zijlstra 2015-07-13 111 atomic_t v;
41b9e9fcc1c44b Peter Zijlstra 2015-07-13 112 int r;
41b9e9fcc1c44b Peter Zijlstra 2015-07-13 113
41b9e9fcc1c44b Peter Zijlstra 2015-07-13 114 TEST(, add, +=, onestwos);
41b9e9fcc1c44b Peter Zijlstra 2015-07-13 115 TEST(, add, +=, -one);
41b9e9fcc1c44b Peter Zijlstra 2015-07-13 116 TEST(, sub, -=, onestwos);
41b9e9fcc1c44b Peter Zijlstra 2015-07-13 117 TEST(, sub, -=, -one);
41b9e9fcc1c44b Peter Zijlstra 2015-07-13 118 TEST(, or, |=, v1);
41b9e9fcc1c44b Peter Zijlstra 2015-07-13 119 TEST(, and, &=, v1);
41b9e9fcc1c44b Peter Zijlstra 2015-07-13 120 TEST(, xor, ^=, v1);
41b9e9fcc1c44b Peter Zijlstra 2015-07-13 121 TEST(, andnot, &= ~, v1);
978e5a3692c3b6 Boqun Feng 2015-11-04 122
978e5a3692c3b6 Boqun Feng 2015-11-04 123 RETURN_FAMILY_TEST(, add_return, +=, onestwos);
978e5a3692c3b6 Boqun Feng 2015-11-04 124 RETURN_FAMILY_TEST(, add_return, +=, -one);
978e5a3692c3b6 Boqun Feng 2015-11-04 125 RETURN_FAMILY_TEST(, sub_return, -=, onestwos);
978e5a3692c3b6 Boqun Feng 2015-11-04 126 RETURN_FAMILY_TEST(, sub_return, -=, -one);
978e5a3692c3b6 Boqun Feng 2015-11-04 127
28aa2bda2211f4 Peter Zijlstra 2016-04-18 128 FETCH_FAMILY_TEST(, fetch_add, +=, onestwos);
28aa2bda2211f4 Peter Zijlstra 2016-04-18 129 FETCH_FAMILY_TEST(, fetch_add, +=, -one);
28aa2bda2211f4 Peter Zijlstra 2016-04-18 130 FETCH_FAMILY_TEST(, fetch_sub, -=, onestwos);
28aa2bda2211f4 Peter Zijlstra 2016-04-18 131 FETCH_FAMILY_TEST(, fetch_sub, -=, -one);
28aa2bda2211f4 Peter Zijlstra 2016-04-18 132
28aa2bda2211f4 Peter Zijlstra 2016-04-18 133 FETCH_FAMILY_TEST(, fetch_or, |=, v1);
28aa2bda2211f4 Peter Zijlstra 2016-04-18 134 FETCH_FAMILY_TEST(, fetch_and, &=, v1);
28aa2bda2211f4 Peter Zijlstra 2016-04-18 135 FETCH_FAMILY_TEST(, fetch_andnot, &= ~, v1);
28aa2bda2211f4 Peter Zijlstra 2016-04-18 136 FETCH_FAMILY_TEST(, fetch_xor, ^=, v1);
28aa2bda2211f4 Peter Zijlstra 2016-04-18 137
978e5a3692c3b6 Boqun Feng 2015-11-04 138 INC_RETURN_FAMILY_TEST(, v0);
978e5a3692c3b6 Boqun Feng 2015-11-04 139 DEC_RETURN_FAMILY_TEST(, v0);
978e5a3692c3b6 Boqun Feng 2015-11-04 140
978e5a3692c3b6 Boqun Feng 2015-11-04 141 XCHG_FAMILY_TEST(, v0, v1);
978e5a3692c3b6 Boqun Feng 2015-11-04 142 CMPXCHG_FAMILY_TEST(, v0, v1, onestwos);
978e5a3692c3b6 Boqun Feng 2015-11-04 143
41b9e9fcc1c44b Peter Zijlstra 2015-07-13 144 }
41b9e9fcc1c44b Peter Zijlstra 2015-07-13 145
86a8938078a8bb Luca Barbieri 2010-02-24 146 #define INIT(c) do { atomic64_set(&v, c); r = c; } while (0)
41b9e9fcc1c44b Peter Zijlstra 2015-07-13 147 static __init void test_atomic64(void)
86a8938078a8bb Luca Barbieri 2010-02-24 148 {
86a8938078a8bb Luca Barbieri 2010-02-24 149 long long v0 = 0xaaa31337c001d00dLL;
86a8938078a8bb Luca Barbieri 2010-02-24 150 long long v1 = 0xdeadbeefdeafcafeLL;
86a8938078a8bb Luca Barbieri 2010-02-24 151 long long v2 = 0xfaceabadf00df001LL;
ffba19ccae8d98 Michael Ellerman 2017-07-14 152 long long v3 = 0x8000000000000000LL;
86a8938078a8bb Luca Barbieri 2010-02-24 153 long long onestwos = 0x1111111122222222LL;
86a8938078a8bb Luca Barbieri 2010-02-24 154 long long one = 1LL;
ffba19ccae8d98 Michael Ellerman 2017-07-14 155 int r_int;
86a8938078a8bb Luca Barbieri 2010-02-24 156
86a8938078a8bb Luca Barbieri 2010-02-24 157 atomic64_t v = ATOMIC64_INIT(v0);
86a8938078a8bb Luca Barbieri 2010-02-24 158 long long r = v0;
86a8938078a8bb Luca Barbieri 2010-02-24 159 BUG_ON(v.counter != r);
86a8938078a8bb Luca Barbieri 2010-02-24 160
86a8938078a8bb Luca Barbieri 2010-02-24 161 atomic64_set(&v, v1);
86a8938078a8bb Luca Barbieri 2010-02-24 162 r = v1;
86a8938078a8bb Luca Barbieri 2010-02-24 163 BUG_ON(v.counter != r);
86a8938078a8bb Luca Barbieri 2010-02-24 164 BUG_ON(atomic64_read(&v) != r);
86a8938078a8bb Luca Barbieri 2010-02-24 165
41b9e9fcc1c44b Peter Zijlstra 2015-07-13 166 TEST(64, add, +=, onestwos);
41b9e9fcc1c44b Peter Zijlstra 2015-07-13 167 TEST(64, add, +=, -one);
41b9e9fcc1c44b Peter Zijlstra 2015-07-13 168 TEST(64, sub, -=, onestwos);
41b9e9fcc1c44b Peter Zijlstra 2015-07-13 169 TEST(64, sub, -=, -one);
41b9e9fcc1c44b Peter Zijlstra 2015-07-13 170 TEST(64, or, |=, v1);
41b9e9fcc1c44b Peter Zijlstra 2015-07-13 171 TEST(64, and, &=, v1);
41b9e9fcc1c44b Peter Zijlstra 2015-07-13 172 TEST(64, xor, ^=, v1);
41b9e9fcc1c44b Peter Zijlstra 2015-07-13 173 TEST(64, andnot, &= ~, v1);
86a8938078a8bb Luca Barbieri 2010-02-24 174
978e5a3692c3b6 Boqun Feng 2015-11-04 175 RETURN_FAMILY_TEST(64, add_return, +=, onestwos);
978e5a3692c3b6 Boqun Feng 2015-11-04 176 RETURN_FAMILY_TEST(64, add_return, +=, -one);
978e5a3692c3b6 Boqun Feng 2015-11-04 177 RETURN_FAMILY_TEST(64, sub_return, -=, onestwos);
978e5a3692c3b6 Boqun Feng 2015-11-04 178 RETURN_FAMILY_TEST(64, sub_return, -=, -one);
86a8938078a8bb Luca Barbieri 2010-02-24 179
28aa2bda2211f4 Peter Zijlstra 2016-04-18 180 FETCH_FAMILY_TEST(64, fetch_add, +=, onestwos);
28aa2bda2211f4 Peter Zijlstra 2016-04-18 181 FETCH_FAMILY_TEST(64, fetch_add, +=, -one);
28aa2bda2211f4 Peter Zijlstra 2016-04-18 182 FETCH_FAMILY_TEST(64, fetch_sub, -=, onestwos);
28aa2bda2211f4 Peter Zijlstra 2016-04-18 183 FETCH_FAMILY_TEST(64, fetch_sub, -=, -one);
28aa2bda2211f4 Peter Zijlstra 2016-04-18 184
28aa2bda2211f4 Peter Zijlstra 2016-04-18 185 FETCH_FAMILY_TEST(64, fetch_or, |=, v1);
28aa2bda2211f4 Peter Zijlstra 2016-04-18 186 FETCH_FAMILY_TEST(64, fetch_and, &=, v1);
28aa2bda2211f4 Peter Zijlstra 2016-04-18 187 FETCH_FAMILY_TEST(64, fetch_andnot, &= ~, v1);
28aa2bda2211f4 Peter Zijlstra 2016-04-18 188 FETCH_FAMILY_TEST(64, fetch_xor, ^=, v1);
28aa2bda2211f4 Peter Zijlstra 2016-04-18 189
86a8938078a8bb Luca Barbieri 2010-02-24 190 INIT(v0);
86a8938078a8bb Luca Barbieri 2010-02-24 191 atomic64_inc(&v);
86a8938078a8bb Luca Barbieri 2010-02-24 192 r += one;
86a8938078a8bb Luca Barbieri 2010-02-24 193 BUG_ON(v.counter != r);
86a8938078a8bb Luca Barbieri 2010-02-24 194
86a8938078a8bb Luca Barbieri 2010-02-24 195 INIT(v0);
86a8938078a8bb Luca Barbieri 2010-02-24 196 atomic64_dec(&v);
86a8938078a8bb Luca Barbieri 2010-02-24 197 r -= one;
86a8938078a8bb Luca Barbieri 2010-02-24 198 BUG_ON(v.counter != r);
86a8938078a8bb Luca Barbieri 2010-02-24 199
978e5a3692c3b6 Boqun Feng 2015-11-04 200 INC_RETURN_FAMILY_TEST(64, v0);
978e5a3692c3b6 Boqun Feng 2015-11-04 201 DEC_RETURN_FAMILY_TEST(64, v0);
86a8938078a8bb Luca Barbieri 2010-02-24 202
978e5a3692c3b6 Boqun Feng 2015-11-04 203 XCHG_FAMILY_TEST(64, v0, v1);
978e5a3692c3b6 Boqun Feng 2015-11-04 204 CMPXCHG_FAMILY_TEST(64, v0, v1, v2);
86a8938078a8bb Luca Barbieri 2010-02-24 205
86a8938078a8bb Luca Barbieri 2010-02-24 206 INIT(v0);
9efbcd59024304 Luca Barbieri 2010-03-01 @207 BUG_ON(atomic64_add_unless(&v, one, v0));
86a8938078a8bb Luca Barbieri 2010-02-24 208 BUG_ON(v.counter != r);
86a8938078a8bb Luca Barbieri 2010-02-24 209
86a8938078a8bb Luca Barbieri 2010-02-24 210 INIT(v0);
9efbcd59024304 Luca Barbieri 2010-03-01 211 BUG_ON(!atomic64_add_unless(&v, one, v1));
86a8938078a8bb Luca Barbieri 2010-02-24 212 r += one;
86a8938078a8bb Luca Barbieri 2010-02-24 213 BUG_ON(v.counter != r);
86a8938078a8bb Luca Barbieri 2010-02-24 214
86a8938078a8bb Luca Barbieri 2010-02-24 215 INIT(onestwos);
86a8938078a8bb Luca Barbieri 2010-02-24 216 BUG_ON(atomic64_dec_if_positive(&v) != (onestwos - 1));
86a8938078a8bb Luca Barbieri 2010-02-24 217 r -= one;
86a8938078a8bb Luca Barbieri 2010-02-24 218 BUG_ON(v.counter != r);
86a8938078a8bb Luca Barbieri 2010-02-24 219
86a8938078a8bb Luca Barbieri 2010-02-24 220 INIT(0);
86a8938078a8bb Luca Barbieri 2010-02-24 221 BUG_ON(atomic64_dec_if_positive(&v) != -one);
86a8938078a8bb Luca Barbieri 2010-02-24 222 BUG_ON(v.counter != r);
86a8938078a8bb Luca Barbieri 2010-02-24 223
86a8938078a8bb Luca Barbieri 2010-02-24 224 INIT(-one);
86a8938078a8bb Luca Barbieri 2010-02-24 225 BUG_ON(atomic64_dec_if_positive(&v) != (-one - one));
86a8938078a8bb Luca Barbieri 2010-02-24 226 BUG_ON(v.counter != r);
86a8938078a8bb Luca Barbieri 2010-02-24 227
86a8938078a8bb Luca Barbieri 2010-02-24 228 INIT(onestwos);
25a304f277ad70 Luca Barbieri 2010-03-01 @229 BUG_ON(!atomic64_inc_not_zero(&v));
86a8938078a8bb Luca Barbieri 2010-02-24 230 r += one;
86a8938078a8bb Luca Barbieri 2010-02-24 231 BUG_ON(v.counter != r);
86a8938078a8bb Luca Barbieri 2010-02-24 232
86a8938078a8bb Luca Barbieri 2010-02-24 233 INIT(0);
25a304f277ad70 Luca Barbieri 2010-03-01 234 BUG_ON(atomic64_inc_not_zero(&v));
86a8938078a8bb Luca Barbieri 2010-02-24 235 BUG_ON(v.counter != r);
86a8938078a8bb Luca Barbieri 2010-02-24 236
86a8938078a8bb Luca Barbieri 2010-02-24 237 INIT(-one);
25a304f277ad70 Luca Barbieri 2010-03-01 238 BUG_ON(!atomic64_inc_not_zero(&v));
86a8938078a8bb Luca Barbieri 2010-02-24 239 r += one;
86a8938078a8bb Luca Barbieri 2010-02-24 240 BUG_ON(v.counter != r);
ffba19ccae8d98 Michael Ellerman 2017-07-14 241
ffba19ccae8d98 Michael Ellerman 2017-07-14 242 /* Confirm the return value fits in an int, even if the value doesn't */
ffba19ccae8d98 Michael Ellerman 2017-07-14 243 INIT(v3);
ffba19ccae8d98 Michael Ellerman 2017-07-14 244 r_int = atomic64_inc_not_zero(&v);
ffba19ccae8d98 Michael Ellerman 2017-07-14 245 BUG_ON(!r_int);
41b9e9fcc1c44b Peter Zijlstra 2015-07-13 246 }
41b9e9fcc1c44b Peter Zijlstra 2015-07-13 247
:::::: The code at line 58 was first introduced by commit
:::::: 28aa2bda2211f4327d83b44a4f917b4a061b1c56 locking/atomic: Implement atomic{,64,_long}_fetch_{add,sub,and,andnot,or,xor}{,_relaxed,_acquire,_release}()
:::::: TO: Peter Zijlstra <peterz(a)infradead.org>
:::::: CC: Ingo Molnar <mingo(a)kernel.org>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 5 months
[powerpc:next 231/236] arch/powerpc/kernel/fadump.c:731:28: error: 'INTERRUPT_SYSTEM_RESET' undeclared
by kernel test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux.git next
head: cbd3d5ba46b68c033986a6087209930f001cbcca
commit: 7153d4bf0b373428d0393c001019da4d0483fddb [231/236] powerpc/traps: Enhance readability for trap types
config: powerpc-allyesconfig (attached as .config)
compiler: powerpc64-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
# https://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux.git/commit/...
git remote add powerpc https://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux.git
git fetch --no-tags powerpc next
git checkout 7153d4bf0b373428d0393c001019da4d0483fddb
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross W=1 ARCH=powerpc
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
Note: the powerpc/next HEAD cbd3d5ba46b68c033986a6087209930f001cbcca builds fine.
It only hurts bisectibility.
All errors (new ones prefixed by >>):
arch/powerpc/kernel/fadump.c:82:12: warning: no previous prototype for 'fadump_cma_init' [-Wmissing-prototypes]
82 | int __init fadump_cma_init(void)
| ^~~~~~~~~~~~~~~
arch/powerpc/kernel/fadump.c: In function 'crash_fadump':
>> arch/powerpc/kernel/fadump.c:731:28: error: 'INTERRUPT_SYSTEM_RESET' undeclared (first use in this function)
731 | if (TRAP(&(fdh->regs)) == INTERRUPT_SYSTEM_RESET) {
| ^~~~~~~~~~~~~~~~~~~~~~
arch/powerpc/kernel/fadump.c:731:28: note: each undeclared identifier is reported only once for each function it appears in
vim +/INTERRUPT_SYSTEM_RESET +731 arch/powerpc/kernel/fadump.c
679
680 void crash_fadump(struct pt_regs *regs, const char *str)
681 {
682 unsigned int msecs;
683 struct fadump_crash_info_header *fdh = NULL;
684 int old_cpu, this_cpu;
685 /* Do not include first CPU */
686 unsigned int ncpus = num_online_cpus() - 1;
687
688 if (!should_fadump_crash())
689 return;
690
691 /*
692 * old_cpu == -1 means this is the first CPU which has come here,
693 * go ahead and trigger fadump.
694 *
695 * old_cpu != -1 means some other CPU has already on it's way
696 * to trigger fadump, just keep looping here.
697 */
698 this_cpu = smp_processor_id();
699 old_cpu = cmpxchg(&crashing_cpu, -1, this_cpu);
700
701 if (old_cpu != -1) {
702 atomic_inc(&cpus_in_fadump);
703
704 /*
705 * We can't loop here indefinitely. Wait as long as fadump
706 * is in force. If we race with fadump un-registration this
707 * loop will break and then we go down to normal panic path
708 * and reboot. If fadump is in force the first crashing
709 * cpu will definitely trigger fadump.
710 */
711 while (fw_dump.dump_registered)
712 cpu_relax();
713 return;
714 }
715
716 fdh = __va(fw_dump.fadumphdr_addr);
717 fdh->crashing_cpu = crashing_cpu;
718 crash_save_vmcoreinfo();
719
720 if (regs)
721 fdh->regs = *regs;
722 else
723 ppc_save_regs(&fdh->regs);
724
725 fdh->online_mask = *cpu_online_mask;
726
727 /*
728 * If we came in via system reset, wait a while for the secondary
729 * CPUs to enter.
730 */
> 731 if (TRAP(&(fdh->regs)) == INTERRUPT_SYSTEM_RESET) {
732 msecs = CRASH_TIMEOUT;
733 while ((atomic_read(&cpus_in_fadump) < ncpus) && (--msecs > 0))
734 mdelay(1);
735 }
736
737 fw_dump.ops->fadump_trigger(fdh, str);
738 }
739
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 5 months
Re: [PATCH] smp: add a best_effort version of smp_call_function_many()
by kernel test robot
Hi Luigi,
Thank you for the patch! Perhaps something to improve:
[auto build test WARNING on linux/master]
[also build test WARNING on linus/master v5.12-rc8]
[cannot apply to next-20210419]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch]
url: https://github.com/0day-ci/linux/commits/Luigi-Rizzo/smp-add-a-best_effor...
base: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git 5e46d1b78a03d52306f21f77a4e4a144b6d31486
config: i386-randconfig-s002-20210420 (attached as .config)
compiler: gcc-9 (Debian 9.3.0-22) 9.3.0
reproduce:
# apt-get install sparse
# sparse version: v0.6.3-330-g09ec74f6-dirty
# https://github.com/0day-ci/linux/commit/9b290e2d29303b7c5bae4a0eddc5bb15c...
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review Luigi-Rizzo/smp-add-a-best_effort-version-of-smp_call_function_many/20210420-024713
git checkout 9b290e2d29303b7c5bae4a0eddc5bb15c01e72f7
# save the attached .config to linux build tree
make W=1 C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' W=1 ARCH=i386
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All warnings (new ones prefixed by >>):
>> kernel/smp.c:722: warning: wrong kernel-doc identifier on line:
* Extended version of smp_call_function_many(). Same constraints.
kernel/smp.c:1022: warning: cannot understand function prototype: 'struct smp_call_on_cpu_struct '
vim +722 kernel/smp.c
720
721 /**
> 722 * Extended version of smp_call_function_many(). Same constraints.
723 * @mode == 0 same as wait = false, returns 0;
724 * @mode == 1 same as wait = true, returns 0;
725 * @mode = SMP_CFM_BEST_EFFORT: skips CPUs with previous pending requests,
726 * returns 0 and *mask unmodified if no CPUs are skipped,
727 * -EBUSY if CPUs are skipped, and *mask is the set of skipped CPUs
728 */
729 int __smp_call_function_many(struct cpumask *mask, smp_call_func_t func,
730 void *info, int mode)
731 {
732 struct cpumask *ret = smp_call_function_many_cond(mask, func, info,
733 mode, NULL);
734
735 if (!ret)
736 return 0;
737 cpumask_andnot(mask, mask, ret);
738 cpumask_and(mask, mask, cpu_online_mask);
739 cpumask_clear_cpu(smp_processor_id(), mask);
740 return -EBUSY;
741 }
742 EXPORT_SYMBOL(__smp_call_function_many);
743
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 5 months
[chrome-os:chromeos-5.4 51/243] drivers/media/platform/mtk-vcodec/mtk_vcodec_dec_stateless.c:352:28: warning: variable 'dec_buf' set but not used
by kernel test robot
tree: https://chromium.googlesource.com/chromiumos/third_party/kernel chromeos-5.4
head: 52d269f32500581166246e0e494b2b62d979dba6
commit: 1dee2dc6478516fd89eb0a92c28dfcd5980f3f8e [51/243] CHROMIUM: media: mtk-vcodec: Refactor get cap buffer and put cap buffer to disp flow
config: csky-randconfig-r031-20210420 (attached as .config)
compiler: csky-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 remote add chrome-os https://chromium.googlesource.com/chromiumos/third_party/kernel
git fetch --no-tags chrome-os chromeos-5.4
git checkout 1dee2dc6478516fd89eb0a92c28dfcd5980f3f8e
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross W=1 ARCH=csky
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All warnings (new ones prefixed by >>):
In file included from include/linux/kernel.h:11,
from include/linux/list.h:9,
from include/linux/preempt.h:11,
from include/linux/spinlock.h:51,
from include/linux/seqlock.h:36,
from include/linux/time.h:6,
from include/linux/videodev2.h:59,
from include/media/videobuf2-v4l2.h:15,
from drivers/media/platform/mtk-vcodec/mtk_vcodec_dec_stateless.c:3:
include/asm-generic/fixmap.h: In function 'fix_to_virt':
include/asm-generic/fixmap.h:32:19: warning: comparison of unsigned expression >= 0 is always true [-Wtype-limits]
32 | BUILD_BUG_ON(idx >= __end_of_fixed_addresses);
| ^~
include/linux/compiler.h:397:9: note: in definition of macro '__compiletime_assert'
397 | if (!(condition)) \
| ^~~~~~~~~
include/linux/compiler.h:417:2: note: in expansion of macro '_compiletime_assert'
417 | _compiletime_assert(condition, msg, __compiletime_assert_, __COUNTER__)
| ^~~~~~~~~~~~~~~~~~~
include/linux/build_bug.h:39:37: note: in expansion of macro 'compiletime_assert'
39 | #define BUILD_BUG_ON_MSG(cond, msg) compiletime_assert(!(cond), msg)
| ^~~~~~~~~~~~~~~~~~
include/linux/build_bug.h:50:2: note: in expansion of macro 'BUILD_BUG_ON_MSG'
50 | BUILD_BUG_ON_MSG(condition, "BUILD_BUG_ON failed: " #condition)
| ^~~~~~~~~~~~~~~~
include/asm-generic/fixmap.h:32:2: note: in expansion of macro 'BUILD_BUG_ON'
32 | BUILD_BUG_ON(idx >= __end_of_fixed_addresses);
| ^~~~~~~~~~~~
drivers/media/platform/mtk-vcodec/mtk_vcodec_dec_stateless.c: In function 'vb2ops_vdec_stateless_buf_queue':
>> drivers/media/platform/mtk-vcodec/mtk_vcodec_dec_stateless.c:352:28: warning: variable 'dec_buf' set but not used [-Wunused-but-set-variable]
352 | struct mtk_video_dec_buf *dec_buf;
| ^~~~~~~
vim +/dec_buf +352 drivers/media/platform/mtk-vcodec/mtk_vcodec_dec_stateless.c
347
348 static void vb2ops_vdec_stateless_buf_queue(struct vb2_buffer *vb)
349 {
350 struct mtk_vcodec_ctx *ctx = vb2_get_drv_priv(vb->vb2_queue);
351 struct vb2_v4l2_buffer *vb2_v4l2 = to_vb2_v4l2_buffer(vb);
> 352 struct mtk_video_dec_buf *dec_buf;
353
354 mtk_v4l2_debug(3, "[%d] (%d) id=%d, vb=%p",
355 ctx->id, vb->vb2_queue->type,
356 vb->index, vb);
357
358 dec_buf = container_of(vb2_v4l2, struct mtk_video_dec_buf, m2m_buf.vb);
359 mutex_lock(&ctx->lock);
360 v4l2_m2m_buf_queue(ctx->m2m_ctx, vb2_v4l2);
361 mutex_unlock(&ctx->lock);
362 if (vb->vb2_queue->type != V4L2_BUF_TYPE_VIDEO_OUTPUT_MPLANE)
363 return;
364
365 mtk_v4l2_debug(3, "(%d) id=%d, bs=%p",
366 vb->vb2_queue->type, vb->index, dec_buf);
367
368 /* If an OUTPUT buffer, we may need to update the state */
369 if (ctx->state == MTK_STATE_INIT) {
370 ctx->state = MTK_STATE_HEADER;
371 mtk_v4l2_debug(1, "Init driver from init to header.");
372 } else {
373 mtk_v4l2_debug(3, "[%d] already init driver %d",
374 ctx->id, ctx->state);
375 }
376 }
377
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 5 months
[chrome-os:chromeos-5.4 46/243] drivers/media/platform/mtk-vcodec/vdec_vpu_if.c:60:30: warning: cast to pointer from integer of different size
by kernel test robot
tree: https://chromium.googlesource.com/chromiumos/third_party/kernel chromeos-5.4
head: 52d269f32500581166246e0e494b2b62d979dba6
commit: 340c6a50cb273d407adaa19e0edabfb57139203c [46/243] CHROMIUM: media: mtk-vcodec: Add new interface to get frame buffer size from scp
config: csky-randconfig-r031-20210420 (attached as .config)
compiler: csky-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 remote add chrome-os https://chromium.googlesource.com/chromiumos/third_party/kernel
git fetch --no-tags chrome-os chromeos-5.4
git checkout 340c6a50cb273d407adaa19e0edabfb57139203c
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross W=1 ARCH=csky
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All warnings (new ones prefixed by >>):
In file included from include/linux/init.h:5,
from include/linux/io.h:10,
from drivers/media/platform/mtk-vcodec/mtk_vcodec_drv.h:12,
from drivers/media/platform/mtk-vcodec/vdec_vpu_if.c:7:
include/asm-generic/fixmap.h: In function 'fix_to_virt':
include/asm-generic/fixmap.h:32:19: warning: comparison of unsigned expression >= 0 is always true [-Wtype-limits]
32 | BUILD_BUG_ON(idx >= __end_of_fixed_addresses);
| ^~
include/linux/compiler.h:397:9: note: in definition of macro '__compiletime_assert'
397 | if (!(condition)) \
| ^~~~~~~~~
include/linux/compiler.h:417:2: note: in expansion of macro '_compiletime_assert'
417 | _compiletime_assert(condition, msg, __compiletime_assert_, __COUNTER__)
| ^~~~~~~~~~~~~~~~~~~
include/linux/build_bug.h:39:37: note: in expansion of macro 'compiletime_assert'
39 | #define BUILD_BUG_ON_MSG(cond, msg) compiletime_assert(!(cond), msg)
| ^~~~~~~~~~~~~~~~~~
include/linux/build_bug.h:50:2: note: in expansion of macro 'BUILD_BUG_ON_MSG'
50 | BUILD_BUG_ON_MSG(condition, "BUILD_BUG_ON failed: " #condition)
| ^~~~~~~~~~~~~~~~
include/asm-generic/fixmap.h:32:2: note: in expansion of macro 'BUILD_BUG_ON'
32 | BUILD_BUG_ON(idx >= __end_of_fixed_addresses);
| ^~~~~~~~~~~~
drivers/media/platform/mtk-vcodec/vdec_vpu_if.c: In function 'handle_get_param_msg_ack':
>> drivers/media/platform/mtk-vcodec/vdec_vpu_if.c:60:30: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
60 | struct vdec_vpu_inst *vpu = (struct vdec_vpu_inst *)msg->ap_inst_addr;
| ^
vim +60 drivers/media/platform/mtk-vcodec/vdec_vpu_if.c
56
57 static void handle_get_param_msg_ack(
58 const struct vdec_vpu_ipi_get_param_ack *msg)
59 {
> 60 struct vdec_vpu_inst *vpu = (struct vdec_vpu_inst *)msg->ap_inst_addr;
61
62 mtk_vcodec_debug(vpu, "+ ap_inst_addr = 0x%llx", msg->ap_inst_addr);
63
64 /* param_type is enum vdec_get_param_type */
65 switch(msg->param_type) {
66 case 2:
67 vpu->fb_sz[0] = msg->data[0];
68 vpu->fb_sz[1] = msg->data[1];
69 break;
70 default:
71 mtk_vcodec_err(vpu, "invalid get param type=%d", msg->param_type);
72 vpu->failure = 1;
73 break;
74 }
75 }
76
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 5 months
include/linux/compiler_types.h:326:38: error: call to '__compiletime_assert_544' declared with attribute error: BUILD_BUG_ON failed: sizeof(struct abort_entry_24xx) != 64
by kernel test robot
Hi Bikash,
FYI, the error/warning still remains.
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: bf05bf16c76bb44ab5156223e1e58e26dfe30a88
commit: a04658594399e1fa25f984601b77ee840e6aaf01 scsi: qla2xxx: Wait for ABTS response on I/O timeouts for NVMe
date: 3 months ago
config: arm-randconfig-p002-20210419 (attached as .config)
compiler: arm-linux-gnueabi-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
# https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit...
git remote add linus https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
git fetch --no-tags linus master
git checkout a04658594399e1fa25f984601b77ee840e6aaf01
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross W=1 ARCH=arm
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All errors (new ones prefixed by >>):
In file included from <command-line>:
drivers/scsi/qla2xxx/qla_os.c: In function 'qla2x00_module_init':
include/linux/compiler_types.h:326:38: error: call to '__compiletime_assert_536' declared with attribute error: BUILD_BUG_ON failed: sizeof(cmd_a64_entry_t) != 64
326 | _compiletime_assert(condition, msg, __compiletime_assert_, __COUNTER__)
| ^
include/linux/compiler_types.h:307:4: note: in definition of macro '__compiletime_assert'
307 | prefix ## suffix(); \
| ^~~~~~
include/linux/compiler_types.h:326:2: note: in expansion of macro '_compiletime_assert'
326 | _compiletime_assert(condition, msg, __compiletime_assert_, __COUNTER__)
| ^~~~~~~~~~~~~~~~~~~
include/linux/build_bug.h:39:37: note: in expansion of macro 'compiletime_assert'
39 | #define BUILD_BUG_ON_MSG(cond, msg) compiletime_assert(!(cond), msg)
| ^~~~~~~~~~~~~~~~~~
include/linux/build_bug.h:50:2: note: in expansion of macro 'BUILD_BUG_ON_MSG'
50 | BUILD_BUG_ON_MSG(condition, "BUILD_BUG_ON failed: " #condition)
| ^~~~~~~~~~~~~~~~
drivers/scsi/qla2xxx/qla_os.c:7782:2: note: in expansion of macro 'BUILD_BUG_ON'
7782 | BUILD_BUG_ON(sizeof(cmd_a64_entry_t) != 64);
| ^~~~~~~~~~~~
include/linux/compiler_types.h:326:38: error: call to '__compiletime_assert_537' declared with attribute error: BUILD_BUG_ON failed: sizeof(cmd_entry_t) != 64
326 | _compiletime_assert(condition, msg, __compiletime_assert_, __COUNTER__)
| ^
include/linux/compiler_types.h:307:4: note: in definition of macro '__compiletime_assert'
307 | prefix ## suffix(); \
| ^~~~~~
include/linux/compiler_types.h:326:2: note: in expansion of macro '_compiletime_assert'
326 | _compiletime_assert(condition, msg, __compiletime_assert_, __COUNTER__)
| ^~~~~~~~~~~~~~~~~~~
include/linux/build_bug.h:39:37: note: in expansion of macro 'compiletime_assert'
39 | #define BUILD_BUG_ON_MSG(cond, msg) compiletime_assert(!(cond), msg)
| ^~~~~~~~~~~~~~~~~~
include/linux/build_bug.h:50:2: note: in expansion of macro 'BUILD_BUG_ON_MSG'
50 | BUILD_BUG_ON_MSG(condition, "BUILD_BUG_ON failed: " #condition)
| ^~~~~~~~~~~~~~~~
drivers/scsi/qla2xxx/qla_os.c:7783:2: note: in expansion of macro 'BUILD_BUG_ON'
7783 | BUILD_BUG_ON(sizeof(cmd_entry_t) != 64);
| ^~~~~~~~~~~~
include/linux/compiler_types.h:326:38: error: call to '__compiletime_assert_541' declared with attribute error: BUILD_BUG_ON failed: sizeof(mrk_entry_t) != 64
326 | _compiletime_assert(condition, msg, __compiletime_assert_, __COUNTER__)
| ^
include/linux/compiler_types.h:307:4: note: in definition of macro '__compiletime_assert'
307 | prefix ## suffix(); \
| ^~~~~~
include/linux/compiler_types.h:326:2: note: in expansion of macro '_compiletime_assert'
326 | _compiletime_assert(condition, msg, __compiletime_assert_, __COUNTER__)
| ^~~~~~~~~~~~~~~~~~~
include/linux/build_bug.h:39:37: note: in expansion of macro 'compiletime_assert'
39 | #define BUILD_BUG_ON_MSG(cond, msg) compiletime_assert(!(cond), msg)
| ^~~~~~~~~~~~~~~~~~
include/linux/build_bug.h:50:2: note: in expansion of macro 'BUILD_BUG_ON_MSG'
50 | BUILD_BUG_ON_MSG(condition, "BUILD_BUG_ON failed: " #condition)
| ^~~~~~~~~~~~~~~~
drivers/scsi/qla2xxx/qla_os.c:7787:2: note: in expansion of macro 'BUILD_BUG_ON'
7787 | BUILD_BUG_ON(sizeof(mrk_entry_t) != 64);
| ^~~~~~~~~~~~
include/linux/compiler_types.h:326:38: error: call to '__compiletime_assert_542' declared with attribute error: BUILD_BUG_ON failed: sizeof(ms_iocb_entry_t) != 64
326 | _compiletime_assert(condition, msg, __compiletime_assert_, __COUNTER__)
| ^
include/linux/compiler_types.h:307:4: note: in definition of macro '__compiletime_assert'
307 | prefix ## suffix(); \
| ^~~~~~
include/linux/compiler_types.h:326:2: note: in expansion of macro '_compiletime_assert'
326 | _compiletime_assert(condition, msg, __compiletime_assert_, __COUNTER__)
| ^~~~~~~~~~~~~~~~~~~
include/linux/build_bug.h:39:37: note: in expansion of macro 'compiletime_assert'
39 | #define BUILD_BUG_ON_MSG(cond, msg) compiletime_assert(!(cond), msg)
| ^~~~~~~~~~~~~~~~~~
include/linux/build_bug.h:50:2: note: in expansion of macro 'BUILD_BUG_ON_MSG'
50 | BUILD_BUG_ON_MSG(condition, "BUILD_BUG_ON failed: " #condition)
| ^~~~~~~~~~~~~~~~
drivers/scsi/qla2xxx/qla_os.c:7788:2: note: in expansion of macro 'BUILD_BUG_ON'
7788 | BUILD_BUG_ON(sizeof(ms_iocb_entry_t) != 64);
| ^~~~~~~~~~~~
include/linux/compiler_types.h:326:38: error: call to '__compiletime_assert_543' declared with attribute error: BUILD_BUG_ON failed: sizeof(request_t) != 64
326 | _compiletime_assert(condition, msg, __compiletime_assert_, __COUNTER__)
| ^
include/linux/compiler_types.h:307:4: note: in definition of macro '__compiletime_assert'
307 | prefix ## suffix(); \
| ^~~~~~
include/linux/compiler_types.h:326:2: note: in expansion of macro '_compiletime_assert'
326 | _compiletime_assert(condition, msg, __compiletime_assert_, __COUNTER__)
| ^~~~~~~~~~~~~~~~~~~
include/linux/build_bug.h:39:37: note: in expansion of macro 'compiletime_assert'
39 | #define BUILD_BUG_ON_MSG(cond, msg) compiletime_assert(!(cond), msg)
| ^~~~~~~~~~~~~~~~~~
include/linux/build_bug.h:50:2: note: in expansion of macro 'BUILD_BUG_ON_MSG'
50 | BUILD_BUG_ON_MSG(condition, "BUILD_BUG_ON failed: " #condition)
| ^~~~~~~~~~~~~~~~
drivers/scsi/qla2xxx/qla_os.c:7789:2: note: in expansion of macro 'BUILD_BUG_ON'
7789 | BUILD_BUG_ON(sizeof(request_t) != 64);
| ^~~~~~~~~~~~
>> include/linux/compiler_types.h:326:38: error: call to '__compiletime_assert_544' declared with attribute error: BUILD_BUG_ON failed: sizeof(struct abort_entry_24xx) != 64
326 | _compiletime_assert(condition, msg, __compiletime_assert_, __COUNTER__)
| ^
include/linux/compiler_types.h:307:4: note: in definition of macro '__compiletime_assert'
307 | prefix ## suffix(); \
| ^~~~~~
include/linux/compiler_types.h:326:2: note: in expansion of macro '_compiletime_assert'
326 | _compiletime_assert(condition, msg, __compiletime_assert_, __COUNTER__)
| ^~~~~~~~~~~~~~~~~~~
include/linux/build_bug.h:39:37: note: in expansion of macro 'compiletime_assert'
39 | #define BUILD_BUG_ON_MSG(cond, msg) compiletime_assert(!(cond), msg)
| ^~~~~~~~~~~~~~~~~~
include/linux/build_bug.h:50:2: note: in expansion of macro 'BUILD_BUG_ON_MSG'
50 | BUILD_BUG_ON_MSG(condition, "BUILD_BUG_ON failed: " #condition)
| ^~~~~~~~~~~~~~~~
drivers/scsi/qla2xxx/qla_os.c:7790:2: note: in expansion of macro 'BUILD_BUG_ON'
7790 | BUILD_BUG_ON(sizeof(struct abort_entry_24xx) != 64);
| ^~~~~~~~~~~~
include/linux/compiler_types.h:326:38: error: call to '__compiletime_assert_562' declared with attribute error: BUILD_BUG_ON failed: sizeof(struct ctio_crc2_to_fw) != 64
326 | _compiletime_assert(condition, msg, __compiletime_assert_, __COUNTER__)
| ^
include/linux/compiler_types.h:307:4: note: in definition of macro '__compiletime_assert'
307 | prefix ## suffix(); \
| ^~~~~~
include/linux/compiler_types.h:326:2: note: in expansion of macro '_compiletime_assert'
326 | _compiletime_assert(condition, msg, __compiletime_assert_, __COUNTER__)
| ^~~~~~~~~~~~~~~~~~~
include/linux/build_bug.h:39:37: note: in expansion of macro 'compiletime_assert'
39 | #define BUILD_BUG_ON_MSG(cond, msg) compiletime_assert(!(cond), msg)
| ^~~~~~~~~~~~~~~~~~
include/linux/build_bug.h:50:2: note: in expansion of macro 'BUILD_BUG_ON_MSG'
50 | BUILD_BUG_ON_MSG(condition, "BUILD_BUG_ON failed: " #condition)
| ^~~~~~~~~~~~~~~~
drivers/scsi/qla2xxx/qla_os.c:7808:2: note: in expansion of macro 'BUILD_BUG_ON'
7808 | BUILD_BUG_ON(sizeof(struct ctio_crc2_to_fw) != 64);
| ^~~~~~~~~~~~
include/linux/compiler_types.h:326:38: error: call to '__compiletime_assert_565' declared with attribute error: BUILD_BUG_ON failed: sizeof(struct device_reg_2xxx) != 256
326 | _compiletime_assert(condition, msg, __compiletime_assert_, __COUNTER__)
| ^
include/linux/compiler_types.h:307:4: note: in definition of macro '__compiletime_assert'
307 | prefix ## suffix(); \
| ^~~~~~
include/linux/compiler_types.h:326:2: note: in expansion of macro '_compiletime_assert'
326 | _compiletime_assert(condition, msg, __compiletime_assert_, __COUNTER__)
| ^~~~~~~~~~~~~~~~~~~
include/linux/build_bug.h:39:37: note: in expansion of macro 'compiletime_assert'
39 | #define BUILD_BUG_ON_MSG(cond, msg) compiletime_assert(!(cond), msg)
| ^~~~~~~~~~~~~~~~~~
include/linux/build_bug.h:50:2: note: in expansion of macro 'BUILD_BUG_ON_MSG'
50 | BUILD_BUG_ON_MSG(condition, "BUILD_BUG_ON failed: " #condition)
| ^~~~~~~~~~~~~~~~
drivers/scsi/qla2xxx/qla_os.c:7811:2: note: in expansion of macro 'BUILD_BUG_ON'
7811 | BUILD_BUG_ON(sizeof(struct device_reg_2xxx) != 256);
| ^~~~~~~~~~~~
include/linux/compiler_types.h:326:38: error: call to '__compiletime_assert_571' declared with attribute error: BUILD_BUG_ON failed: sizeof(struct imm_ntfy_from_isp) != 64
326 | _compiletime_assert(condition, msg, __compiletime_assert_, __COUNTER__)
| ^
include/linux/compiler_types.h:307:4: note: in definition of macro '__compiletime_assert'
307 | prefix ## suffix(); \
| ^~~~~~
include/linux/compiler_types.h:326:2: note: in expansion of macro '_compiletime_assert'
326 | _compiletime_assert(condition, msg, __compiletime_assert_, __COUNTER__)
| ^~~~~~~~~~~~~~~~~~~
include/linux/build_bug.h:39:37: note: in expansion of macro 'compiletime_assert'
39 | #define BUILD_BUG_ON_MSG(cond, msg) compiletime_assert(!(cond), msg)
| ^~~~~~~~~~~~~~~~~~
include/linux/build_bug.h:50:2: note: in expansion of macro 'BUILD_BUG_ON_MSG'
50 | BUILD_BUG_ON_MSG(condition, "BUILD_BUG_ON failed: " #condition)
| ^~~~~~~~~~~~~~~~
drivers/scsi/qla2xxx/qla_os.c:7817:2: note: in expansion of macro 'BUILD_BUG_ON'
7817 | BUILD_BUG_ON(sizeof(struct imm_ntfy_from_isp) != 64);
| ^~~~~~~~~~~~
include/linux/compiler_types.h:326:38: error: call to '__compiletime_assert_575' declared with attribute error: BUILD_BUG_ON failed: sizeof(struct mbx_entry) != 64
326 | _compiletime_assert(condition, msg, __compiletime_assert_, __COUNTER__)
| ^
include/linux/compiler_types.h:307:4: note: in definition of macro '__compiletime_assert'
307 | prefix ## suffix(); \
| ^~~~~~
include/linux/compiler_types.h:326:2: note: in expansion of macro '_compiletime_assert'
326 | _compiletime_assert(condition, msg, __compiletime_assert_, __COUNTER__)
| ^~~~~~~~~~~~~~~~~~~
include/linux/build_bug.h:39:37: note: in expansion of macro 'compiletime_assert'
39 | #define BUILD_BUG_ON_MSG(cond, msg) compiletime_assert(!(cond), msg)
| ^~~~~~~~~~~~~~~~~~
include/linux/build_bug.h:50:2: note: in expansion of macro 'BUILD_BUG_ON_MSG'
50 | BUILD_BUG_ON_MSG(condition, "BUILD_BUG_ON failed: " #condition)
| ^~~~~~~~~~~~~~~~
drivers/scsi/qla2xxx/qla_os.c:7821:2: note: in expansion of macro 'BUILD_BUG_ON'
7821 | BUILD_BUG_ON(sizeof(struct mbx_entry) != 64);
| ^~~~~~~~~~~~
include/linux/compiler_types.h:326:38: error: call to '__compiletime_assert_581' declared with attribute error: BUILD_BUG_ON failed: sizeof(struct pt_ls4_rx_unsol) != 64
326 | _compiletime_assert(condition, msg, __compiletime_assert_, __COUNTER__)
| ^
include/linux/compiler_types.h:307:4: note: in definition of macro '__compiletime_assert'
307 | prefix ## suffix(); \
| ^~~~~~
include/linux/compiler_types.h:326:2: note: in expansion of macro '_compiletime_assert'
326 | _compiletime_assert(condition, msg, __compiletime_assert_, __COUNTER__)
| ^~~~~~~~~~~~~~~~~~~
include/linux/build_bug.h:39:37: note: in expansion of macro 'compiletime_assert'
39 | #define BUILD_BUG_ON_MSG(cond, msg) compiletime_assert(!(cond), msg)
vim +/__compiletime_assert_544 +326 include/linux/compiler_types.h
eb5c2d4b45e3d2 Will Deacon 2020-07-21 312
eb5c2d4b45e3d2 Will Deacon 2020-07-21 313 #define _compiletime_assert(condition, msg, prefix, suffix) \
eb5c2d4b45e3d2 Will Deacon 2020-07-21 314 __compiletime_assert(condition, msg, prefix, suffix)
eb5c2d4b45e3d2 Will Deacon 2020-07-21 315
eb5c2d4b45e3d2 Will Deacon 2020-07-21 316 /**
eb5c2d4b45e3d2 Will Deacon 2020-07-21 317 * compiletime_assert - break build and emit msg if condition is false
eb5c2d4b45e3d2 Will Deacon 2020-07-21 318 * @condition: a compile-time constant condition to check
eb5c2d4b45e3d2 Will Deacon 2020-07-21 319 * @msg: a message to emit if condition is false
eb5c2d4b45e3d2 Will Deacon 2020-07-21 320 *
eb5c2d4b45e3d2 Will Deacon 2020-07-21 321 * In tradition of POSIX assert, this macro will break the build if the
eb5c2d4b45e3d2 Will Deacon 2020-07-21 322 * supplied condition is *false*, emitting the supplied error message if the
eb5c2d4b45e3d2 Will Deacon 2020-07-21 323 * compiler has support to do so.
eb5c2d4b45e3d2 Will Deacon 2020-07-21 324 */
eb5c2d4b45e3d2 Will Deacon 2020-07-21 325 #define compiletime_assert(condition, msg) \
eb5c2d4b45e3d2 Will Deacon 2020-07-21 @326 _compiletime_assert(condition, msg, __compiletime_assert_, __COUNTER__)
eb5c2d4b45e3d2 Will Deacon 2020-07-21 327
:::::: The code at line 326 was first introduced by commit
:::::: eb5c2d4b45e3d2d5d052ea6b8f1463976b1020d5 compiler.h: Move compiletime_assert() macros into compiler_types.h
:::::: TO: Will Deacon <will(a)kernel.org>
:::::: CC: Will Deacon <will(a)kernel.org>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 5 months
[xlnx:release-2020.2.2_k26 207/241] drivers/pinctrl/core.c:1273:6: warning: 'ret' may be used uninitialized in this function
by kernel test robot
tree: https://github.com/Xilinx/linux-xlnx release-2020.2.2_k26
head: 4731ff5042ce76fc145bc2797faa2d91b090675e
commit: 11367d8e6e31164b198401335b9a19b5b7234ec0 [207/241] pinctrl: core: Handling pinmux and pinconf separately
config: um-allyesconfig (attached as .config)
compiler: gcc-9 (Debian 9.3.0-22) 9.3.0
reproduce (this is a W=1 build):
# https://github.com/Xilinx/linux-xlnx/commit/11367d8e6e31164b198401335b9a1...
git remote add xlnx https://github.com/Xilinx/linux-xlnx
git fetch --no-tags xlnx release-2020.2.2_k26
git checkout 11367d8e6e31164b198401335b9a19b5b7234ec0
# save the attached .config to linux build tree
make W=1 W=1 ARCH=um
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
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 >>):
cc1: warning: arch/um/include/uapi: No such file or directory [-Wmissing-include-dirs]
drivers/pinctrl/core.c: In function 'pinctrl_commit_state':
>> drivers/pinctrl/core.c:1273:6: warning: 'ret' may be used uninitialized in this function [-Wmaybe-uninitialized]
1273 | if (ret < 0)
| ^
Kconfig warnings: (for reference only)
WARNING: unmet direct dependencies detected for UIO_DMEM_GENIRQ
Depends on UIO && HAS_DMA
Selected by
- UIO_XILINX_AI_ENGINE && UIO
vim +/ret +1273 drivers/pinctrl/core.c
1231
1232 /**
1233 * pinctrl_commit_state() - select/activate/program a pinctrl state to HW
1234 * @p: the pinctrl handle for the device that requests configuration
1235 * @state: the state handle to select/activate/program
1236 */
1237 static int pinctrl_commit_state(struct pinctrl *p, struct pinctrl_state *state)
1238 {
1239 struct pinctrl_setting *setting, *setting2;
1240 struct pinctrl_state *old_state = p->state;
1241 int ret;
1242
1243 if (p->state) {
1244 /*
1245 * For each pinmux setting in the old state, forget SW's record
1246 * of mux owner for that pingroup. Any pingroups which are
1247 * still owned by the new state will be re-acquired by the call
1248 * to pinmux_enable_setting() in the loop below.
1249 */
1250 list_for_each_entry(setting, &p->state->settings, node) {
1251 if (setting->type != PIN_MAP_TYPE_MUX_GROUP)
1252 continue;
1253 pinmux_disable_setting(setting);
1254 }
1255 }
1256
1257 p->state = NULL;
1258
1259 /* Apply all the settings for the new state - pinmux first */
1260 list_for_each_entry(setting, &state->settings, node) {
1261 switch (setting->type) {
1262 case PIN_MAP_TYPE_MUX_GROUP:
1263 ret = pinmux_enable_setting(setting);
1264 break;
1265 case PIN_MAP_TYPE_CONFIGS_PIN:
1266 case PIN_MAP_TYPE_CONFIGS_GROUP:
1267 break;
1268 default:
1269 ret = -EINVAL;
1270 break;
1271 }
1272
> 1273 if (ret < 0)
1274 goto unapply_new_state;
1275
1276 /* Do not link hogs (circular dependency) */
1277 if (p != setting->pctldev->p)
1278 pinctrl_link_add(setting->pctldev, p->dev);
1279 }
1280
1281 /* Apply all the settings for the new state - pinconf after */
1282 list_for_each_entry(setting, &state->settings, node) {
1283 switch (setting->type) {
1284 case PIN_MAP_TYPE_MUX_GROUP:
1285 break;
1286 case PIN_MAP_TYPE_CONFIGS_PIN:
1287 case PIN_MAP_TYPE_CONFIGS_GROUP:
1288 ret = pinconf_apply_setting(setting);
1289 break;
1290 default:
1291 ret = -EINVAL;
1292 break;
1293 }
1294
1295 if (ret < 0) {
1296 goto unapply_new_state;
1297 }
1298
1299 /* Do not link hogs (circular dependency) */
1300 if (p != setting->pctldev->p)
1301 pinctrl_link_add(setting->pctldev, p->dev);
1302 }
1303
1304 p->state = state;
1305
1306 return 0;
1307
1308 unapply_new_state:
1309 dev_err(p->dev, "Error applying setting, reverse things back\n");
1310
1311 list_for_each_entry(setting2, &state->settings, node) {
1312 if (&setting2->node == &setting->node)
1313 break;
1314 /*
1315 * All we can do here is pinmux_disable_setting.
1316 * That means that some pins are muxed differently now
1317 * than they were before applying the setting (We can't
1318 * "unmux a pin"!), but it's not a big deal since the pins
1319 * are free to be muxed by another apply_setting.
1320 */
1321 if (setting2->type == PIN_MAP_TYPE_MUX_GROUP)
1322 pinmux_disable_setting(setting2);
1323 }
1324
1325 /* There's no infinite recursive loop here because p->state is NULL */
1326 if (old_state)
1327 pinctrl_select_state(p, old_state);
1328
1329 return ret;
1330 }
1331
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 5 months
Re: [Outreachy kernel] [PATCH v2] staging: rtl8192u: Remove variable set but not used
by kernel test robot
Hi "Fabio,
Thank you for the patch! Yet something to improve:
[auto build test ERROR on staging/staging-testing]
url: https://github.com/0day-ci/linux/commits/Fabio-M-De-Francesco/staging-rtl...
base: https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging.git 1b9e18de8d43bf798622cc365f99b41f180b446f
config: x86_64-allyesconfig (attached as .config)
compiler: gcc-9 (Debian 9.3.0-22) 9.3.0
reproduce (this is a W=1 build):
# https://github.com/0day-ci/linux/commit/0a66e6b5893f80ddaadaf4811de703afd...
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review Fabio-M-De-Francesco/staging-rtl8192u-Remove-variable-set-but-not-used/20210412-023753
git checkout 0a66e6b5893f80ddaadaf4811de703afdb15bbc7
# save the attached .config to linux build tree
make W=1 W=1 ARCH=x86_64
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All errors (new ones prefixed by >>):
drivers/staging/rtl8192u/r8192U_core.c: In function 'rtl8192_hard_data_xmit':
>> drivers/staging/rtl8192u/r8192U_core.c:917:2: error: 'ret' undeclared (first use in this function); did you mean 'net'?
917 | ret = rtl8192_tx(dev, skb);
| ^~~
| net
drivers/staging/rtl8192u/r8192U_core.c:917:2: note: each undeclared identifier is reported only once for each function it appears in
vim +917 drivers/staging/rtl8192u/r8192U_core.c
8fc8598e61f6f3 Jerry Chuang 2009-11-03 897
8fc8598e61f6f3 Jerry Chuang 2009-11-03 898 /* this function TX data frames when the ieee80211 stack requires this.
8fc8598e61f6f3 Jerry Chuang 2009-11-03 899 * It checks also if we need to stop the ieee tx queue, eventually do it
8fc8598e61f6f3 Jerry Chuang 2009-11-03 900 */
069b3162590896 Raphaël Beamonte 2015-09-20 901 static void rtl8192_hard_data_xmit(struct sk_buff *skb, struct net_device *dev,
069b3162590896 Raphaël Beamonte 2015-09-20 902 int rate)
8fc8598e61f6f3 Jerry Chuang 2009-11-03 903 {
8fc8598e61f6f3 Jerry Chuang 2009-11-03 904 struct r8192_priv *priv = (struct r8192_priv *)ieee80211_priv(dev);
8fc8598e61f6f3 Jerry Chuang 2009-11-03 905 unsigned long flags;
20f896c4dbb48f simran singhal 2017-02-12 906 struct cb_desc *tcb_desc = (struct cb_desc *)(skb->cb + MAX_DEV_ADDR_SIZE);
8fc8598e61f6f3 Jerry Chuang 2009-11-03 907 u8 queue_index = tcb_desc->queue_index;
8fc8598e61f6f3 Jerry Chuang 2009-11-03 908
8fc8598e61f6f3 Jerry Chuang 2009-11-03 909 /* shall not be referred by command packet */
4a8d1135548baf Xenia Ragiadakou 2013-06-09 910 RTL8192U_ASSERT(queue_index != TXCMD_QUEUE);
8fc8598e61f6f3 Jerry Chuang 2009-11-03 911
8fc8598e61f6f3 Jerry Chuang 2009-11-03 912 spin_lock_irqsave(&priv->tx_lock, flags);
8fc8598e61f6f3 Jerry Chuang 2009-11-03 913
c3f463484bdd0a Ben Hutchings 2016-04-21 914 *(struct net_device **)(skb->cb) = dev;
8fc8598e61f6f3 Jerry Chuang 2009-11-03 915 tcb_desc->bTxEnableFwCalcDur = 1;
8fc8598e61f6f3 Jerry Chuang 2009-11-03 916 skb_push(skb, priv->ieee80211->tx_headroom);
8fc8598e61f6f3 Jerry Chuang 2009-11-03 @917 ret = rtl8192_tx(dev, skb);
8fc8598e61f6f3 Jerry Chuang 2009-11-03 918
8fc8598e61f6f3 Jerry Chuang 2009-11-03 919 spin_unlock_irqrestore(&priv->tx_lock, flags);
8fc8598e61f6f3 Jerry Chuang 2009-11-03 920 }
8fc8598e61f6f3 Jerry Chuang 2009-11-03 921
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 5 months