All of lore.kernel.org
 help / color / mirror / Atom feed
* lib/atomic64_test.c:217:9: error: implicit declaration of function 'atomic64_dec_if_positive'
@ 2016-10-09 14:37 kbuild test robot
  2016-10-10 16:21   ` Vineet Gupta
  0 siblings, 1 reply; 3+ messages in thread
From: kbuild test robot @ 2016-10-09 14:37 UTC (permalink / raw)
  To: Vineet Gupta
  Cc: kbuild-all, linux-kernel, Andrew Morton, Linux Memory Management List

[-- Attachment #1: Type: text/plain, Size: 4002 bytes --]

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head:   b66484cd74706fa8681d051840fe4b18a3da40ff
commit: 51a021244b9d579be6b4f8c15c493a76deb2a79e atomic64: no need for CONFIG_ARCH_HAS_ATOMIC64_DEC_IF_POSITIVE
date:   2 days ago
config: frv-allmodconfig (attached as .config)
compiler: frv-linux-gcc (GCC) 6.2.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 51a021244b9d579be6b4f8c15c493a76deb2a79e
        # save the attached .config to linux build tree
        make.cross ARCH=frv 

All errors (new ones prefixed by >>):

   In file included from include/linux/init.h:4:0,
                    from lib/atomic64_test.c:14:
   lib/atomic64_test.c: In function 'test_atomic64':
   lib/atomic64_test.c:208:9: error: implicit declaration of function 'atomic64_add_unless' [-Werror=implicit-function-declaration]
     BUG_ON(atomic64_add_unless(&v, one, v0));
            ^
   include/linux/compiler.h:168:42: note: in definition of macro 'unlikely'
    # define unlikely(x) __builtin_expect(!!(x), 0)
                                             ^
   lib/atomic64_test.c:208:2: note: in expansion of macro 'BUG_ON'
     BUG_ON(atomic64_add_unless(&v, one, v0));
     ^~~~~~
>> lib/atomic64_test.c:217:9: error: implicit declaration of function 'atomic64_dec_if_positive' [-Werror=implicit-function-declaration]
     BUG_ON(atomic64_dec_if_positive(&v) != (onestwos - 1));
            ^
   include/linux/compiler.h:168:42: note: in definition of macro 'unlikely'
    # define unlikely(x) __builtin_expect(!!(x), 0)
                                             ^
   lib/atomic64_test.c:217:2: note: in expansion of macro 'BUG_ON'
     BUG_ON(atomic64_dec_if_positive(&v) != (onestwos - 1));
     ^~~~~~
   lib/atomic64_test.c:230:10: error: implicit declaration of function 'atomic64_inc_not_zero' [-Werror=implicit-function-declaration]
     BUG_ON(!atomic64_inc_not_zero(&v));
             ^
   include/linux/compiler.h:168:42: note: in definition of macro 'unlikely'
    # define unlikely(x) __builtin_expect(!!(x), 0)
                                             ^
   lib/atomic64_test.c:230:2: note: in expansion of macro 'BUG_ON'
     BUG_ON(!atomic64_inc_not_zero(&v));
     ^~~~~~
   cc1: some warnings being treated as errors

vim +/atomic64_dec_if_positive +217 lib/atomic64_test.c

978e5a36 Boqun Feng    2015-11-04  202  	DEC_RETURN_FAMILY_TEST(64, v0);
86a89380 Luca Barbieri 2010-02-24  203  
978e5a36 Boqun Feng    2015-11-04  204  	XCHG_FAMILY_TEST(64, v0, v1);
978e5a36 Boqun Feng    2015-11-04  205  	CMPXCHG_FAMILY_TEST(64, v0, v1, v2);
86a89380 Luca Barbieri 2010-02-24  206  
86a89380 Luca Barbieri 2010-02-24  207  	INIT(v0);
9efbcd59 Luca Barbieri 2010-03-01 @208  	BUG_ON(atomic64_add_unless(&v, one, v0));
86a89380 Luca Barbieri 2010-02-24  209  	BUG_ON(v.counter != r);
86a89380 Luca Barbieri 2010-02-24  210  
86a89380 Luca Barbieri 2010-02-24  211  	INIT(v0);
9efbcd59 Luca Barbieri 2010-03-01  212  	BUG_ON(!atomic64_add_unless(&v, one, v1));
86a89380 Luca Barbieri 2010-02-24  213  	r += one;
86a89380 Luca Barbieri 2010-02-24  214  	BUG_ON(v.counter != r);
86a89380 Luca Barbieri 2010-02-24  215  
86a89380 Luca Barbieri 2010-02-24  216  	INIT(onestwos);
86a89380 Luca Barbieri 2010-02-24 @217  	BUG_ON(atomic64_dec_if_positive(&v) != (onestwos - 1));
86a89380 Luca Barbieri 2010-02-24  218  	r -= one;
86a89380 Luca Barbieri 2010-02-24  219  	BUG_ON(v.counter != r);
86a89380 Luca Barbieri 2010-02-24  220  

:::::: The code at line 217 was first introduced by commit
:::::: 86a8938078a8bb518c5376de493e348c7490d506 lib: Add self-test for atomic64_t

:::::: TO: Luca Barbieri <luca@luca-barbieri.com>
:::::: CC: H. Peter Anvin <hpa@zytor.com>

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

[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 45559 bytes --]

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: lib/atomic64_test.c:217:9: error: implicit declaration of function 'atomic64_dec_if_positive'
  2016-10-09 14:37 lib/atomic64_test.c:217:9: error: implicit declaration of function 'atomic64_dec_if_positive' kbuild test robot
@ 2016-10-10 16:21   ` Vineet Gupta
  0 siblings, 0 replies; 3+ messages in thread
