All of lore.kernel.org
 help / color / mirror / Atom feed
* [mark-rutland:atomics/arch-atomic 15/17] include/asm-generic/atomic-instrumented.h:1806:26: warning: passing argument 1 of 'instrument_atomic_write' makes pointer from integer without a cast
@ 2021-04-26 22:00 kernel test robot
  0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2021-04-26 22:00 UTC (permalink / raw)
  To: kbuild-all

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

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/mark/linux.git atomics/arch-atomic
head:   451d56ed8917089d67f2efbf22f190005adb268c
commit: 0cab05ea851461fef9a393600e90df6a828f49a9 [15/17] locking/atomic: csky: move to the arch_atomic API
config: csky-defconfig (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
        # https://git.kernel.org/pub/scm/linux/kernel/git/mark/linux.git/commit/?id=0cab05ea851461fef9a393600e90df6a828f49a9
        git remote add mark-rutland https://git.kernel.org/pub/scm/linux/kernel/git/mark/linux.git
        git fetch --no-tags mark-rutland atomics/arch-atomic
        git checkout 0cab05ea851461fef9a393600e90df6a828f49a9
        # 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@intel.com>

All warnings (new ones prefixed by >>):

   In file included from include/linux/atomic.h:82,
                    from include/asm-generic/bitops/lock.h:5,
                    from arch/csky/include/asm/bitops.h:70,
                    from include/linux/bitops.h:32,
                    from include/linux/kernel.h:11,
                    from include/linux/list.h:9,
                    from include/linux/module.h:12,
                    from fs/nfs/fs_context.c:13:
   fs/nfs/fs_context.c: In function 'nfs23_parse_monolithic':
   include/asm-generic/atomic-instrumented.h:1804:1: error: expected identifier or '*' before '(' token
    1804 | ({ \
         | ^
   include/asm-generic/cmpxchg.h:96:17: note: in expansion of macro 'cmpxchg64_local'
      96 | #define generic cmpxchg64_local(ptr, o, n) \
         |                 ^~~~~~~~~~~~~~~
   fs/nfs/fs_context.c:1045:8: note: in expansion of macro 'generic'
    1045 |   goto generic;
         |        ^~~~~~~
   include/asm-generic/cmpxchg.h:96:33: error: 'ptr' undeclared (first use in this function)
      96 | #define generic cmpxchg64_local(ptr, o, n) \
         |                                 ^~~
   include/asm-generic/atomic-instrumented.h:1805:9: note: in definition of macro 'cmpxchg64_local'
    1805 |  typeof(ptr) __ai_ptr = (ptr); \
         |         ^~~
   fs/nfs/fs_context.c:1051:1: note: in expansion of macro 'generic'
    1051 | generic:
         | ^~~~~~~
   include/asm-generic/cmpxchg.h:96:33: note: each undeclared identifier is reported only once for each function it appears in
      96 | #define generic cmpxchg64_local(ptr, o, n) \
         |                                 ^~~
   include/asm-generic/atomic-instrumented.h:1805:9: note: in definition of macro 'cmpxchg64_local'
    1805 |  typeof(ptr) __ai_ptr = (ptr); \
         |         ^~~
   fs/nfs/fs_context.c:1051:1: note: in expansion of macro 'generic'
    1051 | generic:
         | ^~~~~~~
   include/asm-generic/atomic-instrumented.h:1806:43: error: invalid type argument of unary '*' (have 'int')
    1806 |  instrument_atomic_write(__ai_ptr, sizeof(*__ai_ptr)); \
         |                                           ^~~~~~~~~
   include/asm-generic/cmpxchg.h:96:17: note: in expansion of macro 'cmpxchg64_local'
      96 | #define generic cmpxchg64_local(ptr, o, n) \
         |                 ^~~~~~~~~~~~~~~
   fs/nfs/fs_context.c:1051:1: note: in expansion of macro 'generic'
    1051 | generic:
         | ^~~~~~~
>> include/asm-generic/atomic-instrumented.h:1806:26: warning: passing argument 1 of 'instrument_atomic_write' makes pointer from integer without a cast [-Wint-conversion]
    1806 |  instrument_atomic_write(__ai_ptr, sizeof(*__ai_ptr)); \
         |                          ^~~~~~~~
         |                          |
         |                          int
   include/asm-generic/cmpxchg.h:96:17: note: in expansion of macro 'cmpxchg64_local'
      96 | #define generic cmpxchg64_local(ptr, o, n) \
         |                 ^~~~~~~~~~~~~~~
   fs/nfs/fs_context.c:1051:1: note: in expansion of macro 'generic'
    1051 | generic:
         | ^~~~~~~
   In file included from include/asm-generic/atomic-instrumented.h:22,
                    from include/linux/atomic.h:82,
                    from include/asm-generic/bitops/lock.h:5,
                    from arch/csky/include/asm/bitops.h:70,
                    from include/linux/bitops.h:32,
                    from include/linux/kernel.h:11,
                    from include/linux/list.h:9,
                    from include/linux/module.h:12,
                    from fs/nfs/fs_context.c:13:
   include/linux/instrumented.h:84:74: note: expected 'const volatile void *' but argument is of type 'int'
      84 | static __always_inline void instrument_atomic_write(const volatile void *v, size_t size)
         |                                                     ~~~~~~~~~~~~~~~~~~~~~^
   In file included from arch/csky/include/asm/cmpxchg.h:77,
                    from include/asm-generic/atomic.h:12,
                    from arch/csky/include/asm/atomic.h:7,
                    from include/linux/atomic.h:7,
                    from include/asm-generic/bitops/lock.h:5,
                    from arch/csky/include/asm/bitops.h:70,
                    from include/linux/bitops.h:32,
                    from include/linux/kernel.h:11,
                    from include/linux/list.h:9,
                    from include/linux/module.h:12,
                    from fs/nfs/fs_context.c:13:
   include/asm-generic/cmpxchg.h:111:30: error: implicit declaration of function 'generic_cmpxchg64_local'; did you mean 'generic_cmpxchg_local'? [-Werror=implicit-function-declaration]
     111 | #define arch_cmpxchg64_local generic_cmpxchg64_local
         |                              ^~~~~~~~~~~~~~~~~~~~~~~
   include/asm-generic/atomic-instrumented.h:1807:2: note: in expansion of macro 'arch_cmpxchg64_local'
    1807 |  arch_cmpxchg64_local(__ai_ptr, __VA_ARGS__); \
         |  ^~~~~~~~~~~~~~~~~~~~
   include/asm-generic/cmpxchg.h:96:17: note: in expansion of macro 'cmpxchg64_local'
      96 | #define generic cmpxchg64_local(ptr, o, n) \
         |                 ^~~~~~~~~~~~~~~
   fs/nfs/fs_context.c:1051:1: note: in expansion of macro 'generic'
    1051 | generic:
         | ^~~~~~~
   In file included from include/linux/atomic.h:82,
                    from include/asm-generic/bitops/lock.h:5,
                    from arch/csky/include/asm/bitops.h:70,
                    from include/linux/bitops.h:32,
                    from include/linux/kernel.h:11,
                    from include/linux/list.h:9,
                    from include/linux/module.h:12,
                    from fs/nfs/fs_context.c:13:
   include/asm-generic/cmpxchg.h:96:38: error: 'o' undeclared (first use in this function)
      96 | #define generic cmpxchg64_local(ptr, o, n) \
         |                                      ^
   include/asm-generic/atomic-instrumented.h:1807:33: note: in definition of macro 'cmpxchg64_local'
    1807 |  arch_cmpxchg64_local(__ai_ptr, __VA_ARGS__); \
         |                                 ^~~~~~~~~~~
   fs/nfs/fs_context.c:1051:1: note: in expansion of macro 'generic'
    1051 | generic:
         | ^~~~~~~
   include/asm-generic/cmpxchg.h:96:41: error: 'n' undeclared (first use in this function)
      96 | #define generic cmpxchg64_local(ptr, o, n) \
         |                                         ^
   include/asm-generic/atomic-instrumented.h:1807:33: note: in definition of macro 'cmpxchg64_local'
    1807 |  arch_cmpxchg64_local(__ai_ptr, __VA_ARGS__); \
         |                                 ^~~~~~~~~~~
   fs/nfs/fs_context.c:1051:1: note: in expansion of macro 'generic'
    1051 | generic:
         | ^~~~~~~
   In file included from arch/csky/include/asm/cmpxchg.h:77,
                    from include/asm-generic/atomic.h:12,
                    from arch/csky/include/asm/atomic.h:7,
                    from include/linux/atomic.h:7,
                    from include/asm-generic/bitops/lock.h:5,
                    from arch/csky/include/asm/bitops.h:70,
                    from include/linux/bitops.h:32,
                    from include/linux/kernel.h:11,
                    from include/linux/list.h:9,
                    from include/linux/module.h:12,
                    from fs/nfs/fs_context.c:13:
   include/asm-generic/cmpxchg.h:97:2: error: expected ';' before '__generic_cmpxchg64_local'
      97 |  __generic_cmpxchg64_local((ptr), (o), (n))
         |  ^~~~~~~~~~~~~~~~~~~~~~~~~
   fs/nfs/fs_context.c:1051:1: note: in expansion of macro 'generic'
    1051 | generic:
         | ^~~~~~~
   cc1: some warnings being treated as errors


vim +/instrument_atomic_write +1806 include/asm-generic/atomic-instrumented.h

b06ed71a624ba0 Dmitry Vyukov 2018-01-29  1802  
aa525d063851a9 Mark Rutland  2018-09-04  1803  #define cmpxchg64_local(ptr, ...) \
b06ed71a624ba0 Dmitry Vyukov 2018-01-29  1804  ({ \
df79ed2c064363 Mark Rutland  2018-07-16  1805  	typeof(ptr) __ai_ptr = (ptr); \
ed8af2e4d2a71b Marco Elver   2020-01-21 @1806  	instrument_atomic_write(__ai_ptr, sizeof(*__ai_ptr)); \
aa525d063851a9 Mark Rutland  2018-09-04  1807  	arch_cmpxchg64_local(__ai_ptr, __VA_ARGS__); \
b06ed71a624ba0 Dmitry Vyukov 2018-01-29  1808  })
b06ed71a624ba0 Dmitry Vyukov 2018-01-29  1809  

:::::: The code at line 1806 was first introduced by commit
:::::: ed8af2e4d2a71bd58f5776b7e5a477d136e32be4 asm-generic, atomic-instrumented: Use generic instrumented.h

:::::: TO: Marco Elver <elver@google.com>
:::::: CC: Ingo Molnar <mingo@kernel.org>

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

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

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2021-04-26 22:00 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-04-26 22:00 [mark-rutland:atomics/arch-atomic 15/17] include/asm-generic/atomic-instrumented.h:1806:26: warning: passing argument 1 of 'instrument_atomic_write' makes pointer from integer without a cast kernel test robot

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.