[PATCH 1/6] powerpc/code-patching: Implement generic text patching function

kernel test robot lkp at intel.com
Fri Sep 16 21:16:03 AEST 2022


Hi Benjamin,

Thank you for the patch! Perhaps something to improve:

[auto build test WARNING on powerpc/next]
[also build test WARNING on next-20220916]
[cannot apply to linus/master v6.0-rc5]
[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/Benjamin-Gray/Out-of-line-static-calls-for-powerpc64-ELF-V2/20220916-142951
base:   https://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux.git next
config: powerpc-allyesconfig (https://download.01.org/0day-ci/archive/20220916/202209161957.R4ivN9mo-lkp@intel.com/config)
compiler: powerpc-linux-gcc (GCC) 12.1.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/31a9d4d694a3a20129f20390f3d7af2c154c8ed1
        git remote add linux-review https://github.com/intel-lab-lkp/linux
        git fetch --no-tags linux-review Benjamin-Gray/Out-of-line-static-calls-for-powerpc64-ELF-V2/20220916-142951
        git checkout 31a9d4d694a3a20129f20390f3d7af2c154c8ed1
        # save the config file
        mkdir build_dir && cp config build_dir/.config
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-12.1.0 make.cross W=1 O=build_dir ARCH=powerpc SHELL=/bin/bash arch/powerpc/lib/

If you fix the issue, kindly add following tag where applicable
Reported-by: kernel test robot <lkp at intel.com>

All warnings (new ones prefixed by >>):

>> arch/powerpc/lib/code-patching.c:235:7: warning: no previous prototype for 'patch_memory' [-Wmissing-prototypes]
     235 | void *patch_memory(void *dest, const void *src, size_t size)
         |       ^~~~~~~~~~~~
   arch/powerpc/lib/code-patching.c: In function 'patch_instruction':
   arch/powerpc/lib/code-patching.c:248:24: error: implicit declaration of function 'patch_text'; did you mean 'path_get'? [-Werror=implicit-function-declaration]
     248 |                 return patch_text(addr, &val, sizeof(val), true);
         |                        ^~~~~~~~~~
         |                        path_get
   arch/powerpc/lib/code-patching.c: At top level:
   arch/powerpc/lib/code-patching.c:230:12: warning: 'do_patch_instruction' defined but not used [-Wunused-function]
     230 | static int do_patch_instruction(u32 *addr, ppc_inst_t instr)
         |            ^~~~~~~~~~~~~~~~~~~~
   cc1: some warnings being treated as errors


vim +/patch_memory +235 arch/powerpc/lib/code-patching.c

   234	
 > 235	void *patch_memory(void *dest, const void *src, size_t size)
   236	{
   237		return memcpy(dest, src, size);
   238	}
   239	

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


More information about the Linuxppc-dev mailing list