From: Vineet Gupta @ 2016-10-10 16:21 UTC (permalink / raw)
  To: kbuild test robot, Andrew Morton, Peter Zijlstra
  Cc: kbuild-all, linux-kernel, Linux Memory Management List

Hi Andrew / Peter,

On 10/09/2016 07:37 AM, kbuild test robot wrote:
> tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
> head:   b66484cd74706fa8681d051840fe4b18a3da40ff
> commit: 51a021244b9d579be6b4f8c15c493a76deb2a79e atomic64: no need for CONFIG_ARCH_HAS_ATOMIC64_DEC_IF_POSITIVE
> date:   2 days ago
> config: frv-allmodconfig (attached as .config)
> compiler: frv-linux-gcc (GCC) 6.2.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 51a021244b9d579be6b4f8c15c493a76deb2a79e
>         # save the attached .config to linux build tree
>         make.cross ARCH=frv 
>
> All errors (new ones prefixed by >>):
>
>    In file included from include/linux/init.h:4:0,
>                     from lib/atomic64_test.c:14:
>    lib/atomic64_test.c: In function 'test_atomic64':
>    lib/atomic64_test.c:208:9: error: implicit declaration of function 'atomic64_add_unless' [-Werror=implicit-function-declaration]
>      BUG_ON(atomic64_add_unless(&v, one, v0));

FWIW, this error was not introduced by my patch. It seems on FRV atomic64 self
tests were never enabled and thus the breakage was not noticed. I took today's
upstream linus tree, reverted my patch and still see this error. There are

Should we make ATOMIC64_SELFTEST depend on !FRV - or do we prefer adding the
missing primitives to seeming orphan arch ? I took a quick look at their atomic.h
and it seems non trivial given my frv foo !

