[ceph-client:tls_logger 6/13] include/linux/percpu-defs.h:219:59: error: invalid use of undefined type 'struct ceph_san_tls_logger'

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

 



tree:   https://github.com/ceph/ceph-client.git tls_logger
head:   cd1e899feeb6a7da55cbb74b9245c8bbb77f82ba
commit: 485747e7711ebb9bcda819027564d587d215874a [6/13] ceph_san: moving to per_cpu
config: sh-randconfig-001-20250213 (https://download.01.org/0day-ci/archive/20250213/202502131856.1wNMq5pb-lkp@xxxxxxxxx/config)
compiler: sh4-linux-gcc (GCC) 14.2.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20250213/202502131856.1wNMq5pb-lkp@xxxxxxxxx/reproduce)

If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@xxxxxxxxx>
| Closes: https://lore.kernel.org/oe-kbuild-all/202502131856.1wNMq5pb-lkp@xxxxxxxxx/

All error/warnings (new ones prefixed by >>):

   net/ceph/ceph_san.c:15:7: warning: no previous prototype for 'get_log_cephsan' [-Wmissing-prototypes]
      15 | char *get_log_cephsan(void) {
         |       ^~~~~~~~~~~~~~~
   In file included from include/asm-generic/percpu.h:7,
                    from ./arch/sh/include/generated/asm/percpu.h:1,
                    from include/linux/irqflags.h:19,
                    from arch/sh/include/asm/cmpxchg-irq.h:5,
                    from arch/sh/include/asm/cmpxchg.h:21,
                    from arch/sh/include/asm/atomic.h:19,
                    from include/linux/atomic.h:7,
                    from include/asm-generic/bitops/atomic.h:5,
                    from arch/sh/include/asm/bitops.h:23,
                    from include/linux/bitops.h:68,
                    from include/linux/thread_info.h:27,
                    from include/asm-generic/preempt.h:5,
                    from ./arch/sh/include/generated/asm/preempt.h:1,
                    from include/linux/preempt.h:79,
                    from include/linux/spinlock.h:56,
                    from include/linux/mmzone.h:8,
                    from include/linux/gfp.h:7,
                    from include/linux/slab.h:16,
                    from net/ceph/ceph_san.c:1:
   net/ceph/ceph_san.c: In function 'get_log_cephsan':
>> include/linux/percpu-defs.h:219:59: error: invalid use of undefined type 'struct ceph_san_tls_logger'
     219 |         const void __percpu *__vpp_verify = (typeof((ptr) + 0))NULL;    \
         |                                                           ^
   include/linux/percpu-defs.h:262:9: note: in expansion of macro '__verify_pcpu_ptr'
     262 |         __verify_pcpu_ptr(ptr);                                         \
         |         ^~~~~~~~~~~~~~~~~
   include/linux/percpu-defs.h:266:33: note: in expansion of macro 'per_cpu_ptr'
     266 | #define raw_cpu_ptr(ptr)        per_cpu_ptr(ptr, 0)
         |                                 ^~~~~~~~~~~
   include/linux/percpu-defs.h:267:33: note: in expansion of macro 'raw_cpu_ptr'
     267 | #define this_cpu_ptr(ptr)       raw_cpu_ptr(ptr)
         |                                 ^~~~~~~~~~~
   net/ceph/ceph_san.c:17:39: note: in expansion of macro 'this_cpu_ptr'
      17 |     struct ceph_san_tls_logger *tls = this_cpu_ptr(&ceph_san_tls);
         |                                       ^~~~~~~~~~~~
>> net/ceph/ceph_san.c:18:23: error: invalid use of undefined type 'struct ceph_san_tls_logger'
      18 |     int head_idx = tls->head_idx++ & (CEPH_SAN_MAX_LOGS - 1);
         |                       ^~
>> net/ceph/ceph_san.c:18:39: error: 'CEPH_SAN_MAX_LOGS' undeclared (first use in this function); did you mean 'CEPH_SAN_LOG'?
      18 |     int head_idx = tls->head_idx++ & (CEPH_SAN_MAX_LOGS - 1);
         |                                       ^~~~~~~~~~~~~~~~~
         |                                       CEPH_SAN_LOG
   net/ceph/ceph_san.c:18:39: note: each undeclared identifier is reported only once for each function it appears in
   net/ceph/ceph_san.c:19:8: error: invalid use of undefined type 'struct ceph_san_tls_logger'
      19 |     tls->logs[head_idx].pid = current->pid;
         |        ^~
   net/ceph/ceph_san.c:20:8: error: invalid use of undefined type 'struct ceph_san_tls_logger'
      20 |     tls->logs[head_idx].ts = jiffies;
         |        ^~
   net/ceph/ceph_san.c:21:15: error: invalid use of undefined type 'struct ceph_san_tls_logger'
      21 |     memcpy(tls->logs[head_idx].comm, current->comm, TASK_COMM_LEN);
         |               ^~
   net/ceph/ceph_san.c:23:15: error: invalid use of undefined type 'struct ceph_san_tls_logger'
      23 |     return tls->logs[head_idx].buf;
         |               ^~
>> net/ceph/ceph_san.c:18:9: warning: variable 'head_idx' set but not used [-Wunused-but-set-variable]
      18 |     int head_idx = tls->head_idx++ & (CEPH_SAN_MAX_LOGS - 1);
         |         ^~~~~~~~
   net/ceph/ceph_san.c: At top level:
>> net/ceph/ceph_san.c:30:6: error: redefinition of 'cephsan_cleanup'
      30 | void cephsan_cleanup(void)
         |      ^~~~~~~~~~~~~~~
   In file included from net/ceph/ceph_san.c:6:
   include/linux/ceph/ceph_san.h:104:20: note: previous definition of 'cephsan_cleanup' with type 'void(void)'
     104 | static inline void cephsan_cleanup(void) {}
         |                    ^~~~~~~~~~~~~~~
>> net/ceph/ceph_san.c:37:5: error: redefinition of 'cephsan_init'
      37 | int cephsan_init(void)
         |     ^~~~~~~~~~~~
   include/linux/ceph/ceph_san.h:105:26: note: previous definition of 'cephsan_init' with type 'int(void)'
     105 | static inline int __init cephsan_init(void) { return 0; }
         |                          ^~~~~~~~~~~~
   In file included from include/linux/linkage.h:7,
                    from include/linux/preempt.h:10:
>> net/ceph/ceph_san.c:10:15: error: storage size of 'ceph_san_tls' isn't known
      10 | EXPORT_SYMBOL(ceph_san_tls);
         |               ^~~~~~~~~~~~
   include/linux/export.h:56:28: note: in definition of macro '__EXPORT_SYMBOL'
      56 |         extern typeof(sym) sym;                                 \
         |                            ^~~
   include/linux/export.h:68:41: note: in expansion of macro '_EXPORT_SYMBOL'
      68 | #define EXPORT_SYMBOL(sym)              _EXPORT_SYMBOL(sym, "")
         |                                         ^~~~~~~~~~~~~~
   net/ceph/ceph_san.c:10:1: note: in expansion of macro 'EXPORT_SYMBOL'
      10 | EXPORT_SYMBOL(ceph_san_tls);
         | ^~~~~~~~~~~~~
>> net/ceph/ceph_san.c:10:15: error: storage size of 'ceph_san_tls' isn't known
      10 | EXPORT_SYMBOL(ceph_san_tls);
         |               ^~~~~~~~~~~~
   include/linux/export.h:56:28: note: in definition of macro '__EXPORT_SYMBOL'
      56 |         extern typeof(sym) sym;                                 \
         |                            ^~~
   include/linux/export.h:68:41: note: in expansion of macro '_EXPORT_SYMBOL'
      68 | #define EXPORT_SYMBOL(sym)              _EXPORT_SYMBOL(sym, "")
         |                                         ^~~~~~~~~~~~~~
   net/ceph/ceph_san.c:10:1: note: in expansion of macro 'EXPORT_SYMBOL'
      10 | EXPORT_SYMBOL(ceph_san_tls);
         | ^~~~~~~~~~~~~
   net/ceph/ceph_san.c: In function 'get_log_cephsan':
   net/ceph/ceph_san.c:24:1: warning: control reaches end of non-void function [-Wreturn-type]
      24 | }
         | ^


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

