[cryptodev:master 241/242] include/asm-generic/qspinlock.h:65:55: warning: pointer targets in passing argument 2 of 'atomic_try_cmpxchg' differ in signedness

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



tree:   https://kernel.googlesource.com/pub/scm/linux/kernel/git/herbert/cryptodev-2.6.git master
head:   1bbbbcfdc0f0fa7a98ba0d551fd03d2c45d5a318
commit: 9ecf5ad522e09d6e11a7e0a0b1845622a480f478 [241/242] crypto: sha256 - Add missing MODULE_LICENSE() to lib/crypto/sha256.c
config: x86_64-randconfig-c001-201934 (attached as .config)
compiler: gcc-7 (Debian 7.4.0-11) 7.4.0
reproduce:
        git checkout 9ecf5ad522e09d6e11a7e0a0b1845622a480f478
        # save the attached .config to linux build tree
        make ARCH=x86_64 

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

All warnings (new ones prefixed by >>):

   In file included from arch/x86/include/asm/bitops.h:16:0,
                    from include/linux/bitops.h:19,
                    from lib/crypto/sha256.c:14:
   include/asm-generic/qspinlock.h: In function 'queued_spin_trylock':
>> include/asm-generic/qspinlock.h:65:55: warning: pointer targets in passing argument 2 of 'atomic_try_cmpxchg' differ in signedness [-Wpointer-sign]
     return likely(atomic_try_cmpxchg_acquire(&lock->val, &val, _Q_LOCKED_VAL));
                                                          ^
   include/linux/compiler.h:33:34: note: in definition of macro '__branch_check__'
       ______r = __builtin_expect(!!(x), expect); \
                                     ^
>> include/asm-generic/qspinlock.h:65:9: note: in expansion of macro 'likely'
     return likely(atomic_try_cmpxchg_acquire(&lock->val, &val, _Q_LOCKED_VAL));
            ^~~~~~
   In file included from arch/x86/include/asm/atomic.h:265:0,
                    from include/linux/atomic.h:7,
                    from include/linux/jump_label.h:249,
                    from include/linux/static_key.h:1,
                    from arch/x86/include/asm/nospec-branch.h:6,
                    from arch/x86/include/asm/paravirt_types.h:46,
                    from arch/x86/include/asm/ptrace.h:94,
                    from arch/x86/include/asm/math_emu.h:5,
                    from arch/x86/include/asm/processor.h:12,
                    from arch/x86/include/asm/cpufeature.h:5,
                    from arch/x86/include/asm/thread_info.h:53,
                    from include/linux/thread_info.h:38,
                    from arch/x86/include/asm/preempt.h:7,
                    from include/linux/preempt.h:78,
                    from include/linux/spinlock.h:51,
                    from include/linux/seqlock.h:36,
                    from include/linux/time.h:6,
                    from include/linux/stat.h:19,
                    from include/linux/module.h:10,
                    from lib/crypto/sha256.c:16:
   include/asm-generic/atomic-instrumented.h:691:1: note: expected 'int *' but argument is of type 'u32 * {aka unsigned int *}'
    atomic_try_cmpxchg(atomic_t *v, int *old, int new)
    ^~~~~~~~~~~~~~~~~~
   In file included from arch/x86/include/asm/bitops.h:16:0,
                    from include/linux/bitops.h:19,
                    from lib/crypto/sha256.c:14:
>> include/asm-generic/qspinlock.h:65:55: warning: pointer targets in passing argument 2 of 'atomic_try_cmpxchg' differ in signedness [-Wpointer-sign]
     return likely(atomic_try_cmpxchg_acquire(&lock->val, &val, _Q_LOCKED_VAL));
                                                          ^
   include/linux/compiler.h:35:19: note: in definition of macro '__branch_check__'
              expect, is_constant); \
                      ^~~~~~~~~~~
>> include/asm-generic/qspinlock.h:65:9: note: in expansion of macro 'likely'
     return likely(atomic_try_cmpxchg_acquire(&lock->val, &val, _Q_LOCKED_VAL));
            ^~~~~~
   In file included from arch/x86/include/asm/atomic.h:265:0,
                    from include/linux/atomic.h:7,
                    from include/linux/jump_label.h:249,
                    from include/linux/static_key.h:1,
                    from arch/x86/include/asm/nospec-branch.h:6,
                    from arch/x86/include/asm/paravirt_types.h:46,
                    from arch/x86/include/asm/ptrace.h:94,
                    from arch/x86/include/asm/math_emu.h:5,
                    from arch/x86/include/asm/processor.h:12,
                    from arch/x86/include/asm/cpufeature.h:5,
                    from arch/x86/include/asm/thread_info.h:53,
                    from include/linux/thread_info.h:38,
                    from arch/x86/include/asm/preempt.h:7,
                    from include/linux/preempt.h:78,
                    from include/linux/spinlock.h:51,
                    from include/linux/seqlock.h:36,
                    from include/linux/time.h:6,
                    from include/linux/stat.h:19,
                    from include/linux/module.h:10,
                    from lib/crypto/sha256.c:16:
   include/asm-generic/atomic-instrumented.h:691:1: note: expected 'int *' but argument is of type 'u32 * {aka unsigned int *}'
    atomic_try_cmpxchg(atomic_t *v, int *old, int new)
    ^~~~~~~~~~~~~~~~~~
   In file included from arch/x86/include/asm/bitops.h:16:0,
                    from include/linux/bitops.h:19,
                    from lib/crypto/sha256.c:14:
   include/asm-generic/qspinlock.h: In function 'queued_spin_lock':
   include/asm-generic/qspinlock.h:78:52: warning: pointer targets in passing argument 2 of 'atomic_try_cmpxchg' differ in signedness [-Wpointer-sign]
     if (likely(atomic_try_cmpxchg_acquire(&lock->val, &val, _Q_LOCKED_VAL)))
                                                       ^
   include/linux/compiler.h:58:52: note: in definition of macro '__trace_if_var'
    #define __trace_if_var(cond) (__builtin_constant_p(cond) ? (cond) : __trace_if_value(cond))
                                                       ^~~~
