[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <202210100321.KNmbHQSb-lkp@intel.com>
Date: Mon, 10 Oct 2022 03:54:37 +0800
From: kernel test robot <lkp@...el.com>
To: Soha Jin <soha@...u.info>,
Giuseppe Cavallaro <peppe.cavallaro@...com>,
Alexandre Torgue <alexandre.torgue@...s.st.com>,
Jose Abreu <joabreu@...opsys.com>,
"David S. Miller" <davem@...emloft.net>,
Eric Dumazet <edumazet@...gle.com>,
Jakub Kicinski <kuba@...nel.org>,
Paolo Abeni <pabeni@...hat.com>
Cc: llvm@...ts.linux.dev, kbuild-all@...ts.01.org,
netdev@...r.kernel.org, Yangyu Chen <cyy@...self.name>,
linux-kernel@...r.kernel.org, Soha Jin <soha@...u.info>
Subject: Re: [PATCH 1/3] net: stmmac: use fwnode instead of of to configure
driver
Hi Soha,
Thank you for the patch! Yet something to improve:
[auto build test ERROR on linus/master]
[also build test ERROR on next-20221007]
[cannot apply to sunxi/sunxi/for-next shawnguo/for-next atorgue-stm32/stm32-next v6.0]
[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/Soha-Jin/net-stmmac-probing-config-with-fwnode-instead-of-of/20221010-002500
base: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git a6afa4199d3d038fbfdff5511f7523b0e30cb774
config: x86_64-randconfig-a003
compiler: clang version 14.0.6 (https://github.com/llvm/llvm-project f28c006a5895fc0e329fe15fead81e37457cb1d1)
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/c51973c370777f2f4fd307ce3d0d6ff008f93904
git remote add linux-review https://github.com/intel-lab-lkp/linux
git fetch --no-tags linux-review Soha-Jin/net-stmmac-probing-config-with-fwnode-instead-of-of/20221010-002500
git checkout c51973c370777f2f4fd307ce3d0d6ff008f93904
# 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=x86_64 SHELL=/bin/bash drivers/net/ethernet/stmicro/stmmac/
If you fix the issue, kindly add following tag where applicable
| Reported-by: kernel test robot <lkp@...el.com>
All errors (new ones prefixed by >>):
>> drivers/net/ethernet/stmicro/stmmac/stmmac_platform.c:330:15: error: implicit declaration of function 'fwnode_phy_is_fixed_link' is invalid in C99 [-Werror,-Wimplicit-function-declaration]
bool mdio = !fwnode_phy_is_fixed_link(fwnode);
^
>> drivers/net/ethernet/stmicro/stmmac/stmmac_platform.c:332:6: error: implicit declaration of function 'fwnode_is_compatible' is invalid in C99 [-Werror,-Wimplicit-function-declaration]
if (fwnode_is_compatible(fwnode, "snps,dwc-qos-ethernet-4.10")) {
^
drivers/net/ethernet/stmicro/stmmac/stmmac_platform.c:552:6: error: implicit declaration of function 'fwnode_is_compatible' is invalid in C99 [-Werror,-Wimplicit-function-declaration]
if (fwnode_is_compatible(fwnode, "st,spear600-gmac") ||
^
3 errors generated.
vim +/fwnode_phy_is_fixed_link +330 drivers/net/ethernet/stmicro/stmmac/stmmac_platform.c
300
301 /**
302 * stmmac_parse_phy - parse driver parameters to allocate PHY resources
303 * @plat: driver data platform structure
304 * @fwnode: fwnode handle
305 * @dev: device pointer
306 * Description:
307 * The mdio bus will be allocated in case of a phy transceiver is on board;
308 * it will be NULL if the fixed-link is configured.
309 * If there is the "snps,dwmac-mdio" sub-node the mdio will be allocated
310 * in any case (for DSA, mdio must be registered even if fixed-link).
311 * The table below sums the supported configurations:
312 * -------------------------------
313 * snps,phy-addr | Y
314 * -------------------------------
315 * phy-handle | Y
316 * -------------------------------
317 * fixed-link | N
318 * -------------------------------
319 * snps,dwmac-mdio |
320 * even if | Y
321 * fixed-link |
322 * -------------------------------
323 *
324 * It returns 0 in case of success otherwise -ENODEV.
325 */
326 static int stmmac_parse_phy(struct plat_stmmacenet_data *plat,
327 struct fwnode_handle *fwnode)
328 {
329 struct device *dev = fwnode->dev;
> 330 bool mdio = !fwnode_phy_is_fixed_link(fwnode);
331
> 332 if (fwnode_is_compatible(fwnode, "snps,dwc-qos-ethernet-4.10")) {
333 plat->mdio_node = fwnode_get_named_child_node(fwnode, "mdio");
334 } else {
335 /**
336 * If snps,dwmac-mdio is passed from properties, always register
337 * the MDIO
338 */
339 fwnode_for_each_child_node(fwnode, plat->mdio_node) {
340 if (fwnode_is_compatible(plat->mdio_node,
341 "snps,dwmac-mdio"))
342 break;
343 }
344 }
345
346 if (plat->mdio_node) {
347 dev_dbg(dev, "Found MDIO subnode\n");
348 mdio = true;
349 }
350
351 if (mdio) {
352 plat->mdio_bus_data =
353 devm_kzalloc(dev, sizeof(struct stmmac_mdio_bus_data),
354 GFP_KERNEL);
355 if (!plat->mdio_bus_data)
356 return -ENOMEM;
357
358 plat->mdio_bus_data->needs_reset = true;
359 }
360
361 return 0;
362 }
363
--
0-DAY CI Kernel Test Service
https://01.org/lkp
View attachment "config" of type "text/plain" (151908 bytes)
Powered by blists - more mailing lists