[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <202007282313.0bP1yQfU%lkp@intel.com>
Date: Wed, 29 Jul 2020 00:04:26 +0800
From: kernel test robot <lkp@...el.com>
To: Igor Russkikh <irusskikh@...vell.com>, netdev@...r.kernel.org
Cc: kbuild-all@...ts.01.org, clang-built-linux@...glegroups.com,
"David S . Miller" <davem@...emloft.net>,
Jakub Kicinski <kuba@...nel.org>,
Ariel Elior <aelior@...vell.com>,
Michal Kalderon <mkalderon@...vell.com>,
Igor Russkikh <irusskikh@...vell.com>,
Alexander Lobakin <alobakin@...vell.com>
Subject: Re: [PATCH v2 net-next 11/11] qede: make driver reliable on unload
after failures
Hi Igor,
I love your patch! Perhaps something to improve:
[auto build test WARNING on net-next/master]
url: https://github.com/0day-ci/linux/commits/Igor-Russkikh/qed-introduce-devlink-health-support/20200728-170206
base: https://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next.git 5e619d73e6797ed9f2554a1bf996d52d8c91ca50
config: x86_64-randconfig-a003-20200728 (attached as .config)
compiler: clang version 12.0.0 (https://github.com/llvm/llvm-project e57464151d4c4912a7ec4d6fd0920056b2f75c7c)
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 x86_64 cross compiling tool for clang build
# apt-get install binutils-x86-64-linux-gnu
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=x86_64
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/qlogic/qede/qede_main.c:1165:6: warning: variable 'edev' is used uninitialized whenever 'if' condition is true [-Wsometimes-uninitialized]
if (rc)
^~
drivers/net/ethernet/qlogic/qede/qede_main.c:1247:2: note: uninitialized use occurs here
edev->cdev = NULL;
^~~~
drivers/net/ethernet/qlogic/qede/qede_main.c:1165:2: note: remove the 'if' if its condition is always false
if (rc)
^~~~~~~
drivers/net/ethernet/qlogic/qede/qede_main.c:1158:6: warning: variable 'edev' is used uninitialized whenever 'if' condition is true [-Wsometimes-uninitialized]
if (rc) {
^~
drivers/net/ethernet/qlogic/qede/qede_main.c:1247:2: note: uninitialized use occurs here
edev->cdev = NULL;
^~~~
drivers/net/ethernet/qlogic/qede/qede_main.c:1158:2: note: remove the 'if' if its condition is always false
if (rc) {
^~~~~~~~~
drivers/net/ethernet/qlogic/qede/qede_main.c:1128:23: note: initialize the variable 'edev' to silence this warning
struct qede_dev *edev;
^
= NULL
2 warnings generated.
vim +1165 drivers/net/ethernet/qlogic/qede/qede_main.c
2950219d87b040 Yuval Mintz 2015-10-26 1121
2950219d87b040 Yuval Mintz 2015-10-26 1122 static int __qede_probe(struct pci_dev *pdev, u32 dp_module, u8 dp_level,
1408cc1fa48c54 Yuval Mintz 2016-05-11 1123 bool is_vf, enum qede_probe_mode mode)
2950219d87b040 Yuval Mintz 2015-10-26 1124 {
1408cc1fa48c54 Yuval Mintz 2016-05-11 1125 struct qed_probe_params probe_params;
1a635e488ecf6f Yuval Mintz 2016-08-15 1126 struct qed_slowpath_params sp_params;
2950219d87b040 Yuval Mintz 2015-10-26 1127 struct qed_dev_eth_info dev_info;
2950219d87b040 Yuval Mintz 2015-10-26 1128 struct qede_dev *edev;
2950219d87b040 Yuval Mintz 2015-10-26 1129 struct qed_dev *cdev;
2950219d87b040 Yuval Mintz 2015-10-26 1130 int rc;
2950219d87b040 Yuval Mintz 2015-10-26 1131
2950219d87b040 Yuval Mintz 2015-10-26 1132 if (unlikely(dp_level & QED_LEVEL_INFO))
2950219d87b040 Yuval Mintz 2015-10-26 1133 pr_notice("Starting qede probe\n");
2950219d87b040 Yuval Mintz 2015-10-26 1134
1408cc1fa48c54 Yuval Mintz 2016-05-11 1135 memset(&probe_params, 0, sizeof(probe_params));
1408cc1fa48c54 Yuval Mintz 2016-05-11 1136 probe_params.protocol = QED_PROTOCOL_ETH;
1408cc1fa48c54 Yuval Mintz 2016-05-11 1137 probe_params.dp_module = dp_module;
1408cc1fa48c54 Yuval Mintz 2016-05-11 1138 probe_params.dp_level = dp_level;
1408cc1fa48c54 Yuval Mintz 2016-05-11 1139 probe_params.is_vf = is_vf;
ccc67ef50b9085 Tomer Tayar 2019-01-28 1140 probe_params.recov_in_prog = (mode == QEDE_PROBE_RECOVERY);
1408cc1fa48c54 Yuval Mintz 2016-05-11 1141 cdev = qed_ops->common->probe(pdev, &probe_params);
2950219d87b040 Yuval Mintz 2015-10-26 1142 if (!cdev) {
2950219d87b040 Yuval Mintz 2015-10-26 1143 rc = -ENODEV;
2950219d87b040 Yuval Mintz 2015-10-26 1144 goto err0;
2950219d87b040 Yuval Mintz 2015-10-26 1145 }
2950219d87b040 Yuval Mintz 2015-10-26 1146
2950219d87b040 Yuval Mintz 2015-10-26 1147 qede_update_pf_params(cdev);
2950219d87b040 Yuval Mintz 2015-10-26 1148
2950219d87b040 Yuval Mintz 2015-10-26 1149 /* Start the Slowpath-process */
1a635e488ecf6f Yuval Mintz 2016-08-15 1150 memset(&sp_params, 0, sizeof(sp_params));
1a635e488ecf6f Yuval Mintz 2016-08-15 1151 sp_params.int_mode = QED_INT_MODE_MSIX;
1a635e488ecf6f Yuval Mintz 2016-08-15 1152 sp_params.drv_major = QEDE_MAJOR_VERSION;
1a635e488ecf6f Yuval Mintz 2016-08-15 1153 sp_params.drv_minor = QEDE_MINOR_VERSION;
1a635e488ecf6f Yuval Mintz 2016-08-15 1154 sp_params.drv_rev = QEDE_REVISION_VERSION;
1a635e488ecf6f Yuval Mintz 2016-08-15 1155 sp_params.drv_eng = QEDE_ENGINEERING_VERSION;
1a635e488ecf6f Yuval Mintz 2016-08-15 1156 strlcpy(sp_params.name, "qede LAN", QED_DRV_VER_STR_SIZE);
1a635e488ecf6f Yuval Mintz 2016-08-15 1157 rc = qed_ops->common->slowpath_start(cdev, &sp_params);
2950219d87b040 Yuval Mintz 2015-10-26 1158 if (rc) {
2950219d87b040 Yuval Mintz 2015-10-26 1159 pr_notice("Cannot start slowpath\n");
2950219d87b040 Yuval Mintz 2015-10-26 1160 goto err1;
2950219d87b040 Yuval Mintz 2015-10-26 1161 }
2950219d87b040 Yuval Mintz 2015-10-26 1162
2950219d87b040 Yuval Mintz 2015-10-26 1163 /* Learn information crucial for qede to progress */
2950219d87b040 Yuval Mintz 2015-10-26 1164 rc = qed_ops->fill_dev_info(cdev, &dev_info);
2950219d87b040 Yuval Mintz 2015-10-26 @1165 if (rc)
2950219d87b040 Yuval Mintz 2015-10-26 1166 goto err2;
2950219d87b040 Yuval Mintz 2015-10-26 1167
ccc67ef50b9085 Tomer Tayar 2019-01-28 1168 if (mode != QEDE_PROBE_RECOVERY) {
2950219d87b040 Yuval Mintz 2015-10-26 1169 edev = qede_alloc_etherdev(cdev, pdev, &dev_info, dp_module,
2950219d87b040 Yuval Mintz 2015-10-26 1170 dp_level);
2950219d87b040 Yuval Mintz 2015-10-26 1171 if (!edev) {
2950219d87b040 Yuval Mintz 2015-10-26 1172 rc = -ENOMEM;
2950219d87b040 Yuval Mintz 2015-10-26 1173 goto err2;
2950219d87b040 Yuval Mintz 2015-10-26 1174 }
66f590e1507178 Igor Russkikh 2020-07-28 1175
66f590e1507178 Igor Russkikh 2020-07-28 1176 edev->devlink = qed_ops->common->devlink_register(cdev);
66f590e1507178 Igor Russkikh 2020-07-28 1177 if (IS_ERR(edev->devlink)) {
66f590e1507178 Igor Russkikh 2020-07-28 1178 DP_NOTICE(edev, "Cannot register devlink\n");
66f590e1507178 Igor Russkikh 2020-07-28 1179 edev->devlink = NULL;
66f590e1507178 Igor Russkikh 2020-07-28 1180 /* Go on, we can live without devlink */
66f590e1507178 Igor Russkikh 2020-07-28 1181 }
ccc67ef50b9085 Tomer Tayar 2019-01-28 1182 } else {
ccc67ef50b9085 Tomer Tayar 2019-01-28 1183 struct net_device *ndev = pci_get_drvdata(pdev);
ccc67ef50b9085 Tomer Tayar 2019-01-28 1184 edev = netdev_priv(ndev);
66f590e1507178 Igor Russkikh 2020-07-28 1185
66f590e1507178 Igor Russkikh 2020-07-28 1186 if (edev && edev->devlink) {
66f590e1507178 Igor Russkikh 2020-07-28 1187 struct qed_devlink *qdl = devlink_priv(edev->devlink);
66f590e1507178 Igor Russkikh 2020-07-28 1188
66f590e1507178 Igor Russkikh 2020-07-28 1189 qdl->cdev = cdev;
66f590e1507178 Igor Russkikh 2020-07-28 1190 }
ccc67ef50b9085 Tomer Tayar 2019-01-28 1191 edev->cdev = cdev;
ccc67ef50b9085 Tomer Tayar 2019-01-28 1192 memset(&edev->stats, 0, sizeof(edev->stats));
ccc67ef50b9085 Tomer Tayar 2019-01-28 1193 memcpy(&edev->dev_info, &dev_info, sizeof(dev_info));
ccc67ef50b9085 Tomer Tayar 2019-01-28 1194 }
2950219d87b040 Yuval Mintz 2015-10-26 1195
fefb0202cc5c12 Yuval Mintz 2016-05-11 1196 if (is_vf)
149d3775f108c9 Sudarsana Reddy Kalluru 2018-11-26 1197 set_bit(QEDE_FLAGS_IS_VF, &edev->flags);
fefb0202cc5c12 Yuval Mintz 2016-05-11 1198
2950219d87b040 Yuval Mintz 2015-10-26 1199 qede_init_ndev(edev);
2950219d87b040 Yuval Mintz 2015-10-26 1200
ccc67ef50b9085 Tomer Tayar 2019-01-28 1201 rc = qede_rdma_dev_add(edev, (mode == QEDE_PROBE_RECOVERY));
cee9fbd8e2e9e7 Ram Amrani 2016-10-01 1202 if (rc)
cee9fbd8e2e9e7 Ram Amrani 2016-10-01 1203 goto err3;
cee9fbd8e2e9e7 Ram Amrani 2016-10-01 1204
ccc67ef50b9085 Tomer Tayar 2019-01-28 1205 if (mode != QEDE_PROBE_RECOVERY) {
3f2176dd7fe9e4 Colin Ian King 2018-03-19 1206 /* Prepare the lock prior to the registration of the netdev,
0e0b80a9a7181c Mintz, Yuval 2017-02-20 1207 * as once it's registered we might reach flows requiring it
0e0b80a9a7181c Mintz, Yuval 2017-02-20 1208 * [it's even possible to reach a flow needing it directly
0e0b80a9a7181c Mintz, Yuval 2017-02-20 1209 * from there, although it's unlikely].
0e0b80a9a7181c Mintz, Yuval 2017-02-20 1210 */
0e0b80a9a7181c Mintz, Yuval 2017-02-20 1211 INIT_DELAYED_WORK(&edev->sp_task, qede_sp_task);
0e0b80a9a7181c Mintz, Yuval 2017-02-20 1212 mutex_init(&edev->qede_lock);
ccc67ef50b9085 Tomer Tayar 2019-01-28 1213
2950219d87b040 Yuval Mintz 2015-10-26 1214 rc = register_netdev(edev->ndev);
2950219d87b040 Yuval Mintz 2015-10-26 1215 if (rc) {
2950219d87b040 Yuval Mintz 2015-10-26 1216 DP_NOTICE(edev, "Cannot register net-device\n");
cee9fbd8e2e9e7 Ram Amrani 2016-10-01 1217 goto err4;
2950219d87b040 Yuval Mintz 2015-10-26 1218 }
ccc67ef50b9085 Tomer Tayar 2019-01-28 1219 }
2950219d87b040 Yuval Mintz 2015-10-26 1220
712c3cbf193fca Mintz, Yuval 2017-05-23 1221 edev->ops->common->set_name(cdev, edev->ndev->name);
2950219d87b040 Yuval Mintz 2015-10-26 1222
4c55215c05d252 Sudarsana Reddy Kalluru 2017-02-15 1223 /* PTP not supported on VFs */
035744975aecf9 sudarsana.kalluru@...ium.com 2017-04-26 1224 if (!is_vf)
1c85f394c2206e Alexander Lobakin 2020-06-23 1225 qede_ptp_enable(edev);
4c55215c05d252 Sudarsana Reddy Kalluru 2017-02-15 1226
a2ec6172d29cf3 Sudarsana Kalluru 2015-10-26 1227 edev->ops->register_ops(cdev, &qede_ll_ops, edev);
a2ec6172d29cf3 Sudarsana Kalluru 2015-10-26 1228
---
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" (35042 bytes)
Powered by blists - more mailing lists