kernel/pid.c:767:12: warning: 'proc_do_cad_pid' defined but not used
kernel test robot <[email protected]> Tue, 28 Jul 2026 03:08:23 +0200
| Newsgroups | dev.linux.lists.oe-kbuild-all |
|---|---|
| Message-ID | <[email protected]> |
tree: https://github.com/intel-lab-lkp/linux/commits/Oleg-Nesterov/sysctl-remove-CONFIG_PROC_SYSCTL-it-just-mirrors-CONFIG_SYSCTL/20260727-231232 head: 3e7984a76e1b74111e982852c01663e6f6f6dabe commit: 3e7984a76e1b74111e982852c01663e6f6f6dabe sysctl: remove CONFIG_PROC_SYSCTL, it just mirrors CONFIG_SYSCTL date: 9 hours ago config: x86_64-rhel-9.4-bpf (https://download.01.org/0day-ci/archive/20260728/[email protected]/config) compiler: gcc-14 (Debian 14.2.0-19) 14.2.0 reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20260728/[email protected]/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 <[email protected]> | Closes: https://lore.kernel.org/oe-kbuild-all/[email protected]/ All warnings (new ones prefixed by >>): >> kernel/pid.c:767:12: warning: 'proc_do_cad_pid' defined but not used [-Wunused-function] 767 | static int proc_do_cad_pid(const struct ctl_table *table, int write, void *buffer, | ^~~~~~~~~~~~~~~ vim +/proc_do_cad_pid +767 kernel/pid.c 7863dcc72d0f4b Christian Brauner 2024-11-22 766 e054bcbe7e7af2 Joel Granados 2025-05-05 @767 static int proc_do_cad_pid(const struct ctl_table *table, int write, void *buffer, e054bcbe7e7af2 Joel Granados 2025-05-05 768 size_t *lenp, loff_t *ppos) e054bcbe7e7af2 Joel Granados 2025-05-05 769 { e054bcbe7e7af2 Joel Granados 2025-05-05 770 struct pid *new_pid; e054bcbe7e7af2 Joel Granados 2025-05-05 771 pid_t tmp_pid; e054bcbe7e7af2 Joel Granados 2025-05-05 772 int r; e054bcbe7e7af2 Joel Granados 2025-05-05 773 struct ctl_table tmp_table = *table; e054bcbe7e7af2 Joel Granados 2025-05-05 774 e054bcbe7e7af2 Joel Granados 2025-05-05 775 tmp_pid = pid_vnr(cad_pid); e054bcbe7e7af2 Joel Granados 2025-05-05 776 tmp_table.data = &tmp_pid; e054bcbe7e7af2 Joel Granados 2025-05-05 777 e054bcbe7e7af2 Joel Granados 2025-05-05 778 r = proc_dointvec(&tmp_table, write, buffer, lenp, ppos); e054bcbe7e7af2 Joel Granados 2025-05-05 779 if (r || !write) e054bcbe7e7af2 Joel Granados 2025-05-05 780 return r; e054bcbe7e7af2 Joel Granados 2025-05-05 781 e054bcbe7e7af2 Joel Granados 2025-05-05 782 new_pid = find_get_pid(tmp_pid); e054bcbe7e7af2 Joel Granados 2025-05-05 783 if (!new_pid) e054bcbe7e7af2 Joel Granados 2025-05-05 784 return -ESRCH; e054bcbe7e7af2 Joel Granados 2025-05-05 785 e054bcbe7e7af2 Joel Granados 2025-05-05 786 put_pid(xchg(&cad_pid, new_pid)); e054bcbe7e7af2 Joel Granados 2025-05-05 787 return 0; e054bcbe7e7af2 Joel Granados 2025-05-05 788 } e054bcbe7e7af2 Joel Granados 2025-05-05 789 -- 0-DAY CI Kernel Test Service https://github.com/intel/lkp-tests/wiki