>> include/asm-generic/qspinlock.h:78:2: note: in expansion of macro 'if'
     if (likely(atomic_try_cmpxchg_acquire(&lock->val, &val, _Q_LOCKED_VAL)))
     ^~
   include/linux/compiler.h:45:22: note: in expansion of macro '__branch_check__'
    #  define likely(x) (__branch_check__(x, 1, __builtin_constant_p(x)))
                         ^~~~~~~~~~~~~~~~
   include/asm-generic/qspinlock.h:78:6: note: in expansion of macro 'likely'
     if (likely(atomic_try_cmpxchg_acquire(&lock->val, &val, _Q_LOCKED_VAL)))
         ^~~~~~
   In file included from arch/x86/include/asm/atomic.h:265:0,
                    from include/linux/atomic.h:7,
                    from include/linux/jump_label.h:249,
                    from include/linux/static_key.h:1,
                    from arch/x86/include/asm/nospec-branch.h:6,
                    from arch/x86/include/asm/paravirt_types.h:46,
                    from arch/x86/include/asm/ptrace.h:94,
                    from arch/x86/include/asm/math_emu.h:5,
                    from arch/x86/include/asm/processor.h:12,
                    from arch/x86/include/asm/cpufeature.h:5,
                    from arch/x86/include/asm/thread_info.h:53,
                    from include/linux/thread_info.h:38,
                    from arch/x86/include/asm/preempt.h:7,
                    from include/linux/preempt.h:78,
                    from include/linux/spinlock.h:51,
                    from include/linux/seqlock.h:36,
                    from include/linux/time.h:6,
                    from include/linux/stat.h:19,
                    from include/linux/module.h:10,
                    from lib/crypto/sha256.c:16:
   include/asm-generic/atomic-instrumented.h:691:1: note: expected 'int *' but argument is of type 'u32 * {aka unsigned int *}'
    atomic_try_cmpxchg(atomic_t *v, int *old, int new)
    ^~~~~~~~~~~~~~~~~~
   In file included from arch/x86/include/asm/bitops.h:16:0,
                    from include/linux/bitops.h:19,
                    from lib/crypto/sha256.c:14:
   include/asm-generic/qspinlock.h:78:52: warning: pointer targets in passing argument 2 of 'atomic_try_cmpxchg' differ in signedness [-Wpointer-sign]
     if (likely(atomic_try_cmpxchg_acquire(&lock->val, &val, _Q_LOCKED_VAL)))
                                                       ^
   include/linux/compiler.h:58:52: note: in definition of macro '__trace_if_var'
    #define __trace_if_var(cond) (__builtin_constant_p(cond) ? (cond) : __trace_if_value(cond))
                                                       ^~~~
>> include/asm-generic/qspinlock.h:78:2: note: in expansion of macro 'if'
     if (likely(atomic_try_cmpxchg_acquire(&lock->val, &val, _Q_LOCKED_VAL)))
     ^~
   include/linux/compiler.h:45:22: note: in expansion of macro '__branch_check__'
    #  define likely(x) (__branch_check__(x, 1, __builtin_constant_p(x)))
                         ^~~~~~~~~~~~~~~~
   include/asm-generic/qspinlock.h:78:6: note: in expansion of macro 'likely'
     if (likely(atomic_try_cmpxchg_acquire(&lock->val, &val, _Q_LOCKED_VAL)))
         ^~~~~~
   In file included from arch/x86/include/asm/atomic.h:265:0,
                    from include/linux/atomic.h:7,
                    from include/linux/jump_label.h:249,
                    from include/linux/static_key.h:1,
                    from arch/x86/include/asm/nospec-branch.h:6,
                    from arch/x86/include/asm/paravirt_types.h:46,
                    from arch/x86/include/asm/ptrace.h:94,
                    from arch/x86/include/asm/math_emu.h:5,
                    from arch/x86/include/asm/processor.h:12,
                    from arch/x86/include/asm/cpufeature.h:5,
                    from arch/x86/include/asm/thread_info.h:53,
                    from include/linux/thread_info.h:38,
                    from arch/x86/include/asm/preempt.h:7,
                    from include/linux/preempt.h:78,
                    from include/linux/spinlock.h:51,
                    from include/linux/seqlock.h:36,
                    from include/linux/time.h:6,
                    from include/linux/stat.h:19,
                    from include/linux/module.h:10,
                    from lib/crypto/sha256.c:16:
   include/asm-generic/atomic-instrumented.h:691:1: note: expected 'int *' but argument is of type 'u32 * {aka unsigned int *}'
    atomic_try_cmpxchg(atomic_t *v, int *old, int new)
    ^~~~~~~~~~~~~~~~~~
   In file included from arch/x86/include/asm/bitops.h:16:0,
                    from include/linux/bitops.h:19,
                    from lib/crypto/sha256.c:14:
   include/asm-generic/qspinlock.h:78:52: warning: pointer targets in passing argument 2 of 'atomic_try_cmpxchg' differ in signedness [-Wpointer-sign]
     if (likely(atomic_try_cmpxchg_acquire(&lock->val, &val, _Q_LOCKED_VAL)))
                                                       ^
   include/linux/compiler.h:58:61: note: in definition of macro '__trace_if_var'
    #define __trace_if_var(cond) (__builtin_constant_p(cond) ? (cond) : __trace_if_value(cond))
                                                                ^~~~
