lib/atomic64_test.c:107:2: error: implicit declaration of function 'atomic64_add_unless'

From: kbuild test robot
Date: Sat Jun 11 2016 - 13:45:11 EST


Hi,

FYI, the error/warning still remains.

tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: 3d0f0b6a5520878305589411b8d434fe088e4f21
commit: 86a8938078a8bb518c5376de493e348c7490d506 lib: Add self-test for atomic64_t
date: 6 years ago
config: frv-allmodconfig (attached as .config)
compiler: frv-linux-gcc (GCC) 4.9.0
reproduce:
wget https://git.kernel.org/cgit/linux/kernel/git/wfg/lkp-tests.git/plain/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
git checkout 86a8938078a8bb518c5376de493e348c7490d506
# save the attached .config to linux build tree
make.cross ARCH=frv

All errors (new ones prefixed by >>):

lib/atomic64_test.c: In function 'test_atomic64':
>> lib/atomic64_test.c:107:2: error: implicit declaration of function 'atomic64_add_unless' [-Werror=implicit-function-declaration]
BUG_ON(!atomic64_add_unless(&v, one, v0));
^
lib/atomic64_test.c:116:2: error: implicit declaration of function 'atomic64_dec_if_positive' [-Werror=implicit-function-declaration]
BUG_ON(atomic64_dec_if_positive(&v) != (onestwos - 1));
^
>> lib/atomic64_test.c:129:2: error: implicit declaration of function 'atomic64_inc_not_zero' [-Werror=implicit-function-declaration]
BUG_ON(atomic64_inc_not_zero(&v));
^
cc1: some warnings being treated as errors

vim +/atomic64_add_unless +107 lib/atomic64_test.c

101
102 INIT(v0);
103 BUG_ON(atomic64_cmpxchg(&v, v2, v1) != v0);
104 BUG_ON(v.counter != r);
105
106 INIT(v0);
> 107 BUG_ON(!atomic64_add_unless(&v, one, v0));
108 BUG_ON(v.counter != r);
109
110 INIT(v0);
111 BUG_ON(atomic64_add_unless(&v, one, v1));
112 r += one;
113 BUG_ON(v.counter != r);
114
115 INIT(onestwos);
116 BUG_ON(atomic64_dec_if_positive(&v) != (onestwos - 1));
117 r -= one;
118 BUG_ON(v.counter != r);
119
120 INIT(0);
121 BUG_ON(atomic64_dec_if_positive(&v) != -one);
122 BUG_ON(v.counter != r);
123
124 INIT(-one);
125 BUG_ON(atomic64_dec_if_positive(&v) != (-one - one));
126 BUG_ON(v.counter != r);
127
128 INIT(onestwos);
> 129 BUG_ON(atomic64_inc_not_zero(&v));
130 r += one;
131 BUG_ON(v.counter != r);
132

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

Attachment: .config.gz
Description: Binary data