[powerpc:next-test 139/145] arch/powerpc/sysdev/mpc5xxx_clocks.c:26:2: error: call to undeclared function 'fwnode_for_each_parent_node'; ISO C99 and later do not support implicit function declarations

kernel test robot lkp at intel.com
Wed May 18 06:27:08 AEST 2022


tree:   https://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux.git next-test
head:   2e4a9942261f89ad204a8189634029a4b1f0efb6
commit: f9724684ea2198caaab132514ca104175ed2f15f [139/145] powerpc/mpc5xxx: Switch mpc5xxx_get_bus_frequency() to use fwnode
config: powerpc-mpc512x_defconfig (https://download.01.org/0day-ci/archive/20220518/202205180443.Cfi2jikJ-lkp@intel.com/config)
compiler: clang version 15.0.0 (https://github.com/llvm/llvm-project 853fa8ee225edf2d0de94b0dcbd31bea916e825e)
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
        # install powerpc cross compiling tool for clang build
        # apt-get install binutils-powerpc-linux-gnu
        # https://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux.git/commit/?id=f9724684ea2198caaab132514ca104175ed2f15f
        git remote add powerpc https://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux.git
        git fetch --no-tags powerpc next-test
        git checkout f9724684ea2198caaab132514ca104175ed2f15f
        # save the config file
        mkdir build_dir && cp config build_dir/.config
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 O=build_dir ARCH=powerpc SHELL=/bin/bash

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

All errors (new ones prefixed by >>):

>> arch/powerpc/sysdev/mpc5xxx_clocks.c:26:2: error: call to undeclared function 'fwnode_for_each_parent_node'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
           fwnode_for_each_parent_node(fwnode, parent) {
           ^
>> arch/powerpc/sysdev/mpc5xxx_clocks.c:26:45: error: expected ';' after expression
           fwnode_for_each_parent_node(fwnode, parent) {
                                                      ^
                                                      ;
   2 errors generated.


vim +/fwnode_for_each_parent_node +26 arch/powerpc/sysdev/mpc5xxx_clocks.c

     8	
     9	/**
    10	 * mpc5xxx_fwnode_get_bus_frequency - Find the bus frequency for a firmware node
    11	 * @fwnode:	firmware node
    12	 *
    13	 * Returns bus frequency (IPS on MPC512x, IPB on MPC52xx),
    14	 * or 0 if the bus frequency cannot be found.
    15	 */
    16	unsigned long mpc5xxx_fwnode_get_bus_frequency(struct fwnode_handle *fwnode)
    17	{
    18		struct fwnode_handle *parent;
    19		u32 bus_freq;
    20		int ret;
    21	
    22		ret = fwnode_property_read_u32(fwnode, "bus-frequency", &bus_freq);
    23		if (!ret)
    24			return bus_freq;
    25	
  > 26		fwnode_for_each_parent_node(fwnode, parent) {

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


More information about the Linuxppc-dev mailing list