62fde54123fb64 Tejun Heo 2014-06-17  205  
9c28278a24c01c Tejun Heo 2014-06-17  206  /*
6fbc07bbe2b5a8 Tejun Heo 2014-06-17  207   * __verify_pcpu_ptr() verifies @ptr is a percpu pointer without evaluating
6fbc07bbe2b5a8 Tejun Heo 2014-06-17  208   * @ptr and is invoked once before a percpu area is accessed by all
6fbc07bbe2b5a8 Tejun Heo 2014-06-17  209   * accessors and operations.  This is performed in the generic part of
6fbc07bbe2b5a8 Tejun Heo 2014-06-17  210   * percpu and arch overrides don't need to worry about it; however, if an
6fbc07bbe2b5a8 Tejun Heo 2014-06-17  211   * arch wants to implement an arch-specific percpu accessor or operation,
6fbc07bbe2b5a8 Tejun Heo 2014-06-17  212   * it may use __verify_pcpu_ptr() to verify the parameters.
9c28278a24c01c Tejun Heo 2014-06-17  213   *
9c28278a24c01c Tejun Heo 2014-06-17  214   * + 0 is required in order to convert the pointer type from a
9c28278a24c01c Tejun Heo 2014-06-17  215   * potential array type to a pointer to a single item of the array.
9c28278a24c01c Tejun Heo 2014-06-17  216   */
eba117889ac444 Tejun Heo 2014-06-17  217  #define __verify_pcpu_ptr(ptr)						\
eba117889ac444 Tejun Heo 2014-06-17  218  do {									\
9c28278a24c01c Tejun Heo 2014-06-17 @219  	const void __percpu *__vpp_verify = (typeof((ptr) + 0))NULL;	\
9c28278a24c01c Tejun Heo 2014-06-17  220  	(void)__vpp_verify;						\
9c28278a24c01c Tejun Heo 2014-06-17  221  } while (0)
9c28278a24c01c Tejun Heo 2014-06-17  222  

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

:::::: TO: Tejun Heo <tj@xxxxxxxxxx>
:::::: CC: Tejun Heo <tj@xxxxxxxxxx>

-- 
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki




[Index of Archives]     [CEPH Users]     [Ceph Large]     [Ceph Dev]     [Information on CEPH]     [Linux BTRFS]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux