All of lore.kernel.org
 help / color / mirror / Atom feed
* [dm:block-dm-4.21-inflight 4/9] include/linux/percpu-defs.h:219:52: error: invalid operands to binary + (have 'struct disk_stats' and 'int')
@ 2018-12-13  0:44 kbuild test robot
  2018-12-13  0:47 ` Mike Snitzer
  0 siblings, 1 reply; 2+ messages in thread
From: kbuild test robot @ 2018-12-13  0:44 UTC (permalink / raw)
  To: Mikulas Patocka; +Cc: dm-devel, kbuild-all, Mike Snitzer

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

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/device-mapper/linux-dm.git block-dm-4.21-inflight
head:   847fb34c0a7f7bbfca9d6053316aafb864a550b2
commit: 525770fecc9110905dfc5e6b447155b08d865936 [4/9] block: switch to per-cpu in-flight counters
config: arm-at91_dt_defconfig (attached as .config)
compiler: arm-linux-gnueabi-gcc (Debian 7.2.0-11) 7.2.0
reproduce:
        wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
        chmod +x ~/bin/make.cross
        git checkout 525770fecc9110905dfc5e6b447155b08d865936
        # save the attached .config to linux build tree
        GCC_VERSION=7.2.0 make.cross ARCH=arm 

All errors (new ones prefixed by >>):

   In file included from ./arch/arm/include/generated/asm/local.h:1:0,
                    from include/linux/genhd.h:20,
                    from block/genhd.c:7:
   block/genhd.c: In function 'part_inc_in_flight':
>> include/linux/percpu-defs.h:219:52: error: invalid operands to binary + (have 'struct disk_stats' and 'int')
     const void __percpu *__vpp_verify = (typeof((ptr) + 0))NULL; \
                                                 ~~~~~ ^
   include/asm-generic/local.h:31:40: note: in definition of macro 'local_inc'
    #define local_inc(l) atomic_long_inc(&(l)->a)
                                           ^
   include/linux/percpu-defs.h:259:2: note: in expansion of macro '__verify_pcpu_ptr'
     __verify_pcpu_ptr(__p);      \
     ^~~~~~~~~~~~~~~~~
   include/linux/percpu-defs.h:263:47: note: in expansion of macro 'VERIFY_PERCPU_PTR'
    #define per_cpu_ptr(ptr, cpu) ({ (void)(cpu); VERIFY_PERCPU_PTR(ptr); })
                                                  ^~~~~~~~~~~~~~~~~
   block/genhd.c:53:13: note: in expansion of macro 'per_cpu_ptr'
     local_inc(&per_cpu_ptr(part->dkstats, cpu)->in_flight[rw]);
                ^~~~~~~~~~~
>> include/linux/percpu-defs.h:260:10: error: invalid type argument of unary '*' (have 'struct disk_stats')
     (typeof(*(__p)) __kernel __force *)(__p);   \
             ^~~~~~
   include/asm-generic/local.h:31:40: note: in definition of macro 'local_inc'
    #define local_inc(l) atomic_long_inc(&(l)->a)
                                           ^
   include/linux/percpu-defs.h:263:47: note: in expansion of macro 'VERIFY_PERCPU_PTR'
    #define per_cpu_ptr(ptr, cpu) ({ (void)(cpu); VERIFY_PERCPU_PTR(ptr); })
                                                  ^~~~~~~~~~~~~~~~~
   block/genhd.c:53:13: note: in expansion of macro 'per_cpu_ptr'
     local_inc(&per_cpu_ptr(part->dkstats, cpu)->in_flight[rw]);
                ^~~~~~~~~~~
>> include/linux/percpu-defs.h:219:52: error: invalid operands to binary + (have 'struct disk_stats' and 'int')
     const void __percpu *__vpp_verify = (typeof((ptr) + 0))NULL; \
                                                 ~~~~~ ^
   include/asm-generic/local.h:31:40: note: in definition of macro 'local_inc'
    #define local_inc(l) atomic_long_inc(&(l)->a)
                                           ^
   include/linux/percpu-defs.h:259:2: note: in expansion of macro '__verify_pcpu_ptr'
     __verify_pcpu_ptr(__p);      \
     ^~~~~~~~~~~~~~~~~
   include/linux/percpu-defs.h:263:47: note: in expansion of macro 'VERIFY_PERCPU_PTR'
    #define per_cpu_ptr(ptr, cpu) ({ (void)(cpu); VERIFY_PERCPU_PTR(ptr); })
                                                  ^~~~~~~~~~~~~~~~~
   block/genhd.c:55:14: note: in expansion of macro 'per_cpu_ptr'
      local_inc(&per_cpu_ptr(part_to_disk(part)->part0.dkstats, cpu)->in_flight[rw]);
                 ^~~~~~~~~~~
>> include/linux/percpu-defs.h:260:10: error: invalid type argument of unary '*' (have 'struct disk_stats')
     (typeof(*(__p)) __kernel __force *)(__p);   \
             ^~~~~~
   include/asm-generic/local.h:31:40: note: in definition of macro 'local_inc'
    #define local_inc(l) atomic_long_inc(&(l)->a)
                                           ^
   include/linux/percpu-defs.h:263:47: note: in expansion of macro 'VERIFY_PERCPU_PTR'
    #define per_cpu_ptr(ptr, cpu) ({ (void)(cpu); VERIFY_PERCPU_PTR(ptr); })
                                                  ^~~~~~~~~~~~~~~~~
   block/genhd.c:55:14: note: in expansion of macro 'per_cpu_ptr'
      local_inc(&per_cpu_ptr(part_to_disk(part)->part0.dkstats, cpu)->in_flight[rw]);
                 ^~~~~~~~~~~
   block/genhd.c: In function 'part_dec_in_flight':
>> include/linux/percpu-defs.h:219:52: error: invalid operands to binary + (have 'struct disk_stats' and 'int')
     const void __percpu *__vpp_verify = (typeof((ptr) + 0))NULL; \
                                                 ~~~~~ ^
   include/asm-generic/local.h:32:40: note: in definition of macro 'local_dec'
    #define local_dec(l) atomic_long_dec(&(l)->a)
                                           ^
   include/linux/percpu-defs.h:259:2: note: in expansion of macro '__verify_pcpu_ptr'
     __verify_pcpu_ptr(__p);      \
     ^~~~~~~~~~~~~~~~~
   include/linux/percpu-defs.h:263:47: note: in expansion of macro 'VERIFY_PERCPU_PTR'
    #define per_cpu_ptr(ptr, cpu) ({ (void)(cpu); VERIFY_PERCPU_PTR(ptr); })
                                                  ^~~~~~~~~~~~~~~~~
   block/genhd.c:63:13: note: in expansion of macro 'per_cpu_ptr'
     local_dec(&per_cpu_ptr(part->dkstats, cpu)->in_flight[rw]);
                ^~~~~~~~~~~
>> include/linux/percpu-defs.h:260:10: error: invalid type argument of unary '*' (have 'struct disk_stats')
     (typeof(*(__p)) __kernel __force *)(__p);   \
             ^~~~~~
   include/asm-generic/local.h:32:40: note: in definition of macro 'local_dec'
    #define local_dec(l) atomic_long_dec(&(l)->a)
                                           ^
   include/linux/percpu-defs.h:263:47: note: in expansion of macro 'VERIFY_PERCPU_PTR'
    #define per_cpu_ptr(ptr, cpu) ({ (void)(cpu); VERIFY_PERCPU_PTR(ptr); })
                                                  ^~~~~~~~~~~~~~~~~
   block/genhd.c:63:13: note: in expansion of macro 'per_cpu_ptr'
     local_dec(&per_cpu_ptr(part->dkstats, cpu)->in_flight[rw]);
                ^~~~~~~~~~~
>> include/linux/percpu-defs.h:219:52: error: invalid operands to binary + (have 'struct disk_stats' and 'int')
     const void __percpu *__vpp_verify = (typeof((ptr) + 0))NULL; \
                                                 ~~~~~ ^
   include/asm-generic/local.h:32:40: note: in definition of macro 'local_dec'
    #define local_dec(l) atomic_long_dec(&(l)->a)
                                           ^
   include/linux/percpu-defs.h:259:2: note: in expansion of macro '__verify_pcpu_ptr'
     __verify_pcpu_ptr(__p);      \
     ^~~~~~~~~~~~~~~~~
   include/linux/percpu-defs.h:263:47: note: in expansion of macro 'VERIFY_PERCPU_PTR'
    #define per_cpu_ptr(ptr, cpu) ({ (void)(cpu); VERIFY_PERCPU_PTR(ptr); })
                                                  ^~~~~~~~~~~~~~~~~
   block/genhd.c:65:14: note: in expansion of macro 'per_cpu_ptr'
      local_dec(&per_cpu_ptr(part_to_disk(part)->part0.dkstats, cpu)->in_flight[rw]);
                 ^~~~~~~~~~~
>> include/linux/percpu-defs.h:260:10: error: invalid type argument of unary '*' (have 'struct disk_stats')
     (typeof(*(__p)) __kernel __force *)(__p);   \
             ^~~~~~
   include/asm-generic/local.h:32:40: note: in definition of macro 'local_dec'
    #define local_dec(l) atomic_long_dec(&(l)->a)
                                           ^
   include/linux/percpu-defs.h:263:47: note: in expansion of macro 'VERIFY_PERCPU_PTR'
    #define per_cpu_ptr(ptr, cpu) ({ (void)(cpu); VERIFY_PERCPU_PTR(ptr); })
                                                  ^~~~~~~~~~~~~~~~~
   block/genhd.c:65:14: note: in expansion of macro 'per_cpu_ptr'
      local_dec(&per_cpu_ptr(part_to_disk(part)->part0.dkstats, cpu)->in_flight[rw]);
                 ^~~~~~~~~~~
   block/genhd.c: In function 'part_in_flight':
>> include/linux/percpu-defs.h:219:52: error: invalid operands to binary + (have 'struct disk_stats' and 'int')
     const void __percpu *__vpp_verify = (typeof((ptr) + 0))NULL; \
                                                 ~~~~~ ^
   include/asm-generic/local.h:29:42: note: in definition of macro 'local_read'
    #define local_read(l) atomic_long_read(&(l)->a)
                                             ^
   include/linux/percpu-defs.h:259:2: note: in expansion of macro '__verify_pcpu_ptr'
     __verify_pcpu_ptr(__p);      \
     ^~~~~~~~~~~~~~~~~
   include/linux/percpu-defs.h:263:47: note: in expansion of macro 'VERIFY_PERCPU_PTR'
    #define per_cpu_ptr(ptr, cpu) ({ (void)(cpu); VERIFY_PERCPU_PTR(ptr); })
                                                  ^~~~~~~~~~~~~~~~~
   block/genhd.c:80:30: note: in expansion of macro 'per_cpu_ptr'
      inflight[0] += local_read(&per_cpu_ptr(part->dkstats, cpu)->in_flight[0]) +
                                 ^~~~~~~~~~~
>> include/linux/percpu-defs.h:260:10: error: invalid type argument of unary '*' (have 'struct disk_stats')
     (typeof(*(__p)) __kernel __force *)(__p);   \
             ^~~~~~
   include/asm-generic/local.h:29:42: note: in definition of macro 'local_read'
    #define local_read(l) atomic_long_read(&(l)->a)
                                             ^
   include/linux/percpu-defs.h:263:47: note: in expansion of macro 'VERIFY_PERCPU_PTR'
    #define per_cpu_ptr(ptr, cpu) ({ (void)(cpu); VERIFY_PERCPU_PTR(ptr); })
                                                  ^~~~~~~~~~~~~~~~~
   block/genhd.c:80:30: note: in expansion of macro 'per_cpu_ptr'
      inflight[0] += local_read(&per_cpu_ptr(part->dkstats, cpu)->in_flight[0]) +
                                 ^~~~~~~~~~~
>> include/linux/percpu-defs.h:219:52: error: invalid operands to binary + (have 'struct disk_stats' and 'int')
     const void __percpu *__vpp_verify = (typeof((ptr) + 0))NULL; \
                                                 ~~~~~ ^
   include/asm-generic/local.h:29:42: note: in definition of macro 'local_read'
    #define local_read(l) atomic_long_read(&(l)->a)
                                             ^
   include/linux/percpu-defs.h:259:2: note: in expansion of macro '__verify_pcpu_ptr'
     __verify_pcpu_ptr(__p);      \
     ^~~~~~~~~~~~~~~~~
   include/linux/percpu-defs.h:263:47: note: in expansion of macro 'VERIFY_PERCPU_PTR'
    #define per_cpu_ptr(ptr, cpu) ({ (void)(cpu); VERIFY_PERCPU_PTR(ptr); })
                                                  ^~~~~~~~~~~~~~~~~
   block/genhd.c:81:17: note: in expansion of macro 'per_cpu_ptr'
        local_read(&per_cpu_ptr(part->dkstats, cpu)->in_flight[1]);
                    ^~~~~~~~~~~
>> include/linux/percpu-defs.h:260:10: error: invalid type argument of unary '*' (have 'struct disk_stats')
     (typeof(*(__p)) __kernel __force *)(__p);   \
             ^~~~~~
   include/asm-generic/local.h:29:42: note: in definition of macro 'local_read'
    #define local_read(l) atomic_long_read(&(l)->a)
                                             ^
   include/linux/percpu-defs.h:263:47: note: in expansion of macro 'VERIFY_PERCPU_PTR'
    #define per_cpu_ptr(ptr, cpu) ({ (void)(cpu); VERIFY_PERCPU_PTR(ptr); })
                                                  ^~~~~~~~~~~~~~~~~
   block/genhd.c:81:17: note: in expansion of macro 'per_cpu_ptr'
        local_read(&per_cpu_ptr(part->dkstats, cpu)->in_flight[1]);
                    ^~~~~~~~~~~
>> include/linux/percpu-defs.h:219:52: error: invalid operands to binary + (have 'struct disk_stats' and 'int')
     const void __percpu *__vpp_verify = (typeof((ptr) + 0))NULL; \
                                                 ~~~~~ ^
   include/asm-generic/local.h:29:42: note: in definition of macro 'local_read'
    #define local_read(l) atomic_long_read(&(l)->a)
                                             ^
   include/linux/percpu-defs.h:259:2: note: in expansion of macro '__verify_pcpu_ptr'
     __verify_pcpu_ptr(__p);      \
     ^~~~~~~~~~~~~~~~~
   include/linux/percpu-defs.h:263:47: note: in expansion of macro 'VERIFY_PERCPU_PTR'
    #define per_cpu_ptr(ptr, cpu) ({ (void)(cpu); VERIFY_PERCPU_PTR(ptr); })
                                                  ^~~~~~~~~~~~~~~~~
   block/genhd.c:90:31: note: in expansion of macro 'per_cpu_ptr'
       inflight[1] += local_read(&per_cpu_ptr(part->dkstats, cpu)->in_flight[0]) +
                                  ^~~~~~~~~~~
>> include/linux/percpu-defs.h:260:10: error: invalid type argument of unary '*' (have 'struct disk_stats')
     (typeof(*(__p)) __kernel __force *)(__p);   \
             ^~~~~~
   include/asm-generic/local.h:29:42: note: in definition of macro 'local_read'
    #define local_read(l) atomic_long_read(&(l)->a)
                                             ^
   include/linux/percpu-defs.h:263:47: note: in expansion of macro 'VERIFY_PERCPU_PTR'
    #define per_cpu_ptr(ptr, cpu) ({ (void)(cpu); VERIFY_PERCPU_PTR(ptr); })
                                                  ^~~~~~~~~~~~~~~~~
   block/genhd.c:90:31: note: in expansion of macro 'per_cpu_ptr'
       inflight[1] += local_read(&per_cpu_ptr(part->dkstats, cpu)->in_flight[0]) +
                                  ^~~~~~~~~~~
>> include/linux/percpu-defs.h:219:52: error: invalid operands to binary + (have 'struct disk_stats' and 'int')
     const void __percpu *__vpp_verify = (typeof((ptr) + 0))NULL; \
                                                 ~~~~~ ^
   include/asm-generic/local.h:29:42: note: in definition of macro 'local_read'
    #define local_read(l) atomic_long_read(&(l)->a)
                                             ^
   include/linux/percpu-defs.h:259:2: note: in expansion of macro '__verify_pcpu_ptr'
     __verify_pcpu_ptr(__p);      \
     ^~~~~~~~~~~~~~~~~
   include/linux/percpu-defs.h:263:47: note: in expansion of macro 'VERIFY_PERCPU_PTR'
    #define per_cpu_ptr(ptr, cpu) ({ (void)(cpu); VERIFY_PERCPU_PTR(ptr); })
                                                  ^~~~~~~~~~~~~~~~~
   block/genhd.c:91:18: note: in expansion of macro 'per_cpu_ptr'
         local_read(&per_cpu_ptr(part->dkstats, cpu)->in_flight[1]);
                     ^~~~~~~~~~~
>> include/linux/percpu-defs.h:260:10: error: invalid type argument of unary '*' (have 'struct disk_stats')
     (typeof(*(__p)) __kernel __force *)(__p);   \
             ^~~~~~
   include/asm-generic/local.h:29:42: note: in definition of macro 'local_read'
    #define local_read(l) atomic_long_read(&(l)->a)
                                             ^
   include/linux/percpu-defs.h:263:47: note: in expansion of macro 'VERIFY_PERCPU_PTR'
    #define per_cpu_ptr(ptr, cpu) ({ (void)(cpu); VERIFY_PERCPU_PTR(ptr); })
                                                  ^~~~~~~~~~~~~~~~~
   block/genhd.c:91:18: note: in expansion of macro 'per_cpu_ptr'
         local_read(&per_cpu_ptr(part->dkstats, cpu)->in_flight[1]);
                     ^~~~~~~~~~~
   block/genhd.c: In function 'part_in_flight_rw':
>> include/linux/percpu-defs.h:219:52: error: invalid operands to binary + (have 'struct disk_stats' and 'int')
     const void __percpu *__vpp_verify = (typeof((ptr) + 0))NULL; \
                                                 ~~~~~ ^
   include/asm-generic/local.h:29:42: note: in definition of macro 'local_read'
    #define local_read(l) atomic_long_read(&(l)->a)
                                             ^
   include/linux/percpu-defs.h:259:2: note: in expansion of macro '__verify_pcpu_ptr'
     __verify_pcpu_ptr(__p);      \
     ^~~~~~~~~~~~~~~~~
   include/linux/percpu-defs.h:263:47: note: in expansion of macro 'VERIFY_PERCPU_PTR'
    #define per_cpu_ptr(ptr, cpu) ({ (void)(cpu); VERIFY_PERCPU_PTR(ptr); })
                                                  ^~~~~~~~~~~~~~~~~
   block/genhd.c:111:30: note: in expansion of macro 'per_cpu_ptr'
      inflight[0] += local_read(&per_cpu_ptr(part->dkstats, cpu)->in_flight[0]);
                                 ^~~~~~~~~~~
>> include/linux/percpu-defs.h:260:10: error: invalid type argument of unary '*' (have 'struct disk_stats')
     (typeof(*(__p)) __kernel __force *)(__p);   \
             ^~~~~~
   include/asm-generic/local.h:29:42: note: in definition of macro 'local_read'
    #define local_read(l) atomic_long_read(&(l)->a)
                                             ^
   include/linux/percpu-defs.h:263:47: note: in expansion of macro 'VERIFY_PERCPU_PTR'
    #define per_cpu_ptr(ptr, cpu) ({ (void)(cpu); VERIFY_PERCPU_PTR(ptr); })
                                                  ^~~~~~~~~~~~~~~~~
   block/genhd.c:111:30: note: in expansion of macro 'per_cpu_ptr'
      inflight[0] += local_read(&per_cpu_ptr(part->dkstats, cpu)->in_flight[0]);
                                 ^~~~~~~~~~~
>> include/linux/percpu-defs.h:219:52: error: invalid operands to binary + (have 'struct disk_stats' and 'int')
     const void __percpu *__vpp_verify = (typeof((ptr) + 0))NULL; \
                                                 ~~~~~ ^
   include/asm-generic/local.h:29:42: note: in definition of macro 'local_read'
    #define local_read(l) atomic_long_read(&(l)->a)
                                             ^
   include/linux/percpu-defs.h:259:2: note: in expansion of macro '__verify_pcpu_ptr'
     __verify_pcpu_ptr(__p);      \
     ^~~~~~~~~~~~~~~~~
   include/linux/percpu-defs.h:263:47: note: in expansion of macro 'VERIFY_PERCPU_PTR'
    #define per_cpu_ptr(ptr, cpu) ({ (void)(cpu); VERIFY_PERCPU_PTR(ptr); })
                                                  ^~~~~~~~~~~~~~~~~
   block/genhd.c:112:30: note: in expansion of macro 'per_cpu_ptr'
      inflight[1] += local_read(&per_cpu_ptr(part->dkstats, cpu)->in_flight[1]);
                                 ^~~~~~~~~~~
>> include/linux/percpu-defs.h:260:10: error: invalid type argument of unary '*' (have 'struct disk_stats')
     (typeof(*(__p)) __kernel __force *)(__p);   \
             ^~~~~~
   include/asm-generic/local.h:29:42: note: in definition of macro 'local_read'
    #define local_read(l) atomic_long_read(&(l)->a)
                                             ^
   include/linux/percpu-defs.h:263:47: note: in expansion of macro 'VERIFY_PERCPU_PTR'
    #define per_cpu_ptr(ptr, cpu) ({ (void)(cpu); VERIFY_PERCPU_PTR(ptr); })
                                                  ^~~~~~~~~~~~~~~~~
   block/genhd.c:112:30: note: in expansion of macro 'per_cpu_ptr'
      inflight[1] += local_read(&per_cpu_ptr(part->dkstats, cpu)->in_flight[1]);
                                 ^~~~~~~~~~~

vim +219 include/linux/percpu-defs.h

62fde54123 Tejun Heo 2014-06-17  205  
9c28278a24 Tejun Heo 2014-06-17  206  /*
6fbc07bbe2 Tejun Heo 2014-06-17  207   * __verify_pcpu_ptr() verifies @ptr is a percpu pointer without evaluating
6fbc07bbe2 Tejun Heo 2014-06-17  208   * @ptr and is invoked once before a percpu area is accessed by all
6fbc07bbe2 Tejun Heo 2014-06-17  209   * accessors and operations.  This is performed in the generic part of
6fbc07bbe2 Tejun Heo 2014-06-17  210   * percpu and arch overrides don't need to worry about it; however, if an
6fbc07bbe2 Tejun Heo 2014-06-17  211   * arch wants to implement an arch-specific percpu accessor or operation,
6fbc07bbe2 Tejun Heo 2014-06-17  212   * it may use __verify_pcpu_ptr() to verify the parameters.
9c28278a24 Tejun Heo 2014-06-17  213   *
9c28278a24 Tejun Heo 2014-06-17  214   * + 0 is required in order to convert the pointer type from a
9c28278a24 Tejun Heo 2014-06-17  215   * potential array type to a pointer to a single item of the array.
9c28278a24 Tejun Heo 2014-06-17  216   */
eba117889a Tejun Heo 2014-06-17  217  #define __verify_pcpu_ptr(ptr)						\
eba117889a Tejun Heo 2014-06-17  218  do {									\
9c28278a24 Tejun Heo 2014-06-17 @219  	const void __percpu *__vpp_verify = (typeof((ptr) + 0))NULL;	\
9c28278a24 Tejun Heo 2014-06-17  220  	(void)__vpp_verify;						\
9c28278a24 Tejun Heo 2014-06-17  221  } while (0)
9c28278a24 Tejun Heo 2014-06-17  222  
62fde54123 Tejun Heo 2014-06-17  223  #ifdef CONFIG_SMP
62fde54123 Tejun Heo 2014-06-17  224  
62fde54123 Tejun Heo 2014-06-17  225  /*
62fde54123 Tejun Heo 2014-06-17  226   * Add an offset to a pointer but keep the pointer as-is.  Use RELOC_HIDE()
62fde54123 Tejun Heo 2014-06-17  227   * to prevent the compiler from making incorrect assumptions about the
62fde54123 Tejun Heo 2014-06-17  228   * pointer value.  The weird cast keeps both GCC and sparse happy.
62fde54123 Tejun Heo 2014-06-17  229   */
eba117889a Tejun Heo 2014-06-17  230  #define SHIFT_PERCPU_PTR(__p, __offset)					\
6fbc07bbe2 Tejun Heo 2014-06-17  231  	RELOC_HIDE((typeof(*(__p)) __kernel __force *)(__p), (__offset))
6fbc07bbe2 Tejun Heo 2014-06-17  232  
6fbc07bbe2 Tejun Heo 2014-06-17  233  #define per_cpu_ptr(ptr, cpu)						\
eba117889a Tejun Heo 2014-06-17  234  ({									\
6fbc07bbe2 Tejun Heo 2014-06-17  235  	__verify_pcpu_ptr(ptr);						\
6fbc07bbe2 Tejun Heo 2014-06-17  236  	SHIFT_PERCPU_PTR((ptr), per_cpu_offset((cpu)));			\
62fde54123 Tejun Heo 2014-06-17  237  })
62fde54123 Tejun Heo 2014-06-17  238  
6fbc07bbe2 Tejun Heo 2014-06-17  239  #define raw_cpu_ptr(ptr)						\
6fbc07bbe2 Tejun Heo 2014-06-17  240  ({									\
6fbc07bbe2 Tejun Heo 2014-06-17  241  	__verify_pcpu_ptr(ptr);						\
6fbc07bbe2 Tejun Heo 2014-06-17  242  	arch_raw_cpu_ptr(ptr);						\
6fbc07bbe2 Tejun Heo 2014-06-17  243  })
62fde54123 Tejun Heo 2014-06-17  244  
62fde54123 Tejun Heo 2014-06-17  245  #ifdef CONFIG_DEBUG_PREEMPT
6fbc07bbe2 Tejun Heo 2014-06-17  246  #define this_cpu_ptr(ptr)						\
6fbc07bbe2 Tejun Heo 2014-06-17  247  ({									\
6fbc07bbe2 Tejun Heo 2014-06-17  248  	__verify_pcpu_ptr(ptr);						\
6fbc07bbe2 Tejun Heo 2014-06-17  249  	SHIFT_PERCPU_PTR(ptr, my_cpu_offset);				\
6fbc07bbe2 Tejun Heo 2014-06-17  250  })
62fde54123 Tejun Heo 2014-06-17  251  #else
62fde54123 Tejun Heo 2014-06-17  252  #define this_cpu_ptr(ptr) raw_cpu_ptr(ptr)
62fde54123 Tejun Heo 2014-06-17  253  #endif
62fde54123 Tejun Heo 2014-06-17  254  
62fde54123 Tejun Heo 2014-06-17  255  #else	/* CONFIG_SMP */
62fde54123 Tejun Heo 2014-06-17  256  
eba117889a Tejun Heo 2014-06-17  257  #define VERIFY_PERCPU_PTR(__p)						\
eba117889a Tejun Heo 2014-06-17  258  ({									\
eba117889a Tejun Heo 2014-06-17 @259  	__verify_pcpu_ptr(__p);						\
62fde54123 Tejun Heo 2014-06-17 @260  	(typeof(*(__p)) __kernel __force *)(__p);			\
62fde54123 Tejun Heo 2014-06-17  261  })
62fde54123 Tejun Heo 2014-06-17  262  

:::::: The code at line 219 was first introduced by commit
:::::: 9c28278a24c01c0073fb89e53c1d2a605ab9587d percpu: reorder macros in percpu header files

:::::: TO: Tejun Heo <tj@kernel.org>
:::::: CC: Tejun Heo <tj@kernel.org>

---
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: 23812 bytes --]

[-- Attachment #3: Type: text/plain, Size: 0 bytes --]



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

* Re: [dm:block-dm-4.21-inflight 4/9] include/linux/percpu-defs.h:219:52: error: invalid operands to binary + (have 'struct disk_stats' and 'int')
  2018-12-13  0:44 [dm:block-dm-4.21-inflight 4/9] include/linux/percpu-defs.h:219:52: error: invalid operands to binary + (have 'struct disk_stats' and 'int') kbuild test robot
@ 2018-12-13  0:47 ` Mike Snitzer
  0 siblings, 0 replies; 2+ messages in thread
From: Mike Snitzer @ 2018-12-13  0:47 UTC (permalink / raw)
  To: kbuild test robot; +Cc: dm-devel, Mikulas Patocka, kbuild-all

On Wed, Dec 12 2018 at  7:44pm -0500,
kbuild test robot <lkp@intel.com> wrote:

> tree:   https://git.kernel.org/pub/scm/linux/kernel/git/device-mapper/linux-dm.git block-dm-4.21-inflight
> head:   847fb34c0a7f7bbfca9d6053316aafb864a550b2

No idea why the kbuild test robot is just testing random branches but
this code was just a point in time for the percpu inflight counter
patchset.  Since merged into linux-block with full support for
CONFIG_SMP not being set.

I'll delete this old block-dm-4.21-inflight branch now though...

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

end of thread, other threads:[~2018-12-13  0:47 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-12-13  0:44 [dm:block-dm-4.21-inflight 4/9] include/linux/percpu-defs.h:219:52: error: invalid operands to binary + (have 'struct disk_stats' and 'int') kbuild test robot
2018-12-13  0:47 ` Mike Snitzer

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.