Re: [PATCH v2 net-next 9/9] net: korina: Make driver COMPILE_TESTable

From: kernel test robot
Date: Wed Apr 14 2021 - 22:49:51 EST


Hi Thomas,

I love your patch! Yet something to improve:

[auto build test ERROR on net-next/master]

url: https://github.com/0day-ci/linux/commits/Thomas-Bogendoerfer/net-Korina-improvements/20210414-233326
base: https://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next.git 5871d0c6b8ea805916c3135d0c53b095315bc674
config: nios2-allyesconfig (attached as .config)
compiler: nios2-linux-gcc (GCC) 9.3.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/0day-ci/linux/commit/a7d955bacb53b068d30f7527c6bafaf4ca2419e7
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review Thomas-Bogendoerfer/net-Korina-improvements/20210414-233326
git checkout a7d955bacb53b068d30f7527c6bafaf4ca2419e7
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross W=1 ARCH=nios2

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

All errors (new ones prefixed by >>):

drivers/net/ethernet/korina.c: In function 'korina_probe':
>> drivers/net/ethernet/korina.c:1303:14: error: too few arguments to function 'of_get_mac_address'
1303 | mac_addr = of_get_mac_address(pdev->dev.of_node);
| ^~~~~~~~~~~~~~~~~~
In file included from drivers/net/ethernet/korina.c:46:
include/linux/of_net.h:16:12: note: declared here
16 | extern int of_get_mac_address(struct device_node *np, u8 *mac);
| ^~~~~~~~~~~~~~~~~~


vim +/of_get_mac_address +1303 drivers/net/ethernet/korina.c