>> include/asm-generic/qspinlock.h:78:2: note: in expansion of macro 'if'
     if (likely(atomic_try_cmpxchg_acquire(&lock->val, &val, _Q_LOCKED_VAL)))
     ^~
   include/linux/compiler.h:45:22: note: in expansion of macro '__branch_check__'
    #  define likely(x) (__branch_check__(x, 1, __builtin_constant_p(x)))
                         ^~~~~~~~~~~~~~~~
   include/asm-generic/qspinlock.h:78:6: note: in expansion of macro 'likely'
     if (likely(atomic_try_cmpxchg_acquire(&lock->val, &val, _Q_LOCKED_VAL)))
         ^~~~~~
   In file included from arch/x86/include/asm/atomic.h:265:0,
                    from include/linux/atomic.h:7,
                    from include/linux/jump_label.h:249,
                    from include/linux/static_key.h:1,
                    from arch/x86/include/asm/nospec-branch.h:6,
                    from arch/x86/include/asm/paravirt_types.h:46,
                    from arch/x86/include/asm/ptrace.h:94,
                    from arch/x86/include/asm/math_emu.h:5,
                    from arch/x86/include/asm/processor.h:12,
                    from arch/x86/include/asm/cpufeature.h:5,
                    from arch/x86/include/asm/thread_info.h:53,
                    from include/linux/thread_info.h:38,
                    from arch/x86/include/asm/preempt.h:7,
                    from include/linux/preempt.h:78,
                    from include/linux/spinlock.h:51,
                    from include/linux/seqlock.h:36,
                    from include/linux/time.h:6,
                    from include/linux/stat.h:19,
                    from include/linux/module.h:10,
                    from lib/crypto/sha256.c:16:
   include/asm-generic/atomic-instrumented.h:691:1: note: expected 'int *' but argument is of type 'u32 * {aka unsigned int *}'
    atomic_try_cmpxchg(atomic_t *v, int *old, int new)
    ^~~~~~~~~~~~~~~~~~
   In file included from arch/x86/include/asm/bitops.h:16:0,
                    from include/linux/bitops.h:19,
                    from lib/crypto/sha256.c:14:
   include/asm-generic/qspinlock.h:78:52: warning: pointer targets in passing argument 2 of 'atomic_try_cmpxchg' differ in signedness [-Wpointer-sign]
     if (likely(atomic_try_cmpxchg_acquire(&lock->val, &val, _Q_LOCKED_VAL)))
                                                       ^
   include/linux/compiler.h:58:61: note: in definition of macro '__trace_if_var'
    #define __trace_if_var(cond) (__builtin_constant_p(cond) ? (cond) : __trace_if_value(cond))
                                                                ^~~~
>> include/asm-generic/qspinlock.h:78:2: note: in expansion of macro 'if'
     if (likely(atomic_try_cmpxchg_acquire(&lock->val, &val, _Q_LOCKED_VAL)))
     ^~
   include/linux/compiler.h:45:22: note: in expansion of macro '__branch_check__'
    #  define likely(x) (__branch_check__(x, 1, __builtin_constant_p(x)))
                         ^~~~~~~~~~~~~~~~
   include/asm-generic/qspinlock.h:78:6: note: in expansion of macro 'likely'
     if (likely(atomic_try_cmpxchg_acquire(&lock->val, &val, _Q_LOCKED_VAL)))
         ^~~~~~
   In file included from arch/x86/include/asm/atomic.h:265:0,
                    from include/linux/atomic.h:7,
                    from include/linux/jump_label.h:249,
                    from include/linux/static_key.h:1,
                    from arch/x86/include/asm/nospec-branch.h:6,
                    from arch/x86/include/asm/paravirt_types.h:46,
                    from arch/x86/include/asm/ptrace.h:94,
                    from arch/x86/include/asm/math_emu.h:5,
                    from arch/x86/include/asm/processor.h:12,
                    from arch/x86/include/asm/cpufeature.h:5,
                    from arch/x86/include/asm/thread_info.h:53,
                    from include/linux/thread_info.h:38,
                    from arch/x86/include/asm/preempt.h:7,
                    from include/linux/preempt.h:78,
                    from include/linux/spinlock.h:51,
                    from include/linux/seqlock.h:36,
                    from include/linux/time.h:6,
                    from include/linux/stat.h:19,
                    from include/linux/module.h:10,
                    from lib/crypto/sha256.c:16:
   include/asm-generic/atomic-instrumented.h:691:1: note: expected 'int *' but argument is of type 'u32 * {aka unsigned int *}'
    atomic_try_cmpxchg(atomic_t *v, int *old, int new)
    ^~~~~~~~~~~~~~~~~~
   In file included from arch/x86/include/asm/bitops.h:16:0,
                    from include/linux/bitops.h:19,
                    from lib/crypto/sha256.c:14:
   include/asm-generic/qspinlock.h:78:52: warning: pointer targets in passing argument 2 of 'atomic_try_cmpxchg' differ in signedness [-Wpointer-sign]
     if (likely(atomic_try_cmpxchg_acquire(&lock->val, &val, _Q_LOCKED_VAL)))
                                                       ^
   include/linux/compiler.h:69:3: note: in definition of macro '__trace_if_value'
     (cond) ?     \
      ^~~~
   include/linux/compiler.h:56:28: note: in expansion of macro '__trace_if_var'
    #define if(cond, ...) if ( __trace_if_var( !!(cond , ## __VA_ARGS__) ) )
                               ^~~~~~~~~~~~~~
