Re: [POC 1/7] livepatch: Add callbacks for introducing and removing states

From: kernel test robot
Date: Fri Nov 10 2023 - 22:21:25 EST


Hi Petr,

kernel test robot noticed the following build warnings:

[auto build test WARNING on shuah-kselftest/next]
[also build test WARNING on shuah-kselftest/fixes linus/master v6.6 next-20231110]
[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#_base_tree_information]

url: https://github.com/intel-lab-lkp/linux/commits/Petr-Mladek/livepatch-Add-callbacks-for-introducing-and-removing-states/20231111-014906
base: https://git.kernel.org/pub/scm/linux/kernel/git/shuah/linux-kselftest.git next
patch link: https://lore.kernel.org/r/20231110170428.6664-2-pmladek%40suse.com
patch subject: [POC 1/7] livepatch: Add callbacks for introducing and removing states
config: x86_64-rhel-8.3-rust (https://download.01.org/0day-ci/archive/20231111/202311111107.avVIpRi2-lkp@xxxxxxxxx/config)
compiler: clang version 16.0.4 (https://github.com/llvm/llvm-project.git ae42196bc493ffe877a7e3dff8be32035dea4d07)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20231111/202311111107.avVIpRi2-lkp@xxxxxxxxx/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 <lkp@xxxxxxxxx>
| Closes: https://lore.kernel.org/oe-kbuild-all/202311111107.avVIpRi2-lkp@xxxxxxxxx/

All warnings (new ones prefixed by >>):

>> kernel/livepatch/state.c:121:6: warning: no previous prototype for function 'is_state_in_other_patches' [-Wmissing-prototypes]
bool is_state_in_other_patches(struct klp_patch *patch, struct klp_state *state)
^
kernel/livepatch/state.c:121:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
bool is_state_in_other_patches(struct klp_patch *patch, struct klp_state *state)
^
static
1 warning generated.


vim +/is_state_in_other_patches +121 kernel/livepatch/state.c

120
> 121 bool is_state_in_other_patches(struct klp_patch *patch, struct klp_state *state)
122 {
123 struct klp_patch *old_patch;
124 struct klp_state *old_state;
125
126 klp_for_each_patch(old_patch) {
127 if (old_patch == patch)
128 continue;
129
130 klp_for_each_state(old_patch, old_state) {
131 if (old_state->id == state->id)
132 return true;
133 }
134 }
135
136 return false;
137 }
138

--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki