tree: https://github.com/ceph/ceph-client.git tls_logger head: 6426787926c0ab3f8cd024b9cac8bd0fd28813a4 commit: 485747e7711ebb9bcda819027564d587d215874a [6/15] ceph_san: moving to per_cpu config: hexagon-randconfig-r072-20250223 (https://download.01.org/0day-ci/archive/20250223/202502231007.WIrsl6gW-lkp@xxxxxxxxx/config) compiler: clang version 21.0.0git (https://github.com/llvm/llvm-project 204dcafec0ecf0db81d420d2de57b02ada6b09ec) reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20250223/202502231007.WIrsl6gW-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/202502231007.WIrsl6gW-lkp@xxxxxxxxx/ All errors (new ones prefixed by >>): >> net/ceph/ceph_san.c:17:39: error: arithmetic on a pointer to an incomplete type 'typeof (ceph_san_tls)' (aka 'struct ceph_san_tls_logger') 17 | struct ceph_san_tls_logger *tls = this_cpu_ptr(&ceph_san_tls); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~ include/linux/percpu-defs.h:254:27: note: expanded from macro 'this_cpu_ptr' 254 | #define this_cpu_ptr(ptr) raw_cpu_ptr(ptr) | ^~~~~~~~~~~~~~~~ include/linux/percpu-defs.h:243:2: note: expanded from macro 'raw_cpu_ptr' 243 | __verify_pcpu_ptr(ptr); \ | ^~~~~~~~~~~~~~~~~~~~~~ include/linux/percpu-defs.h:219:52: note: expanded from macro '__verify_pcpu_ptr' 219 | const void __percpu *__vpp_verify = (typeof((ptr) + 0))NULL; \ | ~~~~~ ^ include/linux/ceph/ceph_san.h:10:24: note: forward declaration of 'struct ceph_san_tls_logger' 10 | DECLARE_PER_CPU(struct ceph_san_tls_logger, ceph_san_tls); | ^ >> net/ceph/ceph_san.c:18:23: error: incomplete definition of type 'struct ceph_san_tls_logger' 18 | int head_idx = tls->head_idx++ & (CEPH_SAN_MAX_LOGS - 1); | ~~~^ include/linux/ceph/ceph_san.h:10:24: note: forward declaration of 'struct ceph_san_tls_logger' 10 | DECLARE_PER_CPU(struct ceph_san_tls_logger, ceph_san_tls); | ^ >> net/ceph/ceph_san.c:18:39: error: use of undeclared identifier 'CEPH_SAN_MAX_LOGS' 18 | int head_idx = tls->head_idx++ & (CEPH_SAN_MAX_LOGS - 1); | ^ net/ceph/ceph_san.c:19:8: error: incomplete definition of type 'struct ceph_san_tls_logger' 19 | tls->logs[head_idx].pid = current->pid; | ~~~^ include/linux/ceph/ceph_san.h:10:24: note: forward declaration of 'struct ceph_san_tls_logger' 10 | DECLARE_PER_CPU(struct ceph_san_tls_logger, ceph_san_tls); | ^ net/ceph/ceph_san.c:20:8: error: incomplete definition of type 'struct ceph_san_tls_logger' 20 | tls->logs[head_idx].ts = jiffies; | ~~~^ include/linux/ceph/ceph_san.h:10:24: note: forward declaration of 'struct ceph_san_tls_logger' 10 | DECLARE_PER_CPU(struct ceph_san_tls_logger, ceph_san_tls); | ^ net/ceph/ceph_san.c:21:15: error: incomplete definition of type 'struct ceph_san_tls_logger' 21 | memcpy(tls->logs[head_idx].comm, current->comm, TASK_COMM_LEN); | ~~~^ include/linux/ceph/ceph_san.h:10:24: note: forward declaration of 'struct ceph_san_tls_logger' 10 | DECLARE_PER_CPU(struct ceph_san_tls_logger, ceph_san_tls); | ^ net/ceph/ceph_san.c:23:15: error: incomplete definition of type 'struct ceph_san_tls_logger' 23 | return tls->logs[head_idx].buf; | ~~~^ include/linux/ceph/ceph_san.h:10:24: note: forward declaration of 'struct ceph_san_tls_logger' 10 | DECLARE_PER_CPU(struct ceph_san_tls_logger, ceph_san_tls); | ^ net/ceph/ceph_san.c:15:7: warning: no previous prototype for function 'get_log_cephsan' [-Wmissing-prototypes] 15 | char *get_log_cephsan(void) { | ^ net/ceph/ceph_san.c:15:1: note: declare 'static' if the function is not intended to be used outside of this translation unit 15 | char *get_log_cephsan(void) { | ^ | static net/ceph/ceph_san.c:30:6: error: redefinition of 'cephsan_cleanup' 30 | void cephsan_cleanup(void) | ^ include/linux/ceph/ceph_san.h:104:20: note: previous definition is here 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 is here 105 | static inline int __init cephsan_init(void) { return 0; } | ^ net/ceph/ceph_san.c:9:44: error: tentative definition has type 'typeof(struct ceph_san_tls_logger)' (aka 'struct ceph_san_tls_logger') that is never completed 9 | DEFINE_PER_CPU(struct ceph_san_tls_logger, ceph_san_tls); | ^ include/linux/ceph/ceph_san.h:10:24: note: forward declaration of 'struct ceph_san_tls_logger' 10 | DECLARE_PER_CPU(struct ceph_san_tls_logger, ceph_san_tls); | ^ 1 warning and 10 errors generated. vim +17 net/ceph/ceph_san.c 7 8 /* Use per-core TLS logger; no global list or lock needed */ 9 DEFINE_PER_CPU(struct ceph_san_tls_logger, ceph_san_tls); 10 EXPORT_SYMBOL(ceph_san_tls); 11 /* The definitions for struct ceph_san_log_entry and struct ceph_san_tls_logger 12 * have been moved to cephsan.h (under CONFIG_DEBUG_FS) to avoid duplication. 13 */ 14 15 char *get_log_cephsan(void) { 16 /* Use the per-core TLS logger */ > 17 struct ceph_san_tls_logger *tls = this_cpu_ptr(&ceph_san_tls); > 18 int head_idx = tls->head_idx++ & (CEPH_SAN_MAX_LOGS - 1); 19 tls->logs[head_idx].pid = current->pid; 20 tls->logs[head_idx].ts = jiffies; 21 memcpy(tls->logs[head_idx].comm, current->comm, TASK_COMM_LEN); 22 23 return tls->logs[head_idx].buf; 24 } 25 EXPORT_SYMBOL(get_log_cephsan); 26 -- 0-DAY CI Kernel Test Service https://github.com/intel/lkp-tests/wiki