kallsyms: move module-related functions under correct configs
authorViktor Malik <vmalik@redhat.com>
Thu, 30 Mar 2023 10:20:01 +0000 (12:20 +0200)
committerAlexei Starovoitov <ast@kernel.org>
Thu, 6 Apr 2023 04:31:11 +0000 (21:31 -0700)
commit34bf93472f8fb60b4189aa2872471017e739cf0a
tree07ca26e35f746b68e48b11c6e830b161a81c3644
parentc6ebae4ccc43aaf279e36bb9bbe627137d7e88e1
kallsyms: move module-related functions under correct configs

Functions for searching module kallsyms should have non-empty
definitions only if CONFIG_MODULES=y and CONFIG_KALLSYMS=y. Until now,
only CONFIG_MODULES check was used for many of these, which may have
caused complilation errors on some configs.

This patch moves all relevant functions under the correct configs.

Fixes: bd5314f8dd2d ("kallsyms, bpf: Move find_kallsyms_symbol_value out of internal header")
Signed-off-by: Viktor Malik <vmalik@redhat.com>
Reported-by: kernel test robot <lkp@intel.com>
Link: https://lore.kernel.org/oe-kbuild-all/202303181535.RFDCnz3E-lkp@intel.com/
Link: https://lore.kernel.org/r/20230330102001.2183693-1-vmalik@redhat.com
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
include/linux/module.h