:::::: :::::: Manual check reason: "low confidence bisect report" :::::: Manual check reason: "low confidence static check first_new_problem: include/asm-generic/cmpxchg-local.h:36:22: warning: use of uninitialized value '*(u32 *)ptr' [CWE-457] [-Wanalyzer-use-of-uninitialized-value]" ::::::
BCC: [email protected] CC: [email protected] CC: [email protected] TO: Jagath Jog J <[email protected]> CC: Jonathan Cameron <[email protected]> tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master head: 6614a3c3164a5df2b54abb0b3559f51041cf705b commit: 3cf122c20bf835b53e8d2074611d68b7822be782 iio: accel: bma400: Add support for activity and inactivity events date: 8 weeks ago :::::: branch date: 9 hours ago :::::: commit date: 8 weeks ago config: arm-randconfig-c002-20220805 (https://download.01.org/0day-ci/archive/20220806/[email protected]/config) compiler: arm-linux-gnueabi-gcc (GCC) 12.1.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/?id=3cf122c20bf835b53e8d2074611d68b7822be782 git remote add linus https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git git fetch --no-tags linus master git checkout 3cf122c20bf835b53e8d2074611d68b7822be782 # save the config file COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-12.1.0 make.cross ARCH=arm KBUILD_USERCFLAGS='-fanalyzer -Wno-error' If you fix the issue, kindly add following tag where applicable Reported-by: kernel test robot <[email protected]> gcc-analyzer warnings: (new ones prefixed by >>) In file included from arch/arm/include/asm/cmpxchg.h:122, from arch/arm/include/asm/atomic.h:16, from include/linux/atomic.h:7, from include/asm-generic/bitops/lock.h:5, from arch/arm/include/asm/bitops.h:243, from include/linux/bitops.h:33, from drivers/iio/accel/bma400_core.c:15: include/asm-generic/cmpxchg-local.h: In function '__generic_cmpxchg_local': >> include/asm-generic/cmpxchg-local.h:36:22: warning: use of uninitialized >> value '*(u32 *)ptr' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 36 | case 4: prev = *(u32 *)ptr; | ~~~~~^~~~~~~~~~~~~ 'bma400_activity_event_en': events 1-4 | |drivers/iio/accel/bma400_core.c:1045:12: | 1045 | static int bma400_activity_event_en(struct bma400_data *data, | | ^~~~~~~~~~~~~~~~~~~~~~~~ | | | | | (1) entry to 'bma400_activity_event_en' |...... | 1049 | int ret, reg, msk, value, field_value; | | ~~~~~~~~~~~ | | | | | (2) region created on stack here | 1050 | | 1051 | switch (dir) { | | ~~~~~~ | | | | | (3) following 'case 1:' branch... | 1052 | case IIO_EV_DIR_RISING: | | ~~~~ | | | | | (4) ...to here | 'bma400_activity_event_en': event 5 | |arch/arm/include/asm/cmpxchg.h:138:25: | 138 | (__typeof(*ptr))__generic_cmpxchg_local((ptr), \ | | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | | | | | (5) calling '__generic_cmpxchg_local' from 'bma400_activity_event_en' | 139 | (unsigned long)(o), \ | | ~~~~~~~~~~~~~~~~~~~~~~~~~ | 140 | (unsigned long)(n), \ | | ~~~~~~~~~~~~~~~~~~~~~~~~~ | 141 | sizeof(*(ptr))); \ | | ~~~~~~~~~~~~~~~ include/asm-generic/cmpxchg.h:112:33: note: in expansion of macro 'arch_cmpxchg_local' | 112 | #define arch_cmpxchg arch_cmpxchg_local | | ^~~~~~~~~~~~~~~~~~ include/linux/atomic/atomic-instrumented.h:1916:9: note: in expansion of macro 'arch_cmpxchg' | 1916 | arch_cmpxchg(__ai_ptr, __VA_ARGS__); \ | | ^~~~~~~~~~~~ include/linux/bitops.h:283:18: note: in expansion of macro 'cmpxchg' | 283 | } while (cmpxchg(ptr, old__, new__) != old__); \ | | ^~~~~~~ drivers/iio/accel/bma400_core.c:1056:17: note: in expansion of macro 'set_mask_bits' | 1056 | set_mask_bits(&field_value, BMA400_INT_GEN1_MSK, | | ^~~~~~~~~~~~~ | +--> '__generic_cmpxchg_local': events 6-7 | |include/asm-generic/cmpxchg-local.h:15:29: | 15 | static inline unsigned long __generic_cmpxchg_local(volatile void *ptr, | | ^~~~~~~~~~~~~~~~~~~~~~~ | | | | | (6) entry to '__generic_cmpxchg_local' |...... | 23 | if (size == 8 && sizeof(unsigned long) != 8) | | ~ | | | | | (7) following 'false' branch (when 'size != 8')... | '__generic_cmpxchg_local': event 8 | |arch/arm/include/asm/irqflags.h:76:9: | 76 | asm volatile( | | ^~~ | | | | | (8) ...to here | '__generic_cmpxchg_local': events 9-11 | |include/asm-generic/cmpxchg-local.h:27:9: | 27 | switch (size) { | | ^~~~~~ | | | | | (9) following 'case 4:' branch... |...... | 36 | case 4: prev = *(u32 *)ptr; | | ~~~~ ~~~~~~~~~~~~~~~~~~ | | | | | | | (11) use of uninitialized value '*(u32 *)ptr' here | | (10) ...to here | >> include/asm-generic/cmpxchg-local.h:36:22: warning: use of uninitialized >> value '*(u32 *)ptr' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 36 | case 4: prev = *(u32 *)ptr; | ~~~~~^~~~~~~~~~~~~ 'bma400_write_event_config': events 1-4 | |drivers/iio/accel/bma400_core.c:1104:12: | 1104 | static int bma400_write_event_config(struct iio_dev *indio_dev, | | ^~~~~~~~~~~~~~~~~~~~~~~~~ | | | | | (1) entry to 'bma400_write_event_config' |...... | 1112 | switch (chan->type) { | | ~~~~~~ | | | | | (2) following 'case 3:' branch... | 1113 | case IIO_ACCEL: | | ~~~~ | | | | | (3) ...to here | 1114 | mutex_lock(&data->mutex); | 1115 | ret = bma400_activity_event_en(data, dir, state); | | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | | | | | (4) calling 'bma400_activity_event_en' from 'bma400_write_event_config' | +--> 'bma400_activity_event_en': events 5-8 | | 1045 | static int bma400_activity_event_en(struct bma400_data *data, | | ^~~~~~~~~~~~~~~~~~~~~~~~ | | | | | (5) entry to 'bma400_activity_event_en' |...... | 1049 | int ret, reg, msk, value, field_value; | | ~~~~~~~~~~~ | | | | | (6) region created on stack here | 1050 | | 1051 | switch (dir) { | | ~~~~~~ | | | | | (7) following 'case 1:' branch... | 1052 | case IIO_EV_DIR_RISING: | | ~~~~ | | | | | (8) ...to here | 'bma400_activity_event_en': event 9 | |arch/arm/include/asm/cmpxchg.h:138:25: | 138 | (__typeof(*ptr))__generic_cmpxchg_local((ptr), \ | | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | | | | | (9) calling '__generic_cmpxchg_local' from 'bma400_activity_event_en' | 139 | (unsigned long)(o), \ | | ~~~~~~~~~~~~~~~~~~~~~~~~~ | 140 | (unsigned long)(n), \ | | ~~~~~~~~~~~~~~~~~~~~~~~~~ | 141 | sizeof(*(ptr))); \ | | ~~~~~~~~~~~~~~~ include/asm-generic/cmpxchg.h:112:33: note: in expansion of macro 'arch_cmpxchg_local' | 112 | #define arch_cmpxchg arch_cmpxchg_local | | ^~~~~~~~~~~~~~~~~~ include/linux/atomic/atomic-instrumented.h:1916:9: note: in expansion of macro 'arch_cmpxchg' | 1916 | arch_cmpxchg(__ai_ptr, __VA_ARGS__); \ | | ^~~~~~~~~~~~ include/linux/bitops.h:283:18: note: in expansion of macro 'cmpxchg' | 283 | } while (cmpxchg(ptr, old__, new__) != old__); \ | | ^~~~~~~ drivers/iio/accel/bma400_core.c:1056:17: note: in expansion of macro 'set_mask_bits' | 1056 | set_mask_bits(&field_value, BMA400_INT_GEN1_MSK, | | ^~~~~~~~~~~~~ | +--> '__generic_cmpxchg_local': events 10-11 | |include/asm-generic/cmpxchg-local.h:15:29: | 15 | static inline unsigned long __generic_cmpxchg_local(volatile void *ptr, | | ^~~~~~~~~~~~~~~~~~~~~~~ | | | | | (10) entry to '__generic_cmpxchg_local' |...... | 23 | if (size == 8 && sizeof(unsigned long) != 8) | | ~ | | | | | (11) following 'false' branch (when 'size != 8')... | '__generic_cmpxchg_local': event 12 | |arch/arm/include/asm/irqflags.h:76:9: | 76 | asm volatile( | | ^~~ | | | | | (12) ...to here | '__generic_cmpxchg_local': events 13-15 | |include/asm-generic/cmpxchg-local.h:27:9: | 27 | switch (size) { | | ^~~~~~ | | | | | (13) following 'case 4:' branch... |...... | 36 | case 4: prev = *(u32 *)ptr; | | ~~~~ ~~~~~~~~~~~~~~~~~~ | | | | | | | (15) use of uninitialized value '*(u32 *)ptr' here | | (14) ...to here | In file included from ./arch/arm/include/generated/asm/rwonce.h:1, from include/linux/compiler.h:248, from include/linux/build_bug.h:5, from include/linux/bitfield.h:10, from drivers/iio/accel/bma400_core.c:14: drivers/iio/accel/bma400_core.c: In function 'bma400_activity_event_en': >> include/asm-generic/rwonce.h:44:26: warning: use of uninitialized value >> 'field_value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 44 | #define __READ_ONCE(x) (*(const volatile __unqual_scalar_typeof(x) *)&(x)) | ~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ include/asm-generic/rwonce.h:50:9: note: in expansion of macro '__READ_ONCE' 50 | __READ_ONCE(x); \ | ^~~~~~~~~~~ include/linux/bitops.h:281:25: note: in expansion of macro 'READ_ONCE' 281 | old__ = READ_ONCE(*(ptr)); \ | ^~~~~~~~~ drivers/iio/accel/bma400_core.c:1056:17: note: in expansion of macro 'set_mask_bits' 1056 | set_mask_bits(&field_value, BMA400_INT_GEN1_MSK, | ^~~~~~~~~~~~~ 'bma400_activity_event_en': events 1-3 | | 1049 | int ret, reg, msk, value, field_value; | | ^~~~~~~~~~~ | | | | | (1) region created on stack here | 1050 | | 1051 | switch (dir) { | | ~~~~~~ | | | | | (2) following 'case 1:' branch... | 1052 | case IIO_EV_DIR_RISING: | | ~~~~ | | | | | (3) ...to here | 'bma400_activity_event_en': event 4 | |include/asm-generic/rwonce.h:44:26: | 44 | #define __READ_ONCE(x) (*(const volatile __unqual_scalar_typeof(x) *)&(x)) | | ~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | | | | | (4) use of uninitialized value 'field_value' here include/asm-generic/rwonce.h:50:9: note: in expansion of macro '__READ_ONCE' | 50 | __READ_ONCE(x); \ | | ^~~~~~~~~~~ include/linux/bitops.h:281:25: note: in expansion of macro 'READ_ONCE' | 281 | old__ = READ_ONCE(*(ptr)); \ | | ^~~~~~~~~ drivers/iio/accel/bma400_core.c:1056:17: note: in expansion of macro 'set_mask_bits' | 1056 | set_mask_bits(&field_value, BMA400_INT_GEN1_MSK, | | ^~~~~~~~~~~~~ | >> include/asm-generic/rwonce.h:44:26: warning: use of uninitialized value >> 'field_value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 44 | #define __READ_ONCE(x) (*(const volatile __unqual_scalar_typeof(x) *)&(x)) | ~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ include/asm-generic/rwonce.h:50:9: note: in expansion of macro '__READ_ONCE' 50 | __READ_ONCE(x); \ | ^~~~~~~~~~~ include/linux/bitops.h:281:25: note: in expansion of macro 'READ_ONCE' 281 | old__ = READ_ONCE(*(ptr)); \ | ^~~~~~~~~ drivers/iio/accel/bma400_core.c:1056:17: note: in expansion of macro 'set_mask_bits' 1056 | set_mask_bits(&field_value, BMA400_INT_GEN1_MSK, | ^~~~~~~~~~~~~ 'bma400_write_event_config': events 1-4 | | 1104 | static int bma400_write_event_config(struct iio_dev *indio_dev, | | ^~~~~~~~~~~~~~~~~~~~~~~~~ | | | | | (1) entry to 'bma400_write_event_config' |...... | 1112 | switch (chan->type) { | | ~~~~~~ | | | | | (2) following 'case 3:' branch... | 1113 | case IIO_ACCEL: | | ~~~~ | | | | | (3) ...to here | 1114 | mutex_lock(&data->mutex); | 1115 | ret = bma400_activity_event_en(data, dir, state); | | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | | | | | (4) calling 'bma400_activity_event_en' from 'bma400_write_event_config' | +--> 'bma400_activity_event_en': events 5-8 | | 1045 | static int bma400_activity_event_en(struct bma400_data *data, | | ^~~~~~~~~~~~~~~~~~~~~~~~ | | | | | (5) entry to 'bma400_activity_event_en' |...... | 1049 | int ret, reg, msk, value, field_value; | | ~~~~~~~~~~~ | | | | | (6) region created on stack here | 1050 | | 1051 | switch (dir) { | | ~~~~~~ | | | | | (7) following 'case 1:' branch... | 1052 | case IIO_EV_DIR_RISING: | | ~~~~ | | | | | (8) ...to here | 'bma400_activity_event_en': event 9 | |include/asm-generic/rwonce.h:44:26: | 44 | #define __READ_ONCE(x) (*(const volatile __unqual_scalar_typeof(x) *)&(x)) | | ~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | | | | | (9) use of uninitialized value 'field_value' here include/asm-generic/rwonce.h:50:9: note: in expansion of macro '__READ_ONCE' | 50 | __READ_ONCE(x); \ | | ^~~~~~~~~~~ include/linux/bitops.h:281:25: note: in expansion of macro 'READ_ONCE' | 281 | old__ = READ_ONCE(*(ptr)); \ | | ^~~~~~~~~ drivers/iio/accel/bma400_core.c:1056:17: note: in expansion of macro 'set_mask_bits' | 1056 | set_mask_bits(&field_value, BMA400_INT_GEN1_MSK, | | ^~~~~~~~~~~~~ | >> include/asm-generic/rwonce.h:44:26: warning: use of uninitialized value >> 'field_value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 44 | #define __READ_ONCE(x) (*(const volatile __unqual_scalar_typeof(x) *)&(x)) | ~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ include/asm-generic/rwonce.h:50:9: note: in expansion of macro '__READ_ONCE' 50 | __READ_ONCE(x); \ | ^~~~~~~~~~~ include/linux/bitops.h:281:25: note: in expansion of macro 'READ_ONCE' 281 | old__ = READ_ONCE(*(ptr)); \ | ^~~~~~~~~ drivers/iio/accel/bma400_core.c:1063:17: note: in expansion of macro 'set_mask_bits' 1063 | set_mask_bits(&field_value, BMA400_INT_GEN2_MSK, | ^~~~~~~~~~~~~ 'bma400_activity_event_en': events 1-3 | | 1049 | int ret, reg, msk, value, field_value; | | ^~~~~~~~~~~ | | | | | (1) region created on stack here | 1050 | | 1051 | switch (dir) { | | ~~~~~~ | | | | | (2) following 'case 2:' branch... |...... | 1059 | case IIO_EV_DIR_FALLING: | | ~~~~ | | | | | (3) ...to here | 'bma400_activity_event_en': event 4 | |include/asm-generic/rwonce.h:44:26: | 44 | #define __READ_ONCE(x) (*(const volatile __unqual_scalar_typeof(x) *)&(x)) | | ~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | | | | | (4) use of uninitialized value 'field_value' here include/asm-generic/rwonce.h:50:9: note: in expansion of macro '__READ_ONCE' | 50 | __READ_ONCE(x); \ | | ^~~~~~~~~~~ include/linux/bitops.h:281:25: note: in expansion of macro 'READ_ONCE' | 281 | old__ = READ_ONCE(*(ptr)); \ | | ^~~~~~~~~ drivers/iio/accel/bma400_core.c:1063:17: note: in expansion of macro 'set_mask_bits' | 1063 | set_mask_bits(&field_value, BMA400_INT_GEN2_MSK, | | ^~~~~~~~~~~~~ | >> include/asm-generic/rwonce.h:44:26: warning: use of uninitialized value >> 'field_value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 44 | #define __READ_ONCE(x) (*(const volatile __unqual_scalar_typeof(x) *)&(x)) | ~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ include/asm-generic/rwonce.h:50:9: note: in expansion of macro '__READ_ONCE' 50 | __READ_ONCE(x); \ | ^~~~~~~~~~~ include/linux/bitops.h:281:25: note: in expansion of macro 'READ_ONCE' 281 | old__ = READ_ONCE(*(ptr)); \ | ^~~~~~~~~ drivers/iio/accel/bma400_core.c:1063:17: note: in expansion of macro 'set_mask_bits' 1063 | set_mask_bits(&field_value, BMA400_INT_GEN2_MSK, | ^~~~~~~~~~~~~ 'bma400_write_event_config': events 1-4 | | 1104 | static int bma400_write_event_config(struct iio_dev *indio_dev, | | ^~~~~~~~~~~~~~~~~~~~~~~~~ | | | | | (1) entry to 'bma400_write_event_config' |...... | 1112 | switch (chan->type) { | | ~~~~~~ | | | | | (2) following 'case 3:' branch... | 1113 | case IIO_ACCEL: | | ~~~~ | | | | | (3) ...to here | 1114 | mutex_lock(&data->mutex); | 1115 | ret = bma400_activity_event_en(data, dir, state); | | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | | | | | (4) calling 'bma400_activity_event_en' from 'bma400_write_event_config' | +--> 'bma400_activity_event_en': events 5-8 | | 1045 | static int bma400_activity_event_en(struct bma400_data *data, | | ^~~~~~~~~~~~~~~~~~~~~~~~ | | | | | (5) entry to 'bma400_activity_event_en' |...... | 1049 | int ret, reg, msk, value, field_value; | | ~~~~~~~~~~~ | | | | | (6) region created on stack here | 1050 | | 1051 | switch (dir) { | | ~~~~~~ | | | | | (7) following 'case 2:' branch... |...... | 1059 | case IIO_EV_DIR_FALLING: | | ~~~~ | | | | | (8) ...to here | 'bma400_activity_event_en': event 9 | |include/asm-generic/rwonce.h:44:26: | 44 | #define __READ_ONCE(x) (*(const volatile __unqual_scalar_typeof(x) *)&(x)) | | ~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | | | | | (9) use of uninitialized value 'field_value' here include/asm-generic/rwonce.h:50:9: note: in expansion of macro '__READ_ONCE' | 50 | __READ_ONCE(x); \ | | ^~~~~~~~~~~ include/linux/bitops.h:281:25: note: in expansion of macro 'READ_ONCE' | 281 | old__ = READ_ONCE(*(ptr)); \ | | ^~~~~~~~~ drivers/iio/accel/bma400_core.c:1063:17: note: in expansion of macro 'set_mask_bits' | 1063 | set_mask_bits(&field_value, BMA400_INT_GEN2_MSK, | | ^~~~~~~~~~~~~ | vim +36 include/asm-generic/cmpxchg-local.h 068fbad288a2c1 Mathieu Desnoyers 2008-02-07 7 aa93685afbefa0 Behan Webster 2012-11-20 8 extern unsigned long wrong_size_cmpxchg(volatile void *ptr) aa93685afbefa0 Behan Webster 2012-11-20 9 __noreturn; 068fbad288a2c1 Mathieu Desnoyers 2008-02-07 10 068fbad288a2c1 Mathieu Desnoyers 2008-02-07 11 /* 068fbad288a2c1 Mathieu Desnoyers 2008-02-07 12 * Generic version of __cmpxchg_local (disables interrupts). Takes an unsigned 068fbad288a2c1 Mathieu Desnoyers 2008-02-07 13 * long parameter, supporting various types of architectures. 068fbad288a2c1 Mathieu Desnoyers 2008-02-07 14 */ 6988631bdfddce Mark Rutland 2021-05-25 15 static inline unsigned long __generic_cmpxchg_local(volatile void *ptr, 068fbad288a2c1 Mathieu Desnoyers 2008-02-07 16 unsigned long old, unsigned long new, int size) 068fbad288a2c1 Mathieu Desnoyers 2008-02-07 17 { 068fbad288a2c1 Mathieu Desnoyers 2008-02-07 18 unsigned long flags, prev; 068fbad288a2c1 Mathieu Desnoyers 2008-02-07 19 068fbad288a2c1 Mathieu Desnoyers 2008-02-07 20 /* 068fbad288a2c1 Mathieu Desnoyers 2008-02-07 21 * Sanity checking, compile-time. 068fbad288a2c1 Mathieu Desnoyers 2008-02-07 22 */ 068fbad288a2c1 Mathieu Desnoyers 2008-02-07 23 if (size == 8 && sizeof(unsigned long) != 8) 068fbad288a2c1 Mathieu Desnoyers 2008-02-07 24 wrong_size_cmpxchg(ptr); 068fbad288a2c1 Mathieu Desnoyers 2008-02-07 25 5042afe7fe3239 Ingo Molnar 2009-07-03 26 raw_local_irq_save(flags); 068fbad288a2c1 Mathieu Desnoyers 2008-02-07 27 switch (size) { 068fbad288a2c1 Mathieu Desnoyers 2008-02-07 28 case 1: prev = *(u8 *)ptr; 068fbad288a2c1 Mathieu Desnoyers 2008-02-07 29 if (prev == old) 068fbad288a2c1 Mathieu Desnoyers 2008-02-07 30 *(u8 *)ptr = (u8)new; 068fbad288a2c1 Mathieu Desnoyers 2008-02-07 31 break; 068fbad288a2c1 Mathieu Desnoyers 2008-02-07 32 case 2: prev = *(u16 *)ptr; 068fbad288a2c1 Mathieu Desnoyers 2008-02-07 33 if (prev == old) 068fbad288a2c1 Mathieu Desnoyers 2008-02-07 34 *(u16 *)ptr = (u16)new; 068fbad288a2c1 Mathieu Desnoyers 2008-02-07 35 break; 068fbad288a2c1 Mathieu Desnoyers 2008-02-07 @36 case 4: prev = *(u32 *)ptr; 068fbad288a2c1 Mathieu Desnoyers 2008-02-07 37 if (prev == old) 068fbad288a2c1 Mathieu Desnoyers 2008-02-07 38 *(u32 *)ptr = (u32)new; 068fbad288a2c1 Mathieu Desnoyers 2008-02-07 39 break; 068fbad288a2c1 Mathieu Desnoyers 2008-02-07 40 case 8: prev = *(u64 *)ptr; 068fbad288a2c1 Mathieu Desnoyers 2008-02-07 41 if (prev == old) 068fbad288a2c1 Mathieu Desnoyers 2008-02-07 42 *(u64 *)ptr = (u64)new; 068fbad288a2c1 Mathieu Desnoyers 2008-02-07 43 break; 068fbad288a2c1 Mathieu Desnoyers 2008-02-07 44 default: 068fbad288a2c1 Mathieu Desnoyers 2008-02-07 45 wrong_size_cmpxchg(ptr); 068fbad288a2c1 Mathieu Desnoyers 2008-02-07 46 } 5042afe7fe3239 Ingo Molnar 2009-07-03 47 raw_local_irq_restore(flags); 068fbad288a2c1 Mathieu Desnoyers 2008-02-07 48 return prev; 068fbad288a2c1 Mathieu Desnoyers 2008-02-07 49 } 068fbad288a2c1 Mathieu Desnoyers 2008-02-07 50 :::::: The code at line 36 was first introduced by commit :::::: 068fbad288a2c18b75b0425fb56d241f018a1cb5 Add cmpxchg_local to asm-generic for per cpu atomic operations :::::: TO: Mathieu Desnoyers <[email protected]> :::::: CC: Linus Torvalds <[email protected]> -- 0-DAY CI Kernel Test Service https://01.org/lkp _______________________________________________ kbuild mailing list -- [email protected] To unsubscribe send an email to [email protected]
