* Re: [PATCH v5 6/7] kallsyms: add /proc/kallmodsyms [not found] <20211027174706.31010-7-nick.alcock@oracle.com> @ 2021-10-28 11:36 ` kernel test robot 2021-10-28 21:52 ` Nick Alcock 0 siblings, 1 reply; 2+ messages in thread From: kernel test robot @ 2021-10-28 11:36 UTC (permalink / raw) To: Nick Alcock, jeyu, masahiroy Cc: llvm, kbuild-all, linux-modules, linux-kernel, arnd, eugene.loh, kris.van.hees [-- Attachment #1: Type: text/plain, Size: 2884 bytes --] Hi Nick, Thank you for the patch! Perhaps something to improve: [auto build test WARNING on linux/master] [also build test WARNING on linus/master v5.15-rc7] [cannot apply to jeyu/modules-next masahiroy/kconfig next-20211027] [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/0day-ci/linux/commits/Nick-Alcock/kbuild-bring-back-tristate-conf/20211028-024948 base: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git 2f111a6fd5b5297b4e92f53798ca086f7c7d33a4 config: hexagon-randconfig-r041-20211027 (attached as .config) compiler: clang version 14.0.0 (https://github.com/llvm/llvm-project 5db7568a6a1fcb408eb8988abdaff2a225a8eb72) 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/0day-ci/linux/commit/3e2ed787d495a82851cad4d99a369524140966ae git remote add linux-review https://github.com/0day-ci/linux git fetch --no-tags linux-review Nick-Alcock/kbuild-bring-back-tristate-conf/20211028-024948 git checkout 3e2ed787d495a82851cad4d99a369524140966ae # save the attached .config to linux build tree COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 ARCH=hexagon If you fix the issue, kindly add following tag as appropriate Reported-by: kernel test robot <lkp@intel.com> All warnings (new ones prefixed by >>): kernel/kallsyms.c:645:12: warning: no previous prototype for function 'arch_get_kallsym' [-Wmissing-prototypes] int __weak arch_get_kallsym(unsigned int symnum, unsigned long *value, ^ kernel/kallsyms.c:645:1: note: declare 'static' if the function is not intended to be used outside of this translation unit int __weak arch_get_kallsym(unsigned int symnum, unsigned long *value, ^ static kernel/kallsyms.c:1054:30: warning: unused variable 'kallsyms_proc_ops' [-Wunused-const-variable] static const struct proc_ops kallsyms_proc_ops = { ^ >> kernel/kallsyms.c:1062:30: warning: unused variable 'kallmodsyms_proc_ops' [-Wunused-const-variable] static const struct proc_ops kallmodsyms_proc_ops = { ^ 3 warnings generated. vim +/kallmodsyms_proc_ops +1062 kernel/kallsyms.c 1060 1061 #ifdef CONFIG_KALLMODSYMS > 1062 static const struct proc_ops kallmodsyms_proc_ops = { 1063 .proc_open = kallmodsyms_open, 1064 .proc_read = seq_read, 1065 .proc_lseek = seq_lseek, 1066 .proc_release = seq_release_private, 1067 }; 1068 #endif 1069 --- 0-DAY CI Kernel Test Service, Intel Corporation https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org [-- Attachment #2: .config.gz --] [-- Type: application/gzip, Size: 27340 bytes --] ^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH v5 6/7] kallsyms: add /proc/kallmodsyms 2021-10-28 11:36 ` [PATCH v5 6/7] kallsyms: add /proc/kallmodsyms kernel test robot @ 2021-10-28 21:52 ` Nick Alcock 0 siblings, 0 replies; 2+ messages in thread From: Nick Alcock @ 2021-10-28 21:52 UTC (permalink / raw) To: Nick Alcock, jeyu, masahiroy Cc: llvm, kbuild-all, linux-modules, linux-kernel, arnd, eugene.loh, kris.van.hees For reference, and to be maximally pedantic: On 28 Oct 2021, kernel test robot said: > Hi Nick, > > Thank you for the patch! Perhaps something to improve: Nope! This is a (very small) flaw in the !CONFIG_PROC_FS case in include/linux/proc_fs.h. (I don't think one can seriously call it a *bug*, as such.) It's not a problem in this patch. > config: hexagon-randconfig-r041-20211027 (attached as .config) This config includes: # CONFIG_PROC_FS is not set > All warnings (new ones prefixed by >>): [unrelated warnings snipped] > static > kernel/kallsyms.c:1054:30: warning: unused variable 'kallsyms_proc_ops' [-Wunused-const-variable] > static const struct proc_ops kallsyms_proc_ops = { > ^ This warning already existed (and doubtless countless others just like it all over the tree in this configuration). This is because proc_create(), in the !CONFIG_PROC_FS case, is a #define that just does nothing: so the compiler can see that none of its args are used, and will complain about those that have no other references. The proc_ops is almost certainly going to be one such. The new warning is just the same: >>> kernel/kallsyms.c:1062:30: warning: unused variable 'kallmodsyms_proc_ops' [-Wunused-const-variable] > static const struct proc_ops kallmodsyms_proc_ops = { > ^ > 3 warnings generated. The kallmodsyms_proc_ops is obviously doing the same thing as kallsyms_proc_ops (because it has to), so it gets the same warning. Short of wrapping every single declaration of a proc_ops structure, and every call to proc_create, in #ifdef CONFIG_PROC_FS (which is obviously gross and exactly the thing the macro in proc_fs.h is intended to avoid), there is no way of fixing this warning on its own: it must be fixed in proc_fs.h. (Perhaps by making a bunch of those macros into functions with __attribute__((__unused__)) attached to appropriate args.) -- NULL && (void) ^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2021-10-28 21:52 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <20211027174706.31010-7-nick.alcock@oracle.com>
2021-10-28 11:36 ` [PATCH v5 6/7] kallsyms: add /proc/kallmodsyms kernel test robot
2021-10-28 21:52 ` Nick Alcock
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox