[rmk-arm:zii 42/87] drivers/net/pcs/pcs-xpcs.c:178:9: error: call to undeclared function 'mdiodev_c45_read'; ISO C99 and later do not support implicit function declarations

From: kernel test robot
Date: Wed Aug 03 2022 - 18:13:33 EST


tree: git://git.armlinux.org.uk/~rmk/linux-arm zii
head: 315d00812d1f8ed8bbbce4e4fd8d32fc883900a0
commit: 8994c74ee066d099110807ffcee3f61ffd62d28b [42/87] net: pcs: xpcs: use mdiodev accessors
config: arm-randconfig-r014-20220803 (https://download.01.org/0day-ci/archive/20220804/202208040637.Ng1pO69r-lkp@xxxxxxxxx/config)
compiler: clang version 16.0.0 (https://github.com/llvm/llvm-project 495519e5f8232d144ed26e9c18dbcbac6a5f25eb)
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 arm cross compiling tool for clang build
# apt-get install binutils-arm-linux-gnueabi
git remote add rmk-arm git://git.armlinux.org.uk/~rmk/linux-arm
git fetch --no-tags rmk-arm zii
git checkout 8994c74ee066d099110807ffcee3f61ffd62d28b
# 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=arm SHELL=/bin/bash drivers/net/pcs/

If you fix the issue, kindly add following tag where applicable
Reported-by: kernel test robot <lkp@xxxxxxxxx>

All errors (new ones prefixed by >>):

>> drivers/net/pcs/pcs-xpcs.c:178:9: error: call to undeclared function 'mdiodev_c45_read'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
return mdiodev_c45_read(xpcs->mdiodev, dev, reg);
^
drivers/net/pcs/pcs-xpcs.c:178:9: note: did you mean 'mdiobus_c45_read'?
include/linux/mdio.h:505:19: note: 'mdiobus_c45_read' declared here
static inline int mdiobus_c45_read(struct mii_bus *bus, int prtad, int devad,
^
>> drivers/net/pcs/pcs-xpcs.c:183:9: error: call to undeclared function 'mdiodev_c45_write'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
return mdiodev_c45_write(xpcs->mdiodev, dev, reg, val);
^
drivers/net/pcs/pcs-xpcs.c:183:9: note: did you mean 'mdiobus_c45_write'?
include/linux/mdio.h:511:19: note: 'mdiobus_c45_write' declared here
static inline int mdiobus_c45_write(struct mii_bus *bus, int prtad, int devad,
^
2 errors generated.


vim +/mdiodev_c45_read +178 drivers/net/pcs/pcs-xpcs.c

172
173 #define xpcs_linkmode_supported(compat, mode) \
174 __xpcs_linkmode_supported(compat, ETHTOOL_LINK_MODE_ ## mode ## _BIT)
175
176 int xpcs_read(struct dw_xpcs *xpcs, int dev, u32 reg)
177 {
> 178 return mdiodev_c45_read(xpcs->mdiodev, dev, reg);
179 }
180
181 int xpcs_write(struct dw_xpcs *xpcs, int dev, u32 reg, u16 val)
182 {
> 183 return mdiodev_c45_write(xpcs->mdiodev, dev, reg, val);
184 }
185

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