Re: [PATCH] procfs: add syscall statistics

From: kernel test robot
Date: Fri May 27 2022 - 10:24:17 EST


Hi Zhang,

Thank you for the patch! Perhaps something to improve:

[auto build test WARNING on linus/master]
[also build test WARNING on next-20220527]
[cannot apply to akpm-mm/mm-everything arm64/for-next/core s390/features tip/x86/core v5.18]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch]

url: https://github.com/intel-lab-lkp/linux/commits/Zhang-Yuchen/procfs-add-syscall-statistics/20220527-191241
base: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git 7e284070abe53d448517b80493863595af4ab5f0
config: arc-allyesconfig (https://download.01.org/0day-ci/archive/20220527/202205272216.w7dE4biW-lkp@xxxxxxxxx/config)
compiler: arceb-elf-gcc (GCC) 11.3.0
reproduce (this is a W=1 build):
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# https://github.com/intel-lab-lkp/linux/commit/979bf5b1b085588caab1cbdce55e40e823c12db9
git remote add linux-review https://github.com/intel-lab-lkp/linux
git fetch --no-tags linux-review Zhang-Yuchen/procfs-add-syscall-statistics/20220527-191241
git checkout 979bf5b1b085588caab1cbdce55e40e823c12db9
# save the config file
mkdir build_dir && cp config build_dir/.config
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.3.0 make.cross W=1 O=build_dir ARCH=arc SHELL=/bin/bash fs/proc/

If you fix the issue, kindly add following tag where applicable
Reported-by: kernel test robot <lkp@xxxxxxxxx>

All warnings (new ones prefixed by >>):

>> fs/proc/syscall.c:13:5: warning: no previous prototype for 'show_syscalls' [-Wmissing-prototypes]
13 | int show_syscalls(struct seq_file *p, void *v)
| ^~~~~~~~~~~~~


vim +/show_syscalls +13 fs/proc/syscall.c

12
> 13 int show_syscalls(struct seq_file *p, void *v)
14 {
15 int i = *(loff_t *)v, j;
16 static int prec;
17 const char *syscall_name = get_syscall_name(i);
18
19 if (i > NR_syscalls)
20 return 0;
21
22 /* print header and calculate the width of the first column */
23 if (i == 0) {
24 for (prec = 3, j = 1000; prec < 10 && j <= NR_syscalls; ++prec)
25 j *= 10;
26 seq_printf(p, "%*s", prec + 8, "");
27 for_each_online_cpu(j)
28 seq_printf(p, "CPU%-8d", j);
29 seq_putc(p, '\n');
30 }
31
32 if (syscall_name == NULL)
33 return 0;
34
35 seq_printf(p, "%*d: ", prec, i);
36 for_each_online_cpu(j)
37 seq_printf(p, "%10llu ",
38 per_cpu(__per_cpu_syscall_count, j)[i]);
39 seq_printf(p, " %s", syscall_name);
40 seq_putc(p, '\n');
41
42 return 0;
43 }
44

--
0-DAY CI Kernel Test Service
https://01.org/lkp