[openeuler:OLK-6.6 2263/2263] mm/damon/core.c:116:5: warning: no previous prototype for function 'damon_target_init_kfifo'

tree: https://gitee.com/openeuler/kernel.git OLK-6.6 head: dea1e68d661266b45b33cc596c34b451de95000c commit: 2e9ef6c3ea086c85d489898471e527aeb3f7460b [2263/2263] mm/damon/vaddr: Support hardware-assisted memory access sampling config: arm64-allmodconfig (https://download.01.org/0day-ci/archive/20250521/202505210904.LgTxS8rg-lkp@i...) compiler: clang version 19.1.7 (https://github.com/llvm/llvm-project cd708029e0b2869e80abe31ddb175f7c35361f90) reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20250521/202505210904.LgTxS8rg-lkp@i...) 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@intel.com> | Closes: https://lore.kernel.org/oe-kbuild-all/202505210904.LgTxS8rg-lkp@intel.com/ All warnings (new ones prefixed by >>):
mm/damon/core.c:116:5: warning: no previous prototype for function 'damon_target_init_kfifo' [-Wmissing-prototypes] 116 | int damon_target_init_kfifo(struct damon_target *t) | ^ mm/damon/core.c:116:1: note: declare 'static' if the function is not intended to be used outside of this translation unit 116 | int damon_target_init_kfifo(struct damon_target *t) | ^ | static mm/damon/core.c:132:6: warning: no previous prototype for function 'damon_target_deinit_kfifo' [-Wmissing-prototypes] 132 | void damon_target_deinit_kfifo(struct damon_target *t) | ^ mm/damon/core.c:132:1: note: declare 'static' if the function is not intended to be used outside of this translation unit 132 | void damon_target_deinit_kfifo(struct damon_target *t) | ^ | static 2 warnings generated.
vim +/damon_target_init_kfifo +116 mm/damon/core.c 114 115 #if IS_ENABLED(CONFIG_DAMON_MEM_SAMPLING)
116 int damon_target_init_kfifo(struct damon_target *t) 117 { 118 struct damon_mem_sampling_fifo *damon_fifo; 119 int ret = 0; 120 unsigned int fifo_size = sizeof(struct damon_mem_sampling_record) * DAMOS_FIFO_MAX_RECORD; 121 122 damon_fifo = &t->damon_fifo; 123 124 ret = kfifo_alloc(&damon_fifo->rx_kfifo, fifo_size, GFP_KERNEL); 125 if (ret) 126 return -ENOMEM; 127 128 spin_lock_init(&damon_fifo->rx_kfifo_lock); 129 return 0; 130 } 131 132 void damon_target_deinit_kfifo(struct damon_target *t) 133 { 134 kfifo_free(&t->damon_fifo.rx_kfifo); 135 } 136 #else 137 static inline int damon_target_init_kfifo(struct damon_target *t) {return 0; } 138 static inline void damon_target_deinit_kfifo(struct damon_target *t) { } 139 #endif /* CONFIG_DAMON_MEM_SAMPLING */ 140
-- 0-DAY CI Kernel Test Service https://github.com/intel/lkp-tests/wiki
participants (1)
-
kernel test robot