[openeuler:OLK-6.6 3313/3313] block/genhd.c:100:6: warning: no previous prototype for function 'part_stat_read_all'
Hi GONG, FYI, the error/warning still remains. tree: https://gitee.com/openeuler/kernel.git OLK-6.6 head: f75af043f61c1e2311edf9edd2c5e0987e5ab3c9 commit: 89fa7dcff5e533bd14396601f40c388cfb6c1e59 [3313/3313] bpf-rvi: block: Add diskstats iterator target config: loongarch-allnoconfig (https://download.01.org/0day-ci/archive/20251124/202511241700.GqFsj3QM-lkp@i...) compiler: clang version 22.0.0git (https://github.com/llvm/llvm-project 9e9fe08b16ea2c4d9867fb4974edf2a3776d6ece) reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20251124/202511241700.GqFsj3QM-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/202511241700.GqFsj3QM-lkp@intel.com/ All warnings (new ones prefixed by >>):
block/genhd.c:100:6: warning: no previous prototype for function 'part_stat_read_all' [-Wmissing-prototypes] 100 | void part_stat_read_all(struct block_device *part, struct disk_stats *stat) | ^ block/genhd.c:100:1: note: declare 'static' if the function is not intended to be used outside of this translation unit 100 | void part_stat_read_all(struct block_device *part, struct disk_stats *stat) | ^ | static 1 warning generated.
vim +/part_stat_read_all +100 block/genhd.c 99
100 void part_stat_read_all(struct block_device *part, struct disk_stats *stat) 101 { 102 int cpu; 103 104 memset(stat, 0, sizeof(struct disk_stats)); 105 for_each_possible_cpu(cpu) { 106 struct disk_stats *ptr = per_cpu_ptr(part->bd_stats, cpu); 107 int group; 108 109 for (group = 0; group < NR_STAT_GROUPS; group++) { 110 stat->nsecs[group] += ptr->nsecs[group]; 111 stat->sectors[group] += ptr->sectors[group]; 112 stat->ios[group] += ptr->ios[group]; 113 stat->merges[group] += ptr->merges[group]; 114 } 115 116 stat->io_ticks += ptr->io_ticks; 117 } 118 } 119
-- 0-DAY CI Kernel Test Service https://github.com/intel/lkp-tests/wiki
participants (1)
-
kernel test robot