>> include/asm-generic/qspinlock.h:78:2: note: in expansion of macro 'if'
     if (likely(atomic_try_cmpxchg_acquire(&lock->val, &val, _Q_LOCKED_VAL)))
     ^~
   include/linux/compiler.h:45:22: note: in expansion of macro '__branch_check__'
    #  define likely(x) (__branch_check__(x, 1, __builtin_constant_p(x)))
                         ^~~~~~~~~~~~~~~~
   include/asm-generic/qspinlock.h:78:6: note: in expansion of macro 'likely'
     if (likely(atomic_try_cmpxchg_acquire(&lock->val, &val, _Q_LOCKED_VAL)))
         ^~~~~~
   In file included from arch/x86/include/asm/atomic.h:265:0,
                    from include/linux/atomic.h:7,
                    from include/linux/jump_label.h:249,
                    from include/linux/static_key.h:1,
                    from arch/x86/include/asm/nospec-branch.h:6,
                    from arch/x86/include/asm/paravirt_types.h:46,
                    from arch/x86/include/asm/ptrace.h:94,
                    from arch/x86/include/asm/math_emu.h:5,
                    from arch/x86/include/asm/processor.h:12,
                    from arch/x86/include/asm/cpufeature.h:5,
                    from arch/x86/include/asm/thread_info.h:53,
                    from include/linux/thread_info.h:38,
                    from arch/x86/include/asm/preempt.h:7,
                    from include/linux/preempt.h:78,
                    from include/linux/spinlock.h:51,
                    from include/linux/seqlock.h:36,
                    from include/linux/time.h:6,
                    from include/linux/stat.h:19,
                    from include/linux/module.h:10,
                    from lib/crypto/sha256.c:16:
   include/asm-generic/atomic-instrumented.h:691:1: note: expected 'int *' but argument is of type 'u32 * {aka unsigned int *}'
    atomic_try_cmpxchg(atomic_t *v, int *old, int new)
    ^~~~~~~~~~~~~~~~~~
   In file included from arch/x86/include/asm/bitops.h:16:0,
                    from include/linux/bitops.h:19,
                    from lib/crypto/sha256.c:14:
   include/asm-generic/qspinlock.h:78:52: warning: pointer targets in passing argument 2 of 'atomic_try_cmpxchg' differ in signedness [-Wpointer-sign]
     if (likely(atomic_try_cmpxchg_acquire(&lock->val, &val, _Q_LOCKED_VAL)))
                                                       ^
   include/linux/compiler.h:69:3: note: in definition of macro '__trace_if_value'
     (cond) ?     \
      ^~~~
   include/linux/compiler.h:56:28: note: in expansion of macro '__trace_if_var'
    #define if(cond, ...) if ( __trace_if_var( !!(cond , ## __VA_ARGS__) ) )
                               ^~~~~~~~~~~~~~
>> include/asm-generic/qspinlock.h:78:2: note: in expansion of macro 'if'
     if (likely(atomic_try_cmpxchg_acquire(&lock->val, &val, _Q_LOCKED_VAL)))
     ^~
   include/linux/compiler.h:45:22: note: in expansion of macro '__branch_check__'
    #  define likely(x) (__branch_check__(x, 1, __builtin_constant_p(x)))
                         ^~~~~~~~~~~~~~~~
   include/asm-generic/qspinlock.h:78:6: note: in expansion of macro 'likely'
     if (likely(atomic_try_cmpxchg_acquire(&lock->val, &val, _Q_LOCKED_VAL)))
         ^~~~~~
   In file included from arch/x86/include/asm/atomic.h:265:0,
                    from include/linux/atomic.h:7,
                    from include/linux/jump_label.h:249,
                    from include/linux/static_key.h:1,
                    from arch/x86/include/asm/nospec-branch.h:6,
                    from arch/x86/include/asm/paravirt_types.h:46,
                    from arch/x86/include/asm/ptrace.h:94,
                    from arch/x86/include/asm/math_emu.h:5,
                    from arch/x86/include/asm/processor.h:12,
                    from arch/x86/include/asm/cpufeature.h:5,
                    from arch/x86/include/asm/thread_info.h:53,
                    from include/linux/thread_info.h:38,
                    from arch/x86/include/asm/preempt.h:7,
                    from include/linux/preempt.h:78,
                    from include/linux/spinlock.h:51,
                    from include/linux/seqlock.h:36,
                    from include/linux/time.h:6,
                    from include/linux/stat.h:19,
                    from include/linux/module.h:10,
                    from lib/crypto/sha256.c:16:
   include/asm-generic/atomic-instrumented.h:691:1: note: expected 'int *' but argument is of type 'u32 * {aka unsigned int *}'
    atomic_try_cmpxchg(atomic_t *v, int *old, int new)
    ^~~~~~~~~~~~~~~~~~
   In file included from arch/x86/include/asm/bitops.h:16:0,
                    from include/linux/bitops.h:19,
                    from lib/crypto/sha256.c:14:
   include/asm-generic/qrwlock.h: In function 'queued_write_trylock':