>             ^
>    include/linux/compiler.h:168:42: note: in definition of macro 'unlikely'
>     # define unlikely(x) __builtin_expect(!!(x), 0)
>                                              ^
>    lib/atomic64_test.c:208:2: note: in expansion of macro 'BUG_ON'
>      BUG_ON(atomic64_add_unless(&v, one, v0));
>      ^~~~~~
>>> lib/atomic64_test.c:217:9: error: implicit declaration of function 'atomic64_dec_if_positive' [-Werror=implicit-function-declaration]
>      BUG_ON(atomic64_dec_if_positive(&v) != (onestwos - 1));
>             ^
>    include/linux/compiler.h:168:42: note: in definition of macro 'unlikely'
>     # define unlikely(x) __builtin_expect(!!(x), 0)
>                                              ^
>    lib/atomic64_test.c:217:2: note: in expansion of macro 'BUG_ON'
>      BUG_ON(atomic64_dec_if_positive(&v) != (onestwos - 1));
>      ^~~~~~
>    lib/atomic64_test.c:230:10: error: implicit declaration of function 'atomic64_inc_not_zero' [-Werror=implicit-function-declaration]
>      BUG_ON(!atomic64_inc_not_zero(&v));
>              ^
>    include/linux/compiler.h:168:42: note: in definition of macro 'unlikely'
>     # define unlikely(x) __builtin_expect(!!(x), 0)
>                                              ^
>    lib/atomic64_test.c:230:2: note: in expansion of macro 'BUG_ON'
>      BUG_ON(!atomic64_inc_not_zero(&v));
>      ^~~~~~
>    cc1: some warnings being treated as errors
>
> vim +/atomic64_dec_if_positive +217 lib/atomic64_test.c
>
> 978e5a36 Boqun Feng    2015-11-04  202  	DEC_RETURN_FAMILY_TEST(64, v0);
> 86a89380 Luca Barbieri 2010-02-24  203  
> 978e5a36 Boqun Feng    2015-11-04  204  	XCHG_FAMILY_TEST(64, v0, v1);
> 978e5a36 Boqun Feng    2015-11-04  205  	CMPXCHG_FAMILY_TEST(64, v0, v1, v2);
> 86a89380 Luca Barbieri 2010-02-24  206  
> 86a89380 Luca Barbieri 2010-02-24  207  	INIT(v0);
> 9efbcd59 Luca Barbieri 2010-03-01 @208  	BUG_ON(atomic64_add_unless(&v, one, v0));
> 86a89380 Luca Barbieri 2010-02-24  209  	BUG_ON(v.counter != r);
> 86a89380 Luca Barbieri 2010-02-24  210  
> 86a89380 Luca Barbieri 2010-02-24  211  	INIT(v0);
> 9efbcd59 Luca Barbieri 2010-03-01  212  	BUG_ON(!atomic64_add_unless(&v, one, v1));
> 86a89380 Luca Barbieri 2010-02-24  213  	r += one;
> 86a89380 Luca Barbieri 2010-02-24  214  	BUG_ON(v.counter != r);
> 86a89380 Luca Barbieri 2010-02-24  215  
> 86a89380 Luca Barbieri 2010-02-24  216  	INIT(onestwos);
> 86a89380 Luca Barbieri 2010-02-24 @217  	BUG_ON(atomic64_dec_if_positive(&v) != (onestwos - 1));
> 86a89380 Luca Barbieri 2010-02-24  218  	r -= one;
> 86a89380 Luca Barbieri 2010-02-24  219  	BUG_ON(v.counter != r);
> 86a89380 Luca Barbieri 2010-02-24  220  
>
> :::::: The code at line 217 was first introduced by commit
> :::::: 86a8938078a8bb518c5376de493e348c7490d506 lib: Add self-test for atomic64_t
>
> :::::: TO: Luca Barbieri <luca@luca-barbieri.com>
> :::::: CC: H. Peter Anvin <hpa@zytor.com>
>
> ---
> 0-DAY kernel test infrastructure                Open Source Technology Center
> https://lists.01.org/pipermail/kbuild-all                   Intel Corporation

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: lib/atomic64_test.c:217:9: error: implicit declaration of function 'atomic64_dec_if_positive'
@ 2016-10-10 16:21   ` Vineet Gupta
  0 siblings, 0 replies; 3+ messages in thread
From: Vineet Gupta @ 2016-10-10 16:21 UTC (permalink / raw)
  To: kbuild test robot, Andrew Morton, Peter Zijlstra
  Cc: kbuild-all, linux-kernel, Linux Memory Management List

Hi Andrew / Peter,

On 10/09/2016 07:37 AM, kbuild test robot wrote:
> tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
> head:   b66484cd74706fa8681d051840fe4b18a3da40ff
> commit: 51a021244b9d579be6b4f8c15c493a76deb2a79e atomic64: no need for CONFIG_ARCH_HAS_ATOMIC64_DEC_IF_POSITIVE
> date:   2 days ago
> config: frv-allmodconfig (attached as .config)
> compiler: frv-linux-gcc (GCC) 6.2.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 51a021244b9d579be6b4f8c15c493a76deb2a79e
>         # save the attached .config to linux build tree
>         make.cross ARCH=frv 
>
> All errors (new ones prefixed by >>):
>
>    In file included from include/linux/init.h:4:0,
>                     from lib/atomic64_test.c:14:
>    lib/atomic64_test.c: In function 'test_atomic64':
>    lib/atomic64_test.c:208:9: error: implicit declaration of function 'atomic64_add_unless' [-Werror=implicit-function-declaration]
>      BUG_ON(atomic64_add_unless(&v, one, v0));

FWIW, this error was not introduced by my patch. It seems on FRV atomic64 self
tests were never enabled and thus the breakage was not noticed. I took today's
upstream linus tree, reverted my patch and still see this error. There are

Should we make ATOMIC64_SELFTEST depend on !FRV - or do we prefer adding the
missing primitives to seeming orphan arch ? I took a quick look at their atomic.h
and it seems non trivial given my frv foo !

>             ^
>    include/linux/compiler.h:168:42: note: in definition of macro 'unlikely'
>     # define unlikely(x) __builtin_expect(!!(x), 0)
>                                              ^
>    lib/atomic64_test.c:208:2: note: in expansion of macro 'BUG_ON'
>      BUG_ON(atomic64_add_unless(&v, one, v0));
>      ^~~~~~
>>> lib/atomic64_test.c:217:9: error: implicit declaration of function 'atomic64_dec_if_positive' [-Werror=implicit-function-declaration]
>      BUG_ON(atomic64_dec_if_positive(&v) != (onestwos - 1));
>             ^
>    include/linux/compiler.h:168:42: note: in definition of macro 'unlikely'
>     # define unlikely(x) __builtin_expect(!!(x), 0)
>                                              ^
>    lib/atomic64_test.c:217:2: note: in expansion of macro 'BUG_ON'
>      BUG_ON(atomic64_dec_if_positive(&v) != (onestwos - 1));
>      ^~~~~~
>    lib/atomic64_test.c:230:10: error: implicit declaration of function 'atomic64_inc_not_zero' [-Werror=implicit-function-declaration]
>      BUG_ON(!atomic64_inc_not_zero(&v));
>              ^
>    include/linux/compiler.h:168:42: note: in definition of macro 'unlikely'
>     # define unlikely(x) __builtin_expect(!!(x), 0)
>                                              ^
>    lib/atomic64_test.c:230:2: note: in expansion of macro 'BUG_ON'
>      BUG_ON(!atomic64_inc_not_zero(&v));
>      ^~~~~~
>    cc1: some warnings being treated as errors
>
> vim +/atomic64_dec_if_positive +217 lib/atomic64_test.c
>
> 978e5a36 Boqun Feng    2015-11-04  202  	DEC_RETURN_FAMILY_TEST(64, v0);
> 86a89380 Luca Barbieri 2010-02-24  203  
> 978e5a36 Boqun Feng    2015-11-04  204  	XCHG_FAMILY_TEST(64, v0, v1);
> 978e5a36 Boqun Feng    2015-11-04  205  	CMPXCHG_FAMILY_TEST(64, v0, v1, v2);
> 86a89380 Luca Barbieri 2010-02-24  206  
> 86a89380 Luca Barbieri 2010-02-24  207  	INIT(v0);
> 9efbcd59 Luca Barbieri 2010-03-01 @208  	BUG_ON(atomic64_add_unless(&v, one, v0));
> 86a89380 Luca Barbieri 2010-02-24  209  	BUG_ON(v.counter != r);
> 86a89380 Luca Barbieri 2010-02-24  210  
> 86a89380 Luca Barbieri 2010-02-24  211  	INIT(v0);
> 9efbcd59 Luca Barbieri 2010-03-01  212  	BUG_ON(!atomic64_add_unless(&v, one, v1));
> 86a89380 Luca Barbieri 2010-02-24  213  	r += one;
> 86a89380 Luca Barbieri 2010-02-24  214  	BUG_ON(v.counter != r);
> 86a89380 Luca Barbieri 2010-02-24  215  
> 86a89380 Luca Barbieri 2010-02-24  216  	INIT(onestwos);
> 86a89380 Luca Barbieri 2010-02-24 @217  	BUG_ON(atomic64_dec_if_positive(&v) != (onestwos - 1));
> 86a89380 Luca Barbieri 2010-02-24  218  	r -= one;
> 86a89380 Luca Barbieri 2010-02-24  219  	BUG_ON(v.counter != r);
> 86a89380 Luca Barbieri 2010-02-24  220  
>
> :::::: The code at line 217 was first introduced by commit
> :::::: 86a8938078a8bb518c5376de493e348c7490d506 lib: Add self-test for atomic64_t
>
> :::::: TO: Luca Barbieri <luca@luca-barbieri.com>
> :::::: CC: H. Peter Anvin <hpa@zytor.com>
>
> ---
> 0-DAY kernel test infrastructure                Open Source Technology Center
> https://lists.01.org/pipermail/kbuild-all                   Intel Corporation

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2016-10-10 16:25 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-10-09 14:37 lib/atomic64_test.c:217:9: error: implicit declaration of function 'atomic64_dec_if_positive' kbuild test robot
2016-10-10 16:21 ` Vineet Gupta
2016-10-10 16:21   ` Vineet Gupta

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.