[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <202109010731.U8qo2asE-lkp@intel.com>
Date: Wed, 1 Sep 2021 07:12:43 +0800
From: kernel test robot <lkp@...el.com>
To: Gerhard Engleder <gerhard@...leder-embedded.com>,
davem@...emloft.net, kuba@...nel.org, andrew@...n.ch,
robh+dt@...nel.org, michal.simek@...inx.com
Cc: kbuild-all@...ts.01.org, netdev@...r.kernel.org,
devicetree@...r.kernel.org,
Gerhard Engleder <gerhard@...leder-embedded.com>
Subject: Re: [PATCH net-next v2 3/3] tsnep: Add TSN endpoint Ethernet MAC
driver
Hi Gerhard,
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/Gerhard-Engleder/TSN-endpoint-Ethernet-MAC-driver/20210901-033601
base: https://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next.git 29ce8f9701072fc221d9c38ad952de1a9578f95c
config: sh-allmodconfig (attached as .config)
compiler: sh4-linux-gcc (GCC) 11.2.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/bd7b8506886248235f157849475c432680aca61c
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review Gerhard-Engleder/TSN-endpoint-Ethernet-MAC-driver/20210901-033601
git checkout bd7b8506886248235f157849475c432680aca61c
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.2.0 make.cross ARCH=sh
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/ethernet/engleder/tsnep_main.c: In function 'tsnep_probe':
>> drivers/net/ethernet/engleder/tsnep_main.c:1084:13: warning: variable 'queue_count' set but not used [-Wunused-but-set-variable]
1084 | int queue_count;
| ^~~~~~~~~~~
Kconfig warnings: (for reference only)
WARNING: unmet direct dependencies detected for SND_ATMEL_SOC_PDC
Depends on SOUND && !UML && SND && SND_SOC && SND_ATMEL_SOC && HAS_DMA
Selected by
- SND_ATMEL_SOC_SSC && SOUND && !UML && SND && SND_SOC && SND_ATMEL_SOC
- SND_ATMEL_SOC_SSC_PDC && SOUND && !UML && SND && SND_SOC && SND_ATMEL_SOC && ATMEL_SSC
vim +/queue_count +1084 drivers/net/ethernet/engleder/tsnep_main.c
1075
1076 static int tsnep_probe(struct platform_device *pdev)
1077 {
1078 struct tsnep_adapter *adapter;
1079 struct net_device *netdev;
1080 struct resource *io;
1081 u32 type;
1082 int revision;
1083 int version;
> 1084 int queue_count;
1085 int retval;
1086
1087 netdev = devm_alloc_etherdev_mqs(&pdev->dev,
1088 sizeof(struct tsnep_adapter),
1089 TSNEP_MAX_QUEUES, TSNEP_MAX_QUEUES);
1090 if (!netdev)
1091 return -ENODEV;
1092 SET_NETDEV_DEV(netdev, &pdev->dev);
1093 adapter = netdev_priv(netdev);
1094 platform_set_drvdata(pdev, adapter);
1095 adapter->pdev = pdev;
1096 adapter->netdev = netdev;
1097 adapter->msg_enable = NETIF_MSG_DRV | NETIF_MSG_PROBE |
1098 NETIF_MSG_LINK | NETIF_MSG_IFUP |
1099 NETIF_MSG_IFDOWN | NETIF_MSG_TX_QUEUED;
1100
1101 netdev->min_mtu = ETH_MIN_MTU;
1102 netdev->max_mtu = TSNEP_MAX_FRAME_SIZE;
1103
1104 spin_lock_init(&adapter->irq_lock);
1105 init_waitqueue_head(&adapter->md_wait);
1106 mutex_init(&adapter->gate_control_lock);
1107
1108 io = platform_get_resource(pdev, IORESOURCE_MEM, 0);
1109 adapter->addr = devm_ioremap_resource(&pdev->dev, io);
1110 if (IS_ERR(adapter->addr))
1111 return PTR_ERR(adapter->addr);
1112 adapter->size = io->end - io->start + 1;
1113 adapter->irq = platform_get_irq(pdev, 0);
1114 netdev->mem_start = io->start;
1115 netdev->mem_end = io->end;
1116 netdev->irq = adapter->irq;
1117
1118 type = ioread32(adapter->addr + ECM_TYPE);
1119 revision = (type & ECM_REVISION_MASK) >> ECM_REVISION_SHIFT;
1120 version = (type & ECM_VERSION_MASK) >> ECM_VERSION_SHIFT;
1121 queue_count = (type & ECM_QUEUE_COUNT_MASK) >> ECM_QUEUE_COUNT_SHIFT;
1122 adapter->gate_control = type & ECM_GATE_CONTROL;
1123
1124 adapter->num_tx_queues = TSNEP_QUEUES;
1125 adapter->num_rx_queues = TSNEP_QUEUES;
1126
1127 iowrite32(0, adapter->addr + ECM_INT_ENABLE);
1128 retval = devm_request_irq(&adapter->pdev->dev, adapter->irq, tsnep_irq,
1129 0, TSNEP, adapter);
1130 if (retval != 0) {
1131 dev_err(&adapter->pdev->dev, "can't get assigned irq %d.",
1132 adapter->irq);
1133 return retval;
1134 }
1135 tsnep_enable_irq(adapter, ECM_INT_MD | ECM_INT_LINK);
1136
1137 retval = tsnep_mac_init(adapter);
1138 if (retval)
1139 goto mac_init_failed;
1140
1141 retval = tsnep_mdio_init(adapter);
1142 if (retval)
1143 goto mdio_init_failed;
1144
1145 retval = tsnep_phy_init(adapter);
1146 if (retval)
1147 goto phy_init_failed;
1148
1149 retval = tsnep_ptp_init(adapter);
1150 if (retval)
1151 goto ptp_init_failed;
1152
1153 retval = tsnep_tc_init(adapter);
1154 if (retval)
1155 goto tc_init_failed;
1156
1157 netdev->netdev_ops = &tsnep_netdev_ops;
1158 netdev->ethtool_ops = &tsnep_ethtool_ops;
1159 netdev->features = NETIF_F_SG;
1160 netdev->hw_features = netdev->features;
1161
1162 /* carrier off reporting is important to ethtool even BEFORE open */
1163 netif_carrier_off(netdev);
1164
1165 retval = register_netdev(netdev);
1166 if (retval)
1167 goto register_failed;
1168
1169 dev_info(&adapter->pdev->dev, "device version %d.%02d\n", version,
1170 revision);
1171 if (adapter->gate_control)
1172 dev_info(&adapter->pdev->dev, "gate control detected\n");
1173
1174 return 0;
1175
1176 unregister_netdev(adapter->netdev);
1177 register_failed:
1178 tsnep_tc_cleanup(adapter);
1179 tc_init_failed:
1180 tsnep_ptp_cleanup(adapter);
1181 ptp_init_failed:
1182 phy_init_failed:
1183 if (adapter->mdiobus)
1184 mdiobus_unregister(adapter->mdiobus);
1185 mdio_init_failed:
1186 mac_init_failed:
1187 return retval;
1188 }
1189
---
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" (55084 bytes)
Powered by blists - more mailing lists