>> include/asm-generic/qrwlock.h:65:56: warning: pointer targets in passing argument 2 of 'atomic_try_cmpxchg' differ in signedness [-Wpointer-sign]
     return likely(atomic_try_cmpxchg_acquire(&lock->cnts, &cnts,
                                                           ^
   include/linux/compiler.h:33:34: note: in definition of macro '__branch_check__'
       ______r = __builtin_expect(!!(x), expect); \
                                     ^
>> include/asm-generic/qrwlock.h:65:9: note: in expansion of macro 'likely'
     return likely(atomic_try_cmpxchg_acquire(&lock->cnts, &cnts,
            ^~~~~~
   In file included from arch/x86/include/asm/atomic.h:265:0,
                    from include/linux/atomic.h:7,
                    from include/linux/jump_label.h:249,
                    from include/linux/static_key.h:1,
                    from arch/x86/include/asm/nospec-branch.h:6,
                    from arch/x86/include/asm/paravirt_types.h:46,
                    from arch/x86/include/asm/ptrace.h:94,
                    from arch/x86/include/asm/math_emu.h:5,
                    from arch/x86/include/asm/processor.h:12,
                    from arch/x86/include/asm/cpufeature.h:5,
                    from arch/x86/include/asm/thread_info.h:53,
                    from include/linux/thread_info.h:38,
                    from arch/x86/include/asm/preempt.h:7,
                    from include/linux/preempt.h:78,
                    from include/linux/spinlock.h:51,
                    from include/linux/seqlock.h:36,
                    from include/linux/time.h:6,
                    from include/linux/stat.h:19,
                    from include/linux/module.h:10,
                    from lib/crypto/sha256.c:16:
   include/asm-generic/atomic-instrumented.h:691:1: note: expected 'int *' but argument is of type 'u32 * {aka unsigned int *}'
    atomic_try_cmpxchg(atomic_t *v, int *old, int new)
    ^~~~~~~~~~~~~~~~~~
   In file included from arch/x86/include/asm/bitops.h:16:0,
                    from include/linux/bitops.h:19,
                    from lib/crypto/sha256.c:14:
>> include/asm-generic/qrwlock.h:65:56: warning: pointer targets in passing argument 2 of 'atomic_try_cmpxchg' differ in signedness [-Wpointer-sign]
     return likely(atomic_try_cmpxchg_acquire(&lock->cnts, &cnts,
                                                           ^
   include/linux/compiler.h:35:19: note: in definition of macro '__branch_check__'
              expect, is_constant); \
                      ^~~~~~~~~~~
>> include/asm-generic/qrwlock.h:65:9: note: in expansion of macro 'likely'
     return likely(atomic_try_cmpxchg_acquire(&lock->cnts, &cnts,
            ^~~~~~
   In file included from arch/x86/include/asm/atomic.h:265:0,
                    from include/linux/atomic.h:7,
                    from include/linux/jump_label.h:249,
                    from include/linux/static_key.h:1,
                    from arch/x86/include/asm/nospec-branch.h:6,
                    from arch/x86/include/asm/paravirt_types.h:46,
                    from arch/x86/include/asm/ptrace.h:94,
                    from arch/x86/include/asm/math_emu.h:5,
                    from arch/x86/include/asm/processor.h:12,
                    from arch/x86/include/asm/cpufeature.h:5,
                    from arch/x86/include/asm/thread_info.h:53,
                    from include/linux/thread_info.h:38,
                    from arch/x86/include/asm/preempt.h:7,
                    from include/linux/preempt.h:78,
                    from include/linux/spinlock.h:51,
                    from include/linux/seqlock.h:36,
                    from include/linux/time.h:6,
                    from include/linux/stat.h:19,
                    from include/linux/module.h:10,
                    from lib/crypto/sha256.c:16:
   include/asm-generic/atomic-instrumented.h:691:1: note: expected 'int *' but argument is of type 'u32 * {aka unsigned int *}'
    atomic_try_cmpxchg(atomic_t *v, int *old, int new)
    ^~~~~~~~~~~~~~~~~~
   In file included from arch/x86/include/asm/bitops.h:16:0,
                    from include/linux/bitops.h:19,
                    from lib/crypto/sha256.c:14:
   include/asm-generic/qrwlock.h: In function 'queued_write_lock':
   include/asm-generic/qrwlock.h:92:53: warning: pointer targets in passing argument 2 of 'atomic_try_cmpxchg' differ in signedness [-Wpointer-sign]
     if (likely(atomic_try_cmpxchg_acquire(&lock->cnts, &cnts, _QW_LOCKED)))
                                                        ^
   include/linux/compiler.h:58:52: note: in definition of macro '__trace_if_var'
    #define __trace_if_var(cond) (__builtin_constant_p(cond) ? (cond) : __trace_if_value(cond))
                                                       ^~~~
>> include/asm-generic/qrwlock.h:92:2: note: in expansion of macro 'if'
     if (likely(atomic_try_cmpxchg_acquire(&lock->cnts, &cnts, _QW_LOCKED)))
     ^~
   include/linux/compiler.h:45:22: note: in expansion of macro '__branch_check__'
    #  define likely(x) (__branch_check__(x, 1, __builtin_constant_p(x)))
                         ^~~~~~~~~~~~~~~~
   include/asm-generic/qrwlock.h:92:6: note: in expansion of macro 'likely'
     if (likely(atomic_try_cmpxchg_acquire(&lock->cnts, &cnts, _QW_LOCKED)))
         ^~~~~~
   In file included from arch/x86/include/asm/atomic.h:265:0,
                    from include/linux/atomic.h:7,
                    from include/linux/jump_label.h:249,
                    from include/linux/static_key.h:1,
                    from arch/x86/include/asm/nospec-branch.h:6,
                    from arch/x86/include/asm/paravirt_types.h:46,
                    from arch/x86/include/asm/ptrace.h:94,
                    from arch/x86/include/asm/math_emu.h:5,
                    from arch/x86/include/asm/processor.h:12,
                    from arch/x86/include/asm/cpufeature.h:5,
                    from arch/x86/include/asm/thread_info.h:53,
                    from include/linux/thread_info.h:38,
                    from arch/x86/include/asm/preempt.h:7,
                    from include/linux/preempt.h:78,
                    from include/linux/spinlock.h:51,
                    from include/linux/seqlock.h:36,
                    from include/linux/time.h:6,
                    from include/linux/stat.h:19,
                    from include/linux/module.h:10,
                    from lib/crypto/sha256.c:16:
   include/asm-generic/atomic-instrumented.h:691:1: note: expected 'int *' but argument is of type 'u32 * {aka unsigned int *}'
    atomic_try_cmpxchg(atomic_t *v, int *old, int new)
    ^~~~~~~~~~~~~~~~~~
   In file included from arch/x86/include/asm/bitops.h:16:0,
                    from include/linux/bitops.h:19,
                    from lib/crypto/sha256.c:14:
   include/asm-generic/qrwlock.h:92:53: warning: pointer targets in passing argument 2 of 'atomic_try_cmpxchg' differ in signedness [-Wpointer-sign]
     if (likely(atomic_try_cmpxchg_acquire(&lock->cnts, &cnts, _QW_LOCKED)))
                                                        ^
   include/linux/compiler.h:58:52: note: in definition of macro '__trace_if_var'
    #define __trace_if_var(cond) (__builtin_constant_p(cond) ? (cond) : __trace_if_value(cond))
                                                       ^~~~
>> include/asm-generic/qrwlock.h:92:2: note: in expansion of macro 'if'
     if (likely(atomic_try_cmpxchg_acquire(&lock->cnts, &cnts, _QW_LOCKED)))
     ^~
   include/linux/compiler.h:45:22: note: in expansion of macro '__branch_check__'
    #  define likely(x) (__branch_check__(x, 1, __builtin_constant_p(x)))
                         ^~~~~~~~~~~~~~~~
   include/asm-generic/qrwlock.h:92:6: note: in expansion of macro 'likely'
     if (likely(atomic_try_cmpxchg_acquire(&lock->cnts, &cnts, _QW_LOCKED)))
         ^~~~~~
   In file included from arch/x86/include/asm/atomic.h:265:0,
                    from include/linux/atomic.h:7,
                    from include/linux/jump_label.h:249,
                    from include/linux/static_key.h:1,
                    from arch/x86/include/asm/nospec-branch.h:6,
                    from arch/x86/include/asm/paravirt_types.h:46,
                    from arch/x86/include/asm/ptrace.h:94,
                    from arch/x86/include/asm/math_emu.h:5,
                    from arch/x86/include/asm/processor.h:12,
                    from arch/x86/include/asm/cpufeature.h:5,
                    from arch/x86/include/asm/thread_info.h:53,
                    from include/linux/thread_info.h:38,
                    from arch/x86/include/asm/preempt.h:7,
                    from include/linux/preempt.h:78,
                    from include/linux/spinlock.h:51,
                    from include/linux/seqlock.h:36,
                    from include/linux/time.h:6,
                    from include/linux/stat.h:19,
                    from include/linux/module.h:10,
                    from lib/crypto/sha256.c:16:
   include/asm-generic/atomic-instrumented.h:691:1: note: expected 'int *' but argument is of type 'u32 * {aka unsigned int *}'
    atomic_try_cmpxchg(atomic_t *v, int *old, int new)
    ^~~~~~~~~~~~~~~~~~
   In file included from arch/x86/include/asm/bitops.h:16:0,
                    from include/linux/bitops.h:19,
                    from lib/crypto/sha256.c:14:
   include/asm-generic/qrwlock.h:92:53: warning: pointer targets in passing argument 2 of 'atomic_try_cmpxchg' differ in signedness [-Wpointer-sign]
     if (likely(atomic_try_cmpxchg_acquire(&lock->cnts, &cnts, _QW_LOCKED)))
                                                        ^
   include/linux/compiler.h:58:61: note: in definition of macro '__trace_if_var'
    #define __trace_if_var(cond) (__builtin_constant_p(cond) ? (cond) : __trace_if_value(cond))
                                                                ^~~~
>> include/asm-generic/qrwlock.h:92:2: note: in expansion of macro 'if'
     if (likely(atomic_try_cmpxchg_acquire(&lock->cnts, &cnts, _QW_LOCKED)))
     ^~
   include/linux/compiler.h:45:22: note: in expansion of macro '__branch_check__'
    #  define likely(x) (__branch_check__(x, 1, __builtin_constant_p(x)))
                         ^~~~~~~~~~~~~~~~
   include/asm-generic/qrwlock.h:92:6: note: in expansion of macro 'likely'
     if (likely(atomic_try_cmpxchg_acquire(&lock->cnts, &cnts, _QW_LOCKED)))
         ^~~~~~
   In file included from arch/x86/include/asm/atomic.h:265:0,
                    from include/linux/atomic.h:7,
                    from include/linux/jump_label.h:249,
                    from include/linux/static_key.h:1,
                    from arch/x86/include/asm/nospec-branch.h:6,
                    from arch/x86/include/asm/paravirt_types.h:46,
                    from arch/x86/include/asm/ptrace.h:94,
                    from arch/x86/include/asm/math_emu.h:5,
                    from arch/x86/include/asm/processor.h:12,
                    from arch/x86/include/asm/cpufeature.h:5,
                    from arch/x86/include/asm/thread_info.h:53,
                    from include/linux/thread_info.h:38,
                    from arch/x86/include/asm/preempt.h:7,
                    from include/linux/preempt.h:78,
                    from include/linux/spinlock.h:51,
                    from include/linux/seqlock.h:36,
                    from include/linux/time.h:6,
                    from include/linux/stat.h:19,
                    from include/linux/module.h:10,
                    from lib/crypto/sha256.c:16:
   include/asm-generic/atomic-instrumented.h:691:1: note: expected 'int *' but argument is of type 'u32 * {aka unsigned int *}'
    atomic_try_cmpxchg(atomic_t *v, int *old, int new)
    ^~~~~~~~~~~~~~~~~~
   In file included from arch/x86/include/asm/bitops.h:16:0,
                    from include/linux/bitops.h:19,
                    from lib/crypto/sha256.c:14:
   include/asm-generic/qrwlock.h:92:53: warning: pointer targets in passing argument 2 of 'atomic_try_cmpxchg' differ in signedness [-Wpointer-sign]
     if (likely(atomic_try_cmpxchg_acquire(&lock->cnts, &cnts, _QW_LOCKED)))
                                                        ^
   include/linux/compiler.h:58:61: note: in definition of macro '__trace_if_var'
    #define __trace_if_var(cond) (__builtin_constant_p(cond) ? (cond) : __trace_if_value(cond))
                                                                ^~~~
>> include/asm-generic/qrwlock.h:92:2: note: in expansion of macro 'if'
     if (likely(atomic_try_cmpxchg_acquire(&lock->cnts, &cnts, _QW_LOCKED)))
     ^~
   include/linux/compiler.h:45:22: note: in expansion of macro '__branch_check__'
    #  define likely(x) (__branch_check__(x, 1, __builtin_constant_p(x)))
                         ^~~~~~~~~~~~~~~~
   include/asm-generic/qrwlock.h:92:6: note: in expansion of macro 'likely'
     if (likely(atomic_try_cmpxchg_acquire(&lock->cnts, &cnts, _QW_LOCKED)))
         ^~~~~~
   In file included from arch/x86/include/asm/atomic.h:265:0,
                    from include/linux/atomic.h:7,
                    from include/linux/jump_label.h:249,
                    from include/linux/static_key.h:1,
                    from arch/x86/include/asm/nospec-branch.h:6,
                    from arch/x86/include/asm/paravirt_types.h:46,
                    from arch/x86/include/asm/ptrace.h:94,
                    from arch/x86/include/asm/math_emu.h:5,
                    from arch/x86/include/asm/processor.h:12,
                    from arch/x86/include/asm/cpufeature.h:5,
                    from arch/x86/include/asm/thread_info.h:53,
                    from include/linux/thread_info.h:38,
                    from arch/x86/include/asm/preempt.h:7,
                    from include/linux/preempt.h:78,
                    from include/linux/spinlock.h:51,
                    from include/linux/seqlock.h:36,
                    from include/linux/time.h:6,
                    from include/linux/stat.h:19,
                    from include/linux/module.h:10,
                    from lib/crypto/sha256.c:16:
   include/asm-generic/atomic-instrumented.h:691:1: note: expected 'int *' but argument is of type 'u32 * {aka unsigned int *}'
    atomic_try_cmpxchg(atomic_t *v, int *old, int new)
    ^~~~~~~~~~~~~~~~~~
   In file included from arch/x86/include/asm/bitops.h:16:0,
                    from include/linux/bitops.h:19,
                    from lib/crypto/sha256.c:14:
   include/asm-generic/qrwlock.h:92:53: warning: pointer targets in passing argument 2 of 'atomic_try_cmpxchg' differ in signedness [-Wpointer-sign]
     if (likely(atomic_try_cmpxchg_acquire(&lock->cnts, &cnts, _QW_LOCKED)))
                                                        ^
   include/linux/compiler.h:69:3: note: in definition of macro '__trace_if_value'
     (cond) ?     \
      ^~~~
   include/linux/compiler.h:56:28: note: in expansion of macro '__trace_if_var'
    #define if(cond, ...) if ( __trace_if_var( !!(cond , ## __VA_ARGS__) ) )
                               ^~~~~~~~~~~~~~
>> include/asm-generic/qrwlock.h:92:2: note: in expansion of macro 'if'
     if (likely(atomic_try_cmpxchg_acquire(&lock->cnts, &cnts, _QW_LOCKED)))
     ^~
   include/linux/compiler.h:45:22: note: in expansion of macro '__branch_check__'
    #  define likely(x) (__branch_check__(x, 1, __builtin_constant_p(x)))
                         ^~~~~~~~~~~~~~~~
   include/asm-generic/qrwlock.h:92:6: note: in expansion of macro 'likely'
     if (likely(atomic_try_cmpxchg_acquire(&lock->cnts, &cnts, _QW_LOCKED)))
         ^~~~~~
   In file included from arch/x86/include/asm/atomic.h:265:0,
                    from include/linux/atomic.h:7,
                    from include/linux/jump_label.h:249,
                    from include/linux/static_key.h:1,
                    from arch/x86/include/asm/nospec-branch.h:6,
                    from arch/x86/include/asm/paravirt_types.h:46,
                    from arch/x86/include/asm/ptrace.h:94,
                    from arch/x86/include/asm/math_emu.h:5,
                    from arch/x86/include/asm/processor.h:12,
                    from arch/x86/include/asm/cpufeature.h:5,
                    from arch/x86/include/asm/thread_info.h:53,
                    from include/linux/thread_info.h:38,
                    from arch/x86/include/asm/preempt.h:7,
                    from include/linux/preempt.h:78,
                    from include/linux/spinlock.h:51,
                    from include/linux/seqlock.h:36,
                    from include/linux/time.h:6,
                    from include/linux/stat.h:19,
                    from include/linux/module.h:10,
                    from lib/crypto/sha256.c:16:
   include/asm-generic/atomic-instrumented.h:691:1: note: expected 'int *' but argument is of type 'u32 * {aka unsigned int *}'
    atomic_try_cmpxchg(atomic_t *v, int *old, int new)
    ^~~~~~~~~~~~~~~~~~
   In file included from arch/x86/include/asm/bitops.h:16:0,
                    from include/linux/bitops.h:19,
                    from lib/crypto/sha256.c:14:
   include/asm-generic/qrwlock.h:92:53: warning: pointer targets in passing argument 2 of 'atomic_try_cmpxchg' differ in signedness [-Wpointer-sign]
     if (likely(atomic_try_cmpxchg_acquire(&lock->cnts, &cnts, _QW_LOCKED)))
                                                        ^
   include/linux/compiler.h:69:3: note: in definition of macro '__trace_if_value'
     (cond) ?     \
      ^~~~
   include/linux/compiler.h:56:28: note: in expansion of macro '__trace_if_var'
    #define if(cond, ...) if ( __trace_if_var( !!(cond , ## __VA_ARGS__) ) )
                               ^~~~~~~~~~~~~~
>> include/asm-generic/qrwlock.h:92:2: note: in expansion of macro 'if'
     if (likely(atomic_try_cmpxchg_acquire(&lock->cnts, &cnts, _QW_LOCKED)))
     ^~
   include/linux/compiler.h:45:22: note: in expansion of macro '__branch_check__'
    #  define likely(x) (__branch_check__(x, 1, __builtin_constant_p(x)))
                         ^~~~~~~~~~~~~~~~
   include/asm-generic/qrwlock.h:92:6: note: in expansion of macro 'likely'
     if (likely(atomic_try_cmpxchg_acquire(&lock->cnts, &cnts, _QW_LOCKED)))
         ^~~~~~
   In file included from arch/x86/include/asm/atomic.h:265:0,
                    from include/linux/atomic.h:7,
                    from include/linux/jump_label.h:249,
                    from include/linux/static_key.h:1,
                    from arch/x86/include/asm/nospec-branch.h:6,
                    from arch/x86/include/asm/paravirt_types.h:46,
                    from arch/x86/include/asm/ptrace.h:94,
                    from arch/x86/include/asm/math_emu.h:5,
                    from arch/x86/include/asm/processor.h:12,
                    from arch/x86/include/asm/cpufeature.h:5,
                    from arch/x86/include/asm/thread_info.h:53,
                    from include/linux/thread_info.h:38,
                    from arch/x86/include/asm/preempt.h:7,
                    from include/linux/preempt.h:78,
                    from include/linux/spinlock.h:51,
                    from include/linux/seqlock.h:36,
                    from include/linux/time.h:6,
                    from include/linux/stat.h:19,
                    from include/linux/module.h:10,
                    from lib/crypto/sha256.c:16:
   include/asm-generic/atomic-instrumented.h:691:1: note: expected 'int *' but argument is of type 'u32 * {aka unsigned int *}'
    atomic_try_cmpxchg(atomic_t *v, int *old, int new)
    ^~~~~~~~~~~~~~~~~~

vim +/atomic_try_cmpxchg +65 include/asm-generic/qspinlock.h

a33fda35e3a765 Waiman Long    2015-04-24  43  
a33fda35e3a765 Waiman Long    2015-04-24  44  /**
a33fda35e3a765 Waiman Long    2015-04-24  45   * queued_spin_is_contended - check if the lock is contended
a33fda35e3a765 Waiman Long    2015-04-24  46   * @lock : Pointer to queued spinlock structure
a33fda35e3a765 Waiman Long    2015-04-24  47   * Return: 1 if lock contended, 0 otherwise
a33fda35e3a765 Waiman Long    2015-04-24  48   */
a33fda35e3a765 Waiman Long    2015-04-24  49  static __always_inline int queued_spin_is_contended(struct qspinlock *lock)
a33fda35e3a765 Waiman Long    2015-04-24  50  {
a33fda35e3a765 Waiman Long    2015-04-24  51  	return atomic_read(&lock->val) & ~_Q_LOCKED_MASK;
a33fda35e3a765 Waiman Long    2015-04-24  52  }
a33fda35e3a765 Waiman Long    2015-04-24  53  /**
a33fda35e3a765 Waiman Long    2015-04-24  54   * queued_spin_trylock - try to acquire the queued spinlock
a33fda35e3a765 Waiman Long    2015-04-24  55   * @lock : Pointer to queued spinlock structure
a33fda35e3a765 Waiman Long    2015-04-24  56   * Return: 1 if lock acquired, 0 if failed
a33fda35e3a765 Waiman Long    2015-04-24  57   */
a33fda35e3a765 Waiman Long    2015-04-24  58  static __always_inline int queued_spin_trylock(struct qspinlock *lock)
a33fda35e3a765 Waiman Long    2015-04-24  59  {
27df89689e257c Matthew Wilcox 2018-08-20  60  	u32 val = atomic_read(&lock->val);
27df89689e257c Matthew Wilcox 2018-08-20  61  
27df89689e257c Matthew Wilcox 2018-08-20  62  	if (unlikely(val))
a33fda35e3a765 Waiman Long    2015-04-24  63  		return 0;
27df89689e257c Matthew Wilcox 2018-08-20  64  
27df89689e257c Matthew Wilcox 2018-08-20 @65  	return likely(atomic_try_cmpxchg_acquire(&lock->val, &val, _Q_LOCKED_VAL));
a33fda35e3a765 Waiman Long    2015-04-24  66  }
a33fda35e3a765 Waiman Long    2015-04-24  67  
a33fda35e3a765 Waiman Long    2015-04-24  68  extern void queued_spin_lock_slowpath(struct qspinlock *lock, u32 val);
a33fda35e3a765 Waiman Long    2015-04-24  69  
a33fda35e3a765 Waiman Long    2015-04-24  70  /**
a33fda35e3a765 Waiman Long    2015-04-24  71   * queued_spin_lock - acquire a queued spinlock
a33fda35e3a765 Waiman Long    2015-04-24  72   * @lock: Pointer to queued spinlock structure
a33fda35e3a765 Waiman Long    2015-04-24  73   */
a33fda35e3a765 Waiman Long    2015-04-24  74  static __always_inline void queued_spin_lock(struct qspinlock *lock)
a33fda35e3a765 Waiman Long    2015-04-24  75  {
27df89689e257c Matthew Wilcox 2018-08-20  76  	u32 val = 0;
a33fda35e3a765 Waiman Long    2015-04-24  77  
27df89689e257c Matthew Wilcox 2018-08-20 @78  	if (likely(atomic_try_cmpxchg_acquire(&lock->val, &val, _Q_LOCKED_VAL)))
a33fda35e3a765 Waiman Long    2015-04-24  79  		return;
27df89689e257c Matthew Wilcox 2018-08-20  80  
a33fda35e3a765 Waiman Long    2015-04-24  81  	queued_spin_lock_slowpath(lock, val);
a33fda35e3a765 Waiman Long    2015-04-24  82  }
a33fda35e3a765 Waiman Long    2015-04-24  83  

:::::: The code at line 65 was first introduced by commit
:::::: 27df89689e257cccb604fdf56c91a75a25aa554a locking/spinlocks: Remove an instruction from spin and write locks

:::::: TO: Matthew Wilcox <willy@xxxxxxxxxxxxx>
:::::: CC: Ingo Molnar <mingo@xxxxxxxxxx>

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

Attachment: .config.gz
Description: application/gzip


[Index of Archives]     [Kernel]     [Gnu Classpath]     [Gnu Crypto]     [DM Crypt]     [Netfilter]     [Bugtraq]

  Powered by Linux