Re: [PATCH] powerpc: Use of_address_to_resource()

From: kernel test robot
Date: Tue Mar 21 2023 - 02:13:45 EST


Hi Rob,

I love your patch! Yet something to improve:

[auto build test ERROR on powerpc/next]
[also build test ERROR on powerpc/fixes linus/master v6.3-rc3 next-20230321]
[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/Rob-Herring/powerpc-Use-of_address_to_resource/20230320-003601
base: https://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux.git next
patch link: https://lore.kernel.org/r/20230319163154.225597-1-robh%40kernel.org
patch subject: [PATCH] powerpc: Use of_address_to_resource()
config: powerpc-mpc7448_hpc2_defconfig (https://download.01.org/0day-ci/archive/20230321/202303211421.Vzx1L2QW-lkp@xxxxxxxxx/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/f382770f629740b86b433db077440e9b5059628a
git remote add linux-review https://github.com/intel-lab-lkp/linux
git fetch --no-tags linux-review Rob-Herring/powerpc-Use-of_address_to_resource/20230320-003601
git checkout f382770f629740b86b433db077440e9b5059628a
# 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 olddefconfig
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-12.1.0 make.cross W=1 O=build_dir ARCH=powerpc SHELL=/bin/bash arch/powerpc/sysdev/

If you fix the issue, kindly add following tag where applicable
| Reported-by: kernel test robot <lkp@xxxxxxxxx>
| Link: https://lore.kernel.org/oe-kbuild-all/202303211421.Vzx1L2QW-lkp@xxxxxxxxx/

All errors (new ones prefixed by >>):

arch/powerpc/sysdev/tsi108_dev.c: In function 'get_csrbase':
>> arch/powerpc/sysdev/tsi108_dev.c:50:38: error: invalid type argument of '->' (have 'struct resource')
50 | tsi108_csr_base = res->start;
| ^~


vim +50 arch/powerpc/sysdev/tsi108_dev.c

38
39 phys_addr_t get_csrbase(void)
40 {
41 struct device_node *tsi;
42
43 if (tsi108_csr_base != -1)
44 return tsi108_csr_base;
45
46 tsi = of_find_node_by_type(NULL, "tsi-bridge");
47 if (tsi) {
48 struct resource res;
49 of_address_to_resource(tsi, 0, &res);
> 50 tsi108_csr_base = res->start;
51 of_node_put(tsi);
52 }
53 return tsi108_csr_base;
54 }
55 EXPORT_SYMBOL(get_csrbase);
56

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