52b031ff3987a0 drivers/net/korina.c Alexander Beregalov 2009-04-15 1283
ef11291bcd5f96 drivers/net/korina.c Florian Fainelli 2008-03-19 1284 static int korina_probe(struct platform_device *pdev)
ef11291bcd5f96 drivers/net/korina.c Florian Fainelli 2008-03-19 1285 {
a53164fb8ec50c drivers/net/ethernet/korina.c Thomas Bogendoerfer 2021-04-14 1286 const u8 *mac_addr = dev_get_platdata(&pdev->dev);
ef11291bcd5f96 drivers/net/korina.c Florian Fainelli 2008-03-19 1287 struct korina_private *lp;
ef11291bcd5f96 drivers/net/korina.c Florian Fainelli 2008-03-19 1288 struct net_device *dev;
0bc4efb1d82bd4 drivers/net/ethernet/korina.c Thomas Bogendoerfer 2021-04-14 1289 struct clk *clk;
1857bf0ef3562f drivers/net/ethernet/korina.c Thomas Bogendoerfer 2021-04-14 1290 void __iomem *p;
e3152ab901bcec drivers/net/korina.c Francois Romieu 2008-04-20 1291 int rc;
ef11291bcd5f96 drivers/net/korina.c Florian Fainelli 2008-03-19 1292
1857bf0ef3562f drivers/net/ethernet/korina.c Thomas Bogendoerfer 2021-04-14 1293 dev = devm_alloc_etherdev(&pdev->dev, sizeof(struct korina_private));
41de8d4cff21a2 drivers/net/ethernet/korina.c Joe Perches 2012-01-29 1294 if (!dev)
ef11291bcd5f96 drivers/net/korina.c Florian Fainelli 2008-03-19 1295 return -ENOMEM;
41de8d4cff21a2 drivers/net/ethernet/korina.c Joe Perches 2012-01-29 1296
ef11291bcd5f96 drivers/net/korina.c Florian Fainelli 2008-03-19 1297 SET_NETDEV_DEV(dev, &pdev->dev);
ef11291bcd5f96 drivers/net/korina.c Florian Fainelli 2008-03-19 1298 lp = netdev_priv(dev);
ef11291bcd5f96 drivers/net/korina.c Florian Fainelli 2008-03-19 1299
a53164fb8ec50c drivers/net/ethernet/korina.c Thomas Bogendoerfer 2021-04-14 1300 if (mac_addr) {
a53164fb8ec50c drivers/net/ethernet/korina.c Thomas Bogendoerfer 2021-04-14 1301 ether_addr_copy(dev->dev_addr, mac_addr);
a53164fb8ec50c drivers/net/ethernet/korina.c Thomas Bogendoerfer 2021-04-14 1302 } else {
a53164fb8ec50c drivers/net/ethernet/korina.c Thomas Bogendoerfer 2021-04-14 @1303 mac_addr = of_get_mac_address(pdev->dev.of_node);
a53164fb8ec50c drivers/net/ethernet/korina.c Thomas Bogendoerfer 2021-04-14 1304 if (!IS_ERR(mac_addr))
a53164fb8ec50c drivers/net/ethernet/korina.c Thomas Bogendoerfer 2021-04-14 1305 ether_addr_copy(dev->dev_addr, mac_addr);
a53164fb8ec50c drivers/net/ethernet/korina.c Thomas Bogendoerfer 2021-04-14 1306 else
a53164fb8ec50c drivers/net/ethernet/korina.c Thomas Bogendoerfer 2021-04-14 1307 eth_hw_addr_random(dev);
a53164fb8ec50c drivers/net/ethernet/korina.c Thomas Bogendoerfer 2021-04-14 1308 }
ef11291bcd5f96 drivers/net/korina.c Florian Fainelli 2008-03-19 1309
0bc4efb1d82bd4 drivers/net/ethernet/korina.c Thomas Bogendoerfer 2021-04-14 1310 clk = devm_clk_get(&pdev->dev, NULL);
0bc4efb1d82bd4 drivers/net/ethernet/korina.c Thomas Bogendoerfer 2021-04-14 1311 if (!IS_ERR(clk)) {
0bc4efb1d82bd4 drivers/net/ethernet/korina.c Thomas Bogendoerfer 2021-04-14 1312 clk_prepare_enable(clk);
0bc4efb1d82bd4 drivers/net/ethernet/korina.c Thomas Bogendoerfer 2021-04-14 1313 lp->mii_clock_freq = clk_get_rate(clk);
0bc4efb1d82bd4 drivers/net/ethernet/korina.c Thomas Bogendoerfer 2021-04-14 1314 } else {
0bc4efb1d82bd4 drivers/net/ethernet/korina.c Thomas Bogendoerfer 2021-04-14 1315 lp->mii_clock_freq = 200000000; /* max possible input clk */
0bc4efb1d82bd4 drivers/net/ethernet/korina.c Thomas Bogendoerfer 2021-04-14 1316 }
0bc4efb1d82bd4 drivers/net/ethernet/korina.c Thomas Bogendoerfer 2021-04-14 1317
ef11291bcd5f96 drivers/net/korina.c Florian Fainelli 2008-03-19 1318 lp->rx_irq = platform_get_irq_byname(pdev, "korina_rx");
ef11291bcd5f96 drivers/net/korina.c Florian Fainelli 2008-03-19 1319 lp->tx_irq = platform_get_irq_byname(pdev, "korina_tx");
ef11291bcd5f96 drivers/net/korina.c Florian Fainelli 2008-03-19 1320
1857bf0ef3562f drivers/net/ethernet/korina.c Thomas Bogendoerfer 2021-04-14 1321 p = devm_platform_ioremap_resource_byname(pdev, "korina_regs");
1857bf0ef3562f drivers/net/ethernet/korina.c Thomas Bogendoerfer 2021-04-14 1322 if (!p) {
f16aea4d201018 drivers/net/korina.c Phil Sutter 2009-08-12 1323 printk(KERN_ERR DRV_NAME ": cannot remap registers\n");
1857bf0ef3562f drivers/net/ethernet/korina.c Thomas Bogendoerfer 2021-04-14 1324 return -ENOMEM;
ef11291bcd5f96 drivers/net/korina.c Florian Fainelli 2008-03-19 1325 }
1857bf0ef3562f drivers/net/ethernet/korina.c Thomas Bogendoerfer 2021-04-14 1326 lp->eth_regs = p;
ef11291bcd5f96 drivers/net/korina.c Florian Fainelli 2008-03-19 1327
1857bf0ef3562f drivers/net/ethernet/korina.c Thomas Bogendoerfer 2021-04-14 1328 p = devm_platform_ioremap_resource_byname(pdev, "korina_dma_rx");
1857bf0ef3562f drivers/net/ethernet/korina.c Thomas Bogendoerfer 2021-04-14 1329 if (!p) {
f16aea4d201018 drivers/net/korina.c Phil Sutter 2009-08-12 1330 printk(KERN_ERR DRV_NAME ": cannot remap Rx DMA registers\n");
1857bf0ef3562f drivers/net/ethernet/korina.c Thomas Bogendoerfer 2021-04-14 1331 return -ENOMEM;
ef11291bcd5f96 drivers/net/korina.c Florian Fainelli 2008-03-19 1332 }
1857bf0ef3562f drivers/net/ethernet/korina.c Thomas Bogendoerfer 2021-04-14 1333 lp->rx_dma_regs = p;
ef11291bcd5f96 drivers/net/korina.c Florian Fainelli 2008-03-19 1334
1857bf0ef3562f drivers/net/ethernet/korina.c Thomas Bogendoerfer 2021-04-14 1335 p = devm_platform_ioremap_resource_byname(pdev, "korina_dma_tx");
1857bf0ef3562f drivers/net/ethernet/korina.c Thomas Bogendoerfer 2021-04-14 1336 if (!p) {
f16aea4d201018 drivers/net/korina.c Phil Sutter 2009-08-12 1337 printk(KERN_ERR DRV_NAME ": cannot remap Tx DMA registers\n");
1857bf0ef3562f drivers/net/ethernet/korina.c Thomas Bogendoerfer 2021-04-14 1338 return -ENOMEM;
ef11291bcd5f96 drivers/net/korina.c Florian Fainelli 2008-03-19 1339 }
1857bf0ef3562f drivers/net/ethernet/korina.c Thomas Bogendoerfer 2021-04-14 1340 lp->tx_dma_regs = p;
ef11291bcd5f96 drivers/net/korina.c Florian Fainelli 2008-03-19 1341
df997a5caa5ebe drivers/net/ethernet/korina.c Thomas Bogendoerfer 2021-04-14 1342 lp->td_ring = dmam_alloc_coherent(&pdev->dev, TD_RING_SIZE,
df997a5caa5ebe drivers/net/ethernet/korina.c Thomas Bogendoerfer 2021-04-14 1343 &lp->td_dma, GFP_KERNEL);
1857bf0ef3562f drivers/net/ethernet/korina.c Thomas Bogendoerfer 2021-04-14 1344 if (!lp->td_ring)
1857bf0ef3562f drivers/net/ethernet/korina.c Thomas Bogendoerfer 2021-04-14 1345 return -ENOMEM;
ef11291bcd5f96 drivers/net/korina.c Florian Fainelli 2008-03-19 1346
df997a5caa5ebe drivers/net/ethernet/korina.c Thomas Bogendoerfer 2021-04-14 1347 lp->rd_ring = dmam_alloc_coherent(&pdev->dev, RD_RING_SIZE,
df997a5caa5ebe drivers/net/ethernet/korina.c Thomas Bogendoerfer 2021-04-14 1348 &lp->rd_dma, GFP_KERNEL);
df997a5caa5ebe drivers/net/ethernet/korina.c Thomas Bogendoerfer 2021-04-14 1349 if (!lp->rd_ring)
df997a5caa5ebe drivers/net/ethernet/korina.c Thomas Bogendoerfer 2021-04-14 1350 return -ENOMEM;
ef11291bcd5f96 drivers/net/korina.c Florian Fainelli 2008-03-19 1351
ef11291bcd5f96 drivers/net/korina.c Florian Fainelli 2008-03-19 1352 spin_lock_init(&lp->lock);
ef11291bcd5f96 drivers/net/korina.c Florian Fainelli 2008-03-19 1353 /* just use the rx dma irq */
ef11291bcd5f96 drivers/net/korina.c Florian Fainelli 2008-03-19 1354 dev->irq = lp->rx_irq;
ef11291bcd5f96 drivers/net/korina.c Florian Fainelli 2008-03-19 1355 lp->dev = dev;
df997a5caa5ebe drivers/net/ethernet/korina.c Thomas Bogendoerfer 2021-04-14 1356 lp->dmadev = &pdev->dev;
ef11291bcd5f96 drivers/net/korina.c Florian Fainelli 2008-03-19 1357
52b031ff3987a0 drivers/net/korina.c Alexander Beregalov 2009-04-15 1358 dev->netdev_ops = &korina_netdev_ops;
ef11291bcd5f96 drivers/net/korina.c Florian Fainelli 2008-03-19 1359 dev->ethtool_ops = &netdev_ethtool_ops;
ef11291bcd5f96 drivers/net/korina.c Florian Fainelli 2008-03-19 1360 dev->watchdog_timeo = TX_TIMEOUT;
d609d2893c25a3 drivers/net/ethernet/korina.c Roman Yeryomin 2017-09-17 1361 netif_napi_add(dev, &lp->napi, korina_poll, NAPI_POLL_WEIGHT);
ef11291bcd5f96 drivers/net/korina.c Florian Fainelli 2008-03-19 1362
ef11291bcd5f96 drivers/net/korina.c Florian Fainelli 2008-03-19 1363 lp->mii_if.dev = dev;
f645a16ba85561 drivers/net/ethernet/korina.c Thomas Bogendoerfer 2021-04-14 1364 lp->mii_if.mdio_read = korina_mdio_read;
f645a16ba85561 drivers/net/ethernet/korina.c Thomas Bogendoerfer 2021-04-14 1365 lp->mii_if.mdio_write = korina_mdio_write;
f645a16ba85561 drivers/net/ethernet/korina.c Thomas Bogendoerfer 2021-04-14 1366 lp->mii_if.phy_id = 1;
ef11291bcd5f96 drivers/net/korina.c Florian Fainelli 2008-03-19 1367 lp->mii_if.phy_id_mask = 0x1f;
ef11291bcd5f96 drivers/net/korina.c Florian Fainelli 2008-03-19 1368 lp->mii_if.reg_num_mask = 0x1f;
ef11291bcd5f96 drivers/net/korina.c Florian Fainelli 2008-03-19 1369
2d6c00ed2bbd38 drivers/net/ethernet/korina.c Thomas Bogendoerfer 2021-04-14 1370 platform_set_drvdata(pdev, dev);
2d6c00ed2bbd38 drivers/net/ethernet/korina.c Thomas Bogendoerfer 2021-04-14 1371
e3152ab901bcec drivers/net/korina.c Francois Romieu 2008-04-20 1372 rc = register_netdev(dev);
e3152ab901bcec drivers/net/korina.c Francois Romieu 2008-04-20 1373 if (rc < 0) {
ef11291bcd5f96 drivers/net/korina.c Florian Fainelli 2008-03-19 1374 printk(KERN_ERR DRV_NAME
f16aea4d201018 drivers/net/korina.c Phil Sutter 2009-08-12 1375 ": cannot register net device: %d\n", rc);
1857bf0ef3562f drivers/net/ethernet/korina.c Thomas Bogendoerfer 2021-04-14 1376 return rc;
ef11291bcd5f96 drivers/net/korina.c Florian Fainelli 2008-03-19 1377 }
34309b36e4f1ab drivers/net/ethernet/korina.c Kees Cook 2017-10-26 1378 timer_setup(&lp->media_check_timer, korina_poll_media, 0);
f16aea4d201018 drivers/net/korina.c Phil Sutter 2009-08-12 1379
ceb3d239453254 drivers/net/korina.c Phil Sutter 2010-05-29 1380 INIT_WORK(&lp->restart_task, korina_restart_task);
ceb3d239453254 drivers/net/korina.c Phil Sutter 2010-05-29 1381
f16aea4d201018 drivers/net/korina.c Phil Sutter 2009-08-12 1382 printk(KERN_INFO "%s: " DRV_NAME "-" DRV_VERSION " " DRV_RELDATE "\n",
f16aea4d201018 drivers/net/korina.c Phil Sutter 2009-08-12 1383 dev->name);
e3152ab901bcec drivers/net/korina.c Francois Romieu 2008-04-20 1384 return rc;
ef11291bcd5f96 drivers/net/korina.c Florian Fainelli 2008-03-19 1385 }
ef11291bcd5f96 drivers/net/korina.c Florian Fainelli 2008-03-19 1386

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@xxxxxxxxxxxx

Attachment: .config.gz
Description: application/gzip