[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <202110130453.UtERxi93-lkp@intel.com>
Date: Wed, 13 Oct 2021 04:58:25 +0800
From: kernel test robot <lkp@...el.com>
To: Alvin Šipraga <alvin@...s.dk>,
Linus Walleij <linus.walleij@...aro.org>,
Andrew Lunn <andrew@...n.ch>,
Vivien Didelot <vivien.didelot@...il.com>,
Florian Fainelli <f.fainelli@...il.com>,
Vladimir Oltean <olteanv@...il.com>,
"David S. Miller" <davem@...emloft.net>,
Jakub Kicinski <kuba@...nel.org>,
Rob Herring <robh+dt@...nel.org>,
Heiner Kallweit <hkallweit1@...il.com>
Cc: kbuild-all@...ts.01.org, netdev@...r.kernel.org
Subject: Re: [PATCH net-next 5/6] net: dsa: realtek-smi: add rtl8365mb
subdriver for RTL8365MB-VC
Hi "Alvin,
Thank you for the patch! Perhaps something to improve:
[auto build test WARNING on net-next/master]
url: https://github.com/0day-ci/linux/commits/Alvin-ipraga/net-dsa-add-support-for-RTL8365MB-VC/20211012-204007
base: https://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next.git 177c92353be935db555d0d08729e871145ec698c
config: i386-randconfig-a001-20211012 (attached as .config)
compiler: gcc-9 (Debian 9.3.0-22) 9.3.0
reproduce (this is a W=1 build):
# https://github.com/0day-ci/linux/commit/1f05b453a6d1b64bb7cefff2daa90d9b1e7bce77
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review Alvin-ipraga/net-dsa-add-support-for-RTL8365MB-VC/20211012-204007
git checkout 1f05b453a6d1b64bb7cefff2daa90d9b1e7bce77
# save the attached .config to linux build tree
make W=1 ARCH=i386
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@...el.com>
All warnings (new ones prefixed by >>):
drivers/net/dsa/rtl8365mb.c: In function 'rtl8365mb_setup':
>> drivers/net/dsa/rtl8365mb.c:1428:20: warning: variable 'mb' set but not used [-Wunused-but-set-variable]
1428 | struct rtl8365mb *mb;
| ^~
vim +/mb +1428 drivers/net/dsa/rtl8365mb.c
1424
1425 static int rtl8365mb_setup(struct dsa_switch *ds)
1426 {
1427 struct realtek_smi *smi = ds->priv;
> 1428 struct rtl8365mb *mb;
1429 int ret;
1430 int i;
1431
1432 mb = smi->chip_data;
1433
1434 ret = rtl8365mb_reset_chip(smi);
1435 if (ret) {
1436 dev_err(smi->dev, "failed to reset chip: %d\n", ret);
1437 return ret;
1438 }
1439
1440 /* Configure switch to vendor-defined initial state */
1441 ret = rtl8365mb_switch_init(smi);
1442 if (ret) {
1443 dev_err(smi->dev, "failed to initialize switch: %d\n", ret);
1444 return ret;
1445 }
1446
1447 /* Configure CPU tagging */
1448 ret = rtl8365mb_cpu_config(smi);
1449 if (ret)
1450 return ret;
1451
1452 /* Configure ports in standalone mode */
1453 for (i = 0; i < smi->num_ports; i++) {
1454 /* Forward only to the CPU */
1455 ret = rtl8365mb_port_set_isolation(smi, i, BIT(smi->cpu_port));
1456 if (ret)
1457 return ret;
1458
1459 /* Disable learning */
1460 ret = rtl8365mb_port_set_learning(smi, i, false);
1461 if (ret)
1462 return ret;
1463
1464 /* Set the initial STP state of all ports to DISABLED, otherwise
1465 * ports will still forward frames to the CPU despite being
1466 * administratively down by default.
1467 */
1468 rtl8365mb_port_stp_state_set(smi->ds, i, BR_STATE_DISABLED);
1469 }
1470
1471 /* Set maximum packet length to 1536 bytes */
1472 ret = regmap_update_bits(smi->map, RTL8365MB_CFG0_MAX_LEN_REG,
1473 RTL8365MB_CFG0_MAX_LEN_MASK,
1474 FIELD_PREP(RTL8365MB_CFG0_MAX_LEN_MASK, 1536));
1475 if (ret)
1476 return ret;
1477
1478 /* Set up cascading IRQs */
1479 ret = rtl8365mb_irq_setup(smi);
1480 if (ret == -EPROBE_DEFER)
1481 return ret;
1482 else if (ret)
1483 dev_info(smi->dev, "no interrupt support\n");
1484
1485 ret = realtek_smi_setup_mdio(smi);
1486 if (ret) {
1487 dev_err(smi->dev, "could not set up MDIO bus\n");
1488 return -ENODEV;
1489 }
1490
1491 return ret;
1492 }
1493
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
Download attachment ".config.gz" of type "application/gzip" (37193 bytes)
Powered by blists - more mailing lists