[hare-scsi-devel:reserved-tags.v3 41/41] drivers/scsi/pm8001/pm8001_sas.c:1202:38: warning: 'tag' may be used uninitialized in this function
by kbuild test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/hare/scsi-devel.git reserved-tags.v3
head: 7e846b812c89291eaaf342f3a37944fefc17473b
commit: 7e846b812c89291eaaf342f3a37944fefc17473b [41/41] pm8001: use block-layer tags for ccb allocation
config: riscv-allyesconfig (attached as .config)
compiler: riscv64-linux-gcc (GCC) 9.3.0
reproduce:
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
git checkout 7e846b812c89291eaaf342f3a37944fefc17473b
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day GCC_VERSION=9.3.0 make.cross ARCH=riscv
If you fix the issue, kindly add following tag as appropriate
Reported-by: kbuild test robot <lkp(a)intel.com>
Note: it may well be a FALSE warning. FWIW you are at least aware of it now.
http://gcc.gnu.org/wiki/Better_Uninitialized_Warnings
All warnings (new ones prefixed by >>):
drivers/scsi/pm8001/pm8001_sas.c: In function 'pm8001_abort_task':
>> drivers/scsi/pm8001/pm8001_sas.c:1202:38: warning: 'tag' may be used uninitialized in this function [-Wmaybe-uninitialized]
1202 | tmf_task.tag_of_task_to_be_managed = tag;
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~
vim +/tag +1202 drivers/scsi/pm8001/pm8001_sas.c
dbf9bfe615717d jack wang 2009-10-14 1163
32877947b7a806 Weitao Hou 2019-05-20 1164 /* mandatory SAM-3, still need free task/ccb info, abort the specified task */
dbf9bfe615717d jack wang 2009-10-14 1165 int pm8001_abort_task(struct sas_task *task)
dbf9bfe615717d jack wang 2009-10-14 1166 {
dbf9bfe615717d jack wang 2009-10-14 1167 unsigned long flags;
1db49906d8fa87 Viswas G 2017-10-18 1168 u32 tag;
dbf9bfe615717d jack wang 2009-10-14 1169 struct domain_device *dev ;
1db49906d8fa87 Viswas G 2017-10-18 1170 struct pm8001_hba_info *pm8001_ha;
dbf9bfe615717d jack wang 2009-10-14 1171 struct scsi_lun lun;
dbf9bfe615717d jack wang 2009-10-14 1172 struct pm8001_device *pm8001_dev;
dbf9bfe615717d jack wang 2009-10-14 1173 struct pm8001_tmf_task tmf_task;
869ddbdcae3b4f Viswas G 2017-10-18 1174 int rc = TMF_RESP_FUNC_FAILED, ret;
869ddbdcae3b4f Viswas G 2017-10-18 1175 u32 phy_id;
869ddbdcae3b4f Viswas G 2017-10-18 1176 struct sas_task_slow slow_task;
dbf9bfe615717d jack wang 2009-10-14 1177 if (unlikely(!task || !task->lldd_task || !task->dev))
1db49906d8fa87 Viswas G 2017-10-18 1178 return TMF_RESP_FUNC_FAILED;
1db49906d8fa87 Viswas G 2017-10-18 1179 dev = task->dev;
1db49906d8fa87 Viswas G 2017-10-18 1180 pm8001_dev = dev->lldd_dev;
1db49906d8fa87 Viswas G 2017-10-18 1181 pm8001_ha = pm8001_find_ha_by_dev(dev);
869ddbdcae3b4f Viswas G 2017-10-18 1182 phy_id = pm8001_dev->attached_phy;
7e846b812c8929 Hannes Reinecke 2020-04-14 1183 if (task->tag == -1) {
1db49906d8fa87 Viswas G 2017-10-18 1184 pm8001_printk("no tag for task:%p\n", task);
1db49906d8fa87 Viswas G 2017-10-18 1185 return TMF_RESP_FUNC_FAILED;
1db49906d8fa87 Viswas G 2017-10-18 1186 }
dbf9bfe615717d jack wang 2009-10-14 1187 spin_lock_irqsave(&task->task_state_lock, flags);
dbf9bfe615717d jack wang 2009-10-14 1188 if (task->task_state_flags & SAS_TASK_STATE_DONE) {
dbf9bfe615717d jack wang 2009-10-14 1189 spin_unlock_irqrestore(&task->task_state_lock, flags);
1db49906d8fa87 Viswas G 2017-10-18 1190 return TMF_RESP_FUNC_COMPLETE;
dbf9bfe615717d jack wang 2009-10-14 1191 }
869ddbdcae3b4f Viswas G 2017-10-18 1192 task->task_state_flags |= SAS_TASK_STATE_ABORTED;
869ddbdcae3b4f Viswas G 2017-10-18 1193 if (task->slow_task == NULL) {
869ddbdcae3b4f Viswas G 2017-10-18 1194 init_completion(&slow_task.completion);
869ddbdcae3b4f Viswas G 2017-10-18 1195 task->slow_task = &slow_task;
dbf9bfe615717d jack wang 2009-10-14 1196 }
dbf9bfe615717d jack wang 2009-10-14 1197 spin_unlock_irqrestore(&task->task_state_lock, flags);
dbf9bfe615717d jack wang 2009-10-14 1198 if (task->task_proto & SAS_PROTOCOL_SSP) {
dbf9bfe615717d jack wang 2009-10-14 1199 struct scsi_cmnd *cmnd = task->uldd_task;
dbf9bfe615717d jack wang 2009-10-14 1200 int_to_scsilun(cmnd->device->lun, &lun);
dbf9bfe615717d jack wang 2009-10-14 1201 tmf_task.tmf = TMF_ABORT_TASK;
dbf9bfe615717d jack wang 2009-10-14 @1202 tmf_task.tag_of_task_to_be_managed = tag;
8f1d49faadc4e1 Hannes Reinecke 2020-04-29 1203 rc = pm8001_exec_internal_tmf_task(dev, lun.scsi_lun,
8f1d49faadc4e1 Hannes Reinecke 2020-04-29 1204 &tmf_task);
8f1d49faadc4e1 Hannes Reinecke 2020-04-29 1205 if (rc == TMF_RESP_FUNC_SUCC)
97ee20886cfd25 jack_wang 2009-11-05 1206 pm8001_exec_internal_task_abort(pm8001_ha, pm8001_dev,
7f3f003ba62f8d John Garry 2020-03-11 1207 lun.scsi_lun, 0, tag);
dbf9bfe615717d jack wang 2009-10-14 1208 } else if (task->task_proto & SAS_PROTOCOL_SATA ||
dbf9bfe615717d jack wang 2009-10-14 1209 task->task_proto & SAS_PROTOCOL_STP) {
7f3f003ba62f8d John Garry 2020-03-11 1210 memset(lun.scsi_lun, 0, sizeof(lun.scsi_lun));
869ddbdcae3b4f Viswas G 2017-10-18 1211 if (pm8001_ha->chip_id == chip_8006) {
869ddbdcae3b4f Viswas G 2017-10-18 1212 DECLARE_COMPLETION_ONSTACK(completion_reset);
869ddbdcae3b4f Viswas G 2017-10-18 1213 DECLARE_COMPLETION_ONSTACK(completion);
869ddbdcae3b4f Viswas G 2017-10-18 1214 struct pm8001_phy *phy = pm8001_ha->phy + phy_id;
869ddbdcae3b4f Viswas G 2017-10-18 1215
869ddbdcae3b4f Viswas G 2017-10-18 1216 /* 1. Set Device state as Recovery */
869ddbdcae3b4f Viswas G 2017-10-18 1217 pm8001_dev->setds_completion = &completion;
869ddbdcae3b4f Viswas G 2017-10-18 1218 PM8001_CHIP_DISP->set_dev_state_req(pm8001_ha,
869ddbdcae3b4f Viswas G 2017-10-18 1219 pm8001_dev, 0x03);
869ddbdcae3b4f Viswas G 2017-10-18 1220 wait_for_completion(&completion);
869ddbdcae3b4f Viswas G 2017-10-18 1221
869ddbdcae3b4f Viswas G 2017-10-18 1222 /* 2. Send Phy Control Hard Reset */
869ddbdcae3b4f Viswas G 2017-10-18 1223 reinit_completion(&completion);
51c1c5f6ed64c2 peter chang 2019-11-14 1224 phy->port_reset_status = PORT_RESET_TMO;
869ddbdcae3b4f Viswas G 2017-10-18 1225 phy->reset_success = false;
869ddbdcae3b4f Viswas G 2017-10-18 1226 phy->enable_completion = &completion;
869ddbdcae3b4f Viswas G 2017-10-18 1227 phy->reset_completion = &completion_reset;
869ddbdcae3b4f Viswas G 2017-10-18 1228 ret = PM8001_CHIP_DISP->phy_ctl_req(pm8001_ha, phy_id,
869ddbdcae3b4f Viswas G 2017-10-18 1229 PHY_HARD_RESET);
51c1c5f6ed64c2 peter chang 2019-11-14 1230 if (ret) {
51c1c5f6ed64c2 peter chang 2019-11-14 1231 phy->enable_completion = NULL;
51c1c5f6ed64c2 peter chang 2019-11-14 1232 phy->reset_completion = NULL;
869ddbdcae3b4f Viswas G 2017-10-18 1233 goto out;
51c1c5f6ed64c2 peter chang 2019-11-14 1234 }
51c1c5f6ed64c2 peter chang 2019-11-14 1235
51c1c5f6ed64c2 peter chang 2019-11-14 1236 /* In the case of the reset timeout/fail we still
51c1c5f6ed64c2 peter chang 2019-11-14 1237 * abort the command at the firmware. The assumption
51c1c5f6ed64c2 peter chang 2019-11-14 1238 * here is that the drive is off doing something so
51c1c5f6ed64c2 peter chang 2019-11-14 1239 * that it's not processing requests, and we want to
51c1c5f6ed64c2 peter chang 2019-11-14 1240 * avoid getting a completion for this and either
51c1c5f6ed64c2 peter chang 2019-11-14 1241 * leaking the task in libsas or losing the race and
51c1c5f6ed64c2 peter chang 2019-11-14 1242 * getting a double free.
51c1c5f6ed64c2 peter chang 2019-11-14 1243 */
869ddbdcae3b4f Viswas G 2017-10-18 1244 PM8001_MSG_DBG(pm8001_ha,
869ddbdcae3b4f Viswas G 2017-10-18 1245 pm8001_printk("Waiting for local phy ctl\n"));
51c1c5f6ed64c2 peter chang 2019-11-14 1246 ret = wait_for_completion_timeout(&completion,
51c1c5f6ed64c2 peter chang 2019-11-14 1247 PM8001_TASK_TIMEOUT * HZ);
51c1c5f6ed64c2 peter chang 2019-11-14 1248 if (!ret || !phy->reset_success) {
51c1c5f6ed64c2 peter chang 2019-11-14 1249 phy->enable_completion = NULL;
51c1c5f6ed64c2 peter chang 2019-11-14 1250 phy->reset_completion = NULL;
51c1c5f6ed64c2 peter chang 2019-11-14 1251 } else {
51c1c5f6ed64c2 peter chang 2019-11-14 1252 /* 3. Wait for Port Reset complete or
51c1c5f6ed64c2 peter chang 2019-11-14 1253 * Port reset TMO
51c1c5f6ed64c2 peter chang 2019-11-14 1254 */
869ddbdcae3b4f Viswas G 2017-10-18 1255 PM8001_MSG_DBG(pm8001_ha,
869ddbdcae3b4f Viswas G 2017-10-18 1256 pm8001_printk("Waiting for Port reset\n"));
51c1c5f6ed64c2 peter chang 2019-11-14 1257 ret = wait_for_completion_timeout(
51c1c5f6ed64c2 peter chang 2019-11-14 1258 &completion_reset,
51c1c5f6ed64c2 peter chang 2019-11-14 1259 PM8001_TASK_TIMEOUT * HZ);
51c1c5f6ed64c2 peter chang 2019-11-14 1260 if (!ret)
51c1c5f6ed64c2 peter chang 2019-11-14 1261 phy->reset_completion = NULL;
51c1c5f6ed64c2 peter chang 2019-11-14 1262 WARN_ON(phy->port_reset_status ==
51c1c5f6ed64c2 peter chang 2019-11-14 1263 PORT_RESET_TMO);
51c1c5f6ed64c2 peter chang 2019-11-14 1264 if (phy->port_reset_status == PORT_RESET_TMO) {
196ba6629cf95e Deepak Ukey 2019-07-09 1265 pm8001_dev_gone_notify(dev);
869ddbdcae3b4f Viswas G 2017-10-18 1266 goto out;
196ba6629cf95e Deepak Ukey 2019-07-09 1267 }
51c1c5f6ed64c2 peter chang 2019-11-14 1268 }
869ddbdcae3b4f Viswas G 2017-10-18 1269
869ddbdcae3b4f Viswas G 2017-10-18 1270 /*
869ddbdcae3b4f Viswas G 2017-10-18 1271 * 4. SATA Abort ALL
869ddbdcae3b4f Viswas G 2017-10-18 1272 * we wait for the task to be aborted so that the task
869ddbdcae3b4f Viswas G 2017-10-18 1273 * is removed from the ccb. on success the caller is
869ddbdcae3b4f Viswas G 2017-10-18 1274 * going to free the task.
869ddbdcae3b4f Viswas G 2017-10-18 1275 */
869ddbdcae3b4f Viswas G 2017-10-18 1276 ret = pm8001_exec_internal_task_abort(pm8001_ha,
7f3f003ba62f8d John Garry 2020-03-11 1277 pm8001_dev, lun.scsi_lun, 1, tag);
869ddbdcae3b4f Viswas G 2017-10-18 1278 if (ret)
869ddbdcae3b4f Viswas G 2017-10-18 1279 goto out;
869ddbdcae3b4f Viswas G 2017-10-18 1280 ret = wait_for_completion_timeout(
869ddbdcae3b4f Viswas G 2017-10-18 1281 &task->slow_task->completion,
869ddbdcae3b4f Viswas G 2017-10-18 1282 PM8001_TASK_TIMEOUT * HZ);
869ddbdcae3b4f Viswas G 2017-10-18 1283 if (!ret)
869ddbdcae3b4f Viswas G 2017-10-18 1284 goto out;
869ddbdcae3b4f Viswas G 2017-10-18 1285
869ddbdcae3b4f Viswas G 2017-10-18 1286 /* 5. Set Device State as Operational */
869ddbdcae3b4f Viswas G 2017-10-18 1287 reinit_completion(&completion);
869ddbdcae3b4f Viswas G 2017-10-18 1288 pm8001_dev->setds_completion = &completion;
869ddbdcae3b4f Viswas G 2017-10-18 1289 PM8001_CHIP_DISP->set_dev_state_req(pm8001_ha,
869ddbdcae3b4f Viswas G 2017-10-18 1290 pm8001_dev, 0x01);
869ddbdcae3b4f Viswas G 2017-10-18 1291 wait_for_completion(&completion);
869ddbdcae3b4f Viswas G 2017-10-18 1292 } else {
869ddbdcae3b4f Viswas G 2017-10-18 1293 rc = pm8001_exec_internal_task_abort(pm8001_ha,
7f3f003ba62f8d John Garry 2020-03-11 1294 pm8001_dev, lun.scsi_lun, 0, tag);
dbf9bfe615717d jack wang 2009-10-14 1295 }
869ddbdcae3b4f Viswas G 2017-10-18 1296 rc = TMF_RESP_FUNC_COMPLETE;
dbf9bfe615717d jack wang 2009-10-14 1297 } else if (task->task_proto & SAS_PROTOCOL_SMP) {
dbf9bfe615717d jack wang 2009-10-14 1298 /* SMP */
7f3f003ba62f8d John Garry 2020-03-11 1299
7f3f003ba62f8d John Garry 2020-03-11 1300 int_to_scsilun(0, &lun);
dbf9bfe615717d jack wang 2009-10-14 1301 rc = pm8001_exec_internal_task_abort(pm8001_ha, pm8001_dev,
7f3f003ba62f8d John Garry 2020-03-11 1302 lun.scsi_lun, 0, tag);
dbf9bfe615717d jack wang 2009-10-14 1303
dbf9bfe615717d jack wang 2009-10-14 1304 }
dbf9bfe615717d jack wang 2009-10-14 1305 out:
869ddbdcae3b4f Viswas G 2017-10-18 1306 spin_lock_irqsave(&task->task_state_lock, flags);
869ddbdcae3b4f Viswas G 2017-10-18 1307 if (task->slow_task == &slow_task)
869ddbdcae3b4f Viswas G 2017-10-18 1308 task->slow_task = NULL;
869ddbdcae3b4f Viswas G 2017-10-18 1309 spin_unlock_irqrestore(&task->task_state_lock, flags);
dbf9bfe615717d jack wang 2009-10-14 1310 if (rc != TMF_RESP_FUNC_COMPLETE)
dbf9bfe615717d jack wang 2009-10-14 1311 pm8001_printk("rc= %d\n", rc);
dbf9bfe615717d jack wang 2009-10-14 1312 return rc;
dbf9bfe615717d jack wang 2009-10-14 1313 }
dbf9bfe615717d jack wang 2009-10-14 1314
:::::: The code at line 1202 was first introduced by commit
:::::: dbf9bfe615717d1145f263c0049fe2328e6ed395 [SCSI] pm8001: add SAS/SATA HBA driver
:::::: TO: jack wang <jack_wang(a)usish.com>
:::::: CC: James Bottomley <James.Bottomley(a)suse.de>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
2 years
[xlnx:xlnx_rebase_v5.4 1138/1289] drivers/rtc/rtc-zynqmp.c:198: undefined reference to `__divdi3'
by kbuild test robot
tree: https://github.com/Xilinx/linux-xlnx xlnx_rebase_v5.4
head: a43f2284bfbb4d16bc7a16d7bed1ecf813d927e0
commit: a4704c54d84d1e391275ad6ac10ce0e7c9157505 [1138/1289] rtc: zynqmp: Add calibration set and get support
config: i386-randconfig-h003-20200501 (attached as .config)
compiler: gcc-7 (Ubuntu 7.5.0-6ubuntu2) 7.5.0
reproduce:
git checkout a4704c54d84d1e391275ad6ac10ce0e7c9157505
# save the attached .config to linux build tree
make ARCH=i386
If you fix the issue, kindly add following tag as appropriate
Reported-by: kbuild test robot <lkp(a)intel.com>
All errors (new ones prefixed by >>):
ld: drivers/rtc/rtc-zynqmp.o: in function `xlnx_rtc_read_offset':
>> drivers/rtc/rtc-zynqmp.c:198: undefined reference to `__divdi3'
ld: drivers/rtc/rtc-zynqmp.o: in function `xlnx_rtc_set_offset':
drivers/rtc/rtc-zynqmp.c:223: undefined reference to `__divdi3'
vim +198 drivers/rtc/rtc-zynqmp.c
192
193 static int xlnx_rtc_read_offset(struct device *dev, long *offset)
194 {
195 struct xlnx_rtc_dev *xrtcdev = dev_get_drvdata(dev);
196 long offset_val;
197 unsigned int reg;
> 198 unsigned int tick_mult = RTC_PPB / xrtcdev->calibval;
199
200 reg = readl(xrtcdev->reg_base + RTC_CALIB_RD);
201
202 /* Offset with seconds ticks */
203 offset_val = reg & RTC_TICK_MASK;
204 offset_val = offset_val - xrtcdev->calibval;
205 offset_val = offset_val * tick_mult;
206
207 /* Offset with fractional ticks */
208 if (reg & RTC_FR_EN)
209 offset_val += ((reg & RTC_FR_MASK) >> RTC_FR_DATSHIFT)
210 * (tick_mult / RTC_FR_MAX_TICKS);
211 *offset = offset_val;
212
213 return 0;
214 }
215
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
2 years
[cel:nfsd-5.8 4/31] fs/nfsd/./trace.h:470:1: sparse: sparse: incorrect type in assignment (different base types)
by kbuild test robot
tree: git://git.linux-nfs.org/projects/cel/cel-2.6.git nfsd-5.8
head: b3bd93d54a48dbb6feb5eb1d46027d8602cef06c
commit: 1c3c49f4833b0ededa26242246cedec54db84457 [4/31] NFSD: Add tracepoints to NFSD's duplicate reply cache
reproduce:
# apt-get install sparse
# sparse version: v0.6.1-191-gc51a0382-dirty
git checkout 1c3c49f4833b0ededa26242246cedec54db84457
make ARCH=x86_64 allmodconfig
make C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__'
If you fix the issue, kindly add following tag as appropriate
Reported-by: kbuild test robot <lkp(a)intel.com>
sparse warnings: (new ones prefixed by >>)
>> fs/nfsd/./trace.h:470:1: sparse: sparse: incorrect type in assignment (different base types) @@ expected unsigned int [usertype] cached @@ got restricted unsigned int [usertype] cached @@
>> fs/nfsd/./trace.h:470:1: sparse: expected unsigned int [usertype] cached
>> fs/nfsd/./trace.h:470:1: sparse: got restricted __wsum const [usertype] k_csum
>> fs/nfsd/./trace.h:470:1: sparse: sparse: incorrect type in assignment (different base types) @@ expected unsigned int [usertype] ingress @@ got restricted unsigned int [usertype] ingress @@
>> fs/nfsd/./trace.h:470:1: sparse: expected unsigned int [usertype] ingress
>> fs/nfsd/./trace.h:470:1: sparse: got restricted __wsum const [usertype] k_csum
>> fs/nfsd/./trace.h:470:1: sparse: sparse: incorrect type in assignment (different base types) @@ expected unsigned int [usertype] cached @@ got restricted unsigned int [usertype] cached @@
>> fs/nfsd/./trace.h:470:1: sparse: expected unsigned int [usertype] cached
>> fs/nfsd/./trace.h:470:1: sparse: got restricted __wsum const [usertype] k_csum
>> fs/nfsd/./trace.h:470:1: sparse: sparse: incorrect type in assignment (different base types) @@ expected unsigned int [usertype] ingress @@ got restricted unsigned int [usertype] ingress @@
>> fs/nfsd/./trace.h:470:1: sparse: expected unsigned int [usertype] ingress
>> fs/nfsd/./trace.h:470:1: sparse: got restricted __wsum const [usertype] k_csum
vim +470 fs/nfsd/./trace.h
469
> 470 TRACE_EVENT(nfsd_drc_mismatch,
471 TP_PROTO(
472 const struct nfsd_net *nn,
473 const struct svc_cacherep *key,
474 const struct svc_cacherep *rp
475 ),
476 TP_ARGS(nn, key, rp),
477 TP_STRUCT__entry(
478 __field(unsigned long long, boot_time)
479 __field(u32, xid)
480 __field(u32, cached)
481 __field(u32, ingress)
482 ),
483 TP_fast_assign(
484 __entry->boot_time = nn->boot_time;
485 __entry->xid = be32_to_cpu(key->c_key.k_xid);
486 __entry->cached = key->c_key.k_csum;
487 __entry->ingress = rp->c_key.k_csum;
488 ),
489 TP_printk("boot_time=%16llx xid=0x%08x cached-csum=0x%08x ingress-csum=0x%08x",
490 __entry->boot_time, __entry->xid, __entry->cached,
491 __entry->ingress)
492 );
493
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
2 years
[linux-next:master 6110/6218] ld.lld: error: section .data..page_aligned at 0xFFFFFFFF804E9000 of size 0x2000 exceeds available address space
by kbuild test robot
TO: Srinivas Kandagatla <srinivas.kandagatla(a)linaro.org>
tree: https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master
head: fb9d670f57e3f6478602328bbbf71138be06ca4f
commit: 16ae46daa10f7165f374c9ee522b937968cb8ce8 [6110/6218] Merge remote-tracking branch 'nvmem/for-next'
config: mips-pnx8335_stb225_defconfig (attached as .config)
compiler: clang version 11.0.0 (https://github.com/llvm/llvm-project 45b7d44ecb01780e26dc8d3c30bc34e32c08dd70)
reproduce:
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# install mips cross compiling tool for clang build
# apt-get install binutils-mips-linux-gnu
git checkout 16ae46daa10f7165f374c9ee522b937968cb8ce8
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=mips
If you fix the issue, kindly add following tag as appropriate
Reported-by: kbuild test robot <lkp(a)intel.com>
All errors (new ones prefixed by >>):
ld.lld: error: section .text at 0xFFFFFFFF80001000 of size 0x48B734 exceeds available address space
ld.lld: error: section __ex_table at 0xFFFFFFFF8048C740 of size 0x18F8 exceeds available address space
ld.lld: error: section __dbe_table at 0xFFFFFFFF8048E038 of size 0x0 exceeds available address space
ld.lld: error: section .rodata at 0xFFFFFFFF8048F000 of size 0x59980 exceeds available address space
>> ld.lld: error: section .data..page_aligned at 0xFFFFFFFF804E9000 of size 0x2000 exceeds available address space
>> ld.lld: error: section .got at 0xFFFFFFFF804EB000 of size 0x8 exceeds available address space
>> ld.lld: error: section .rodata1 at 0xFFFFFFFF804EB008 of size 0x0 exceeds available address space
>> ld.lld: error: section .pci_fixup at 0xFFFFFFFF804EB008 of size 0x0 exceeds available address space
>> ld.lld: error: section .builtin_fw at 0xFFFFFFFF804EB008 of size 0x0 exceeds available address space
ld.lld: error: section __ksymtab at 0xFFFFFFFF804EB008 of size 0x94F8 exceeds available address space
ld.lld: error: section __ksymtab_gpl at 0xFFFFFFFF804F4500 of size 0x70C8 exceeds available address space
ld.lld: error: section __ksymtab_unused at 0xFFFFFFFF804FB5C8 of size 0x0 exceeds available address space
ld.lld: error: section __ksymtab_unused_gpl at 0xFFFFFFFF804FB5C8 of size 0x0 exceeds available address space
ld.lld: error: section __ksymtab_gpl_future at 0xFFFFFFFF804FB5C8 of size 0x0 exceeds available address space
ld.lld: error: section __kcrctab at 0xFFFFFFFF804FB5C8 of size 0x0 exceeds available address space
ld.lld: error: section __kcrctab_gpl at 0xFFFFFFFF804FB5C8 of size 0x0 exceeds available address space
ld.lld: error: section __kcrctab_unused at 0xFFFFFFFF804FB5C8 of size 0x0 exceeds available address space
ld.lld: error: section __kcrctab_unused_gpl at 0xFFFFFFFF804FB5C8 of size 0x0 exceeds available address space
ld.lld: error: section __kcrctab_gpl_future at 0xFFFFFFFF804FB5C8 of size 0x0 exceeds available address space
ld.lld: error: section __ksymtab_strings at 0xFFFFFFFF804FB5C8 of size 0x192C2 exceeds available address space
ld.lld: error: too many errors emitted, stopping now (use -error-limit=0 to see all errors)
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
2 years
[xlnx:xlnx_rebase_v5.4 1277/1289] drivers/gpio/gpio-xilinx.c:68:25: error: field 'mmchip' has incomplete type
by kbuild test robot
tree: https://github.com/Xilinx/linux-xlnx xlnx_rebase_v5.4
head: a43f2284bfbb4d16bc7a16d7bed1ecf813d927e0
commit: af0c19b6f15388c554317280433100fd9f3d7d0a [1277/1289] gpio: xilinx: Use xilinx tested gpio driver
config: x86_64-randconfig-d003-20200430 (attached as .config)
compiler: gcc-7 (Ubuntu 7.5.0-6ubuntu2) 7.5.0
reproduce:
git checkout af0c19b6f15388c554317280433100fd9f3d7d0a
# save the attached .config to linux build tree
make ARCH=x86_64
If you fix the issue, kindly add following tag as appropriate
Reported-by: kbuild test robot <lkp(a)intel.com>
All errors (new ones prefixed by >>):
>> drivers/gpio/gpio-xilinx.c:68:25: error: field 'mmchip' has incomplete type
struct of_mm_gpio_chip mmchip;
^~~~~~
drivers/gpio/gpio-xilinx.c: In function 'xgpio_get':
>> drivers/gpio/gpio-xilinx.c:94:34: error: implicit declaration of function 'to_of_mm_gpio_chip' [-Werror=implicit-function-declaration]
struct of_mm_gpio_chip *mm_gc = to_of_mm_gpio_chip(gc);
^~~~~~~~~~~~~~~~~~
drivers/gpio/gpio-xilinx.c:94:34: warning: initialization makes pointer from integer without a cast [-Wint-conversion]
In file included from arch/x86/include/asm/bitops.h:16:0,
from include/linux/bitops.h:26,
from drivers/gpio/gpio-xilinx.c:15:
>> include/linux/kernel.h:994:32: error: dereferencing pointer to incomplete type 'struct of_mm_gpio_chip'
BUILD_BUG_ON_MSG(!__same_type(*(ptr), ((type *)0)->member) && \
^~~~~~
include/linux/compiler.h:330:9: note: in definition of macro '__compiletime_assert'
if (!(condition)) \
^~~~~~~~~
include/linux/compiler.h:350:2: note: in expansion of macro '_compiletime_assert'
_compiletime_assert(condition, msg, __compiletime_assert_, __LINE__)
^~~~~~~~~~~~~~~~~~~
include/linux/build_bug.h:39:37: note: in expansion of macro 'compiletime_assert'
#define BUILD_BUG_ON_MSG(cond, msg) compiletime_assert(!(cond), msg)
^~~~~~~~~~~~~~~~~~
include/linux/kernel.h:994:2: note: in expansion of macro 'BUILD_BUG_ON_MSG'
BUILD_BUG_ON_MSG(!__same_type(*(ptr), ((type *)0)->member) && \
^~~~~~~~~~~~~~~~
include/linux/kernel.h:994:20: note: in expansion of macro '__same_type'
BUILD_BUG_ON_MSG(!__same_type(*(ptr), ((type *)0)->member) && \
^~~~~~~~~~~
drivers/gpio/gpio-xilinx.c:96:6: note: in expansion of macro 'container_of'
container_of(mm_gc, struct xgpio_instance, mmchip);
^~~~~~~~~~~~
drivers/gpio/gpio-xilinx.c: In function 'xgpio_set':
drivers/gpio/gpio-xilinx.c:115:34: warning: initialization makes pointer from integer without a cast [-Wint-conversion]
struct of_mm_gpio_chip *mm_gc = to_of_mm_gpio_chip(gc);
^~~~~~~~~~~~~~~~~~
drivers/gpio/gpio-xilinx.c: In function 'xgpio_set_multiple':
drivers/gpio/gpio-xilinx.c:147:34: warning: initialization makes pointer from integer without a cast [-Wint-conversion]
struct of_mm_gpio_chip *mm_gc = to_of_mm_gpio_chip(gc);
^~~~~~~~~~~~~~~~~~
drivers/gpio/gpio-xilinx.c: In function 'xgpio_dir_in':
drivers/gpio/gpio-xilinx.c:187:34: warning: initialization makes pointer from integer without a cast [-Wint-conversion]
struct of_mm_gpio_chip *mm_gc = to_of_mm_gpio_chip(gc);
^~~~~~~~~~~~~~~~~~
drivers/gpio/gpio-xilinx.c: In function 'xgpio_dir_out':
drivers/gpio/gpio-xilinx.c:218:34: warning: initialization makes pointer from integer without a cast [-Wint-conversion]
struct of_mm_gpio_chip *mm_gc = to_of_mm_gpio_chip(gc);
^~~~~~~~~~~~~~~~~~
drivers/gpio/gpio-xilinx.c: In function 'xgpio_xlate':
drivers/gpio/gpio-xilinx.c:274:34: warning: initialization makes pointer from integer without a cast [-Wint-conversion]
struct of_mm_gpio_chip *mm_gc = to_of_mm_gpio_chip(gc);
^~~~~~~~~~~~~~~~~~
>> drivers/gpio/gpio-xilinx.c:277:8: error: 'struct gpio_chip' has no member named 'of_gpio_n_cells'
if (gc->of_gpio_n_cells == 3 && flags)
^~
drivers/gpio/gpio-xilinx.c: In function 'xgpio_irq_mask':
drivers/gpio/gpio-xilinx.c:315:12: warning: large integer implicitly truncated to unsigned type [-Woverflow]
~XGPIO_GIER_IE);
^
drivers/gpio/gpio-xilinx.c:50:51: note: in definition of macro 'xgpio_writereg'
# define xgpio_writereg(offset, val) __raw_writel(val, offset)
^~~
drivers/gpio/gpio-xilinx.c: In function 'xgpio_to_irq':
drivers/gpio/gpio-xilinx.c:392:34: warning: initialization makes pointer from integer without a cast [-Wint-conversion]
struct of_mm_gpio_chip *mm_gc = to_of_mm_gpio_chip(gc);
^~~~~~~~~~~~~~~~~~
drivers/gpio/gpio-xilinx.c: In function 'xgpio_remove':
>> drivers/gpio/gpio-xilinx.c:576:2: error: implicit declaration of function 'of_mm_gpiochip_remove'; did you mean 'gpiochip_remove'? [-Werror=implicit-function-declaration]
of_mm_gpiochip_remove(&chip->mmchip);
^~~~~~~~~~~~~~~~~~~~~
gpiochip_remove
drivers/gpio/gpio-xilinx.c: In function 'xgpio_of_probe':
>> drivers/gpio/gpio-xilinx.c:676:11: error: implicit declaration of function 'of_mm_gpiochip_add'; did you mean 'gpiochip_add'? [-Werror=implicit-function-declaration]
status = of_mm_gpiochip_add(np, &chip->mmchip);
^~~~~~~~~~~~~~~~~~
gpiochip_add
cc1: some warnings being treated as errors
vim +/mmchip +68 drivers/gpio/gpio-xilinx.c
52
53 /**
54 * struct xgpio_instance - Stores information about GPIO device
55 * @mmchip: OF GPIO chip for memory mapped banks
56 * @mmchip_dual: Pointer to the OF dual gpio chip
57 * @gpio_state: GPIO state shadow register
58 * @gpio_dir: GPIO direction shadow register
59 * @offset: GPIO channel offset
60 * @irq_base: GPIO channel irq base address
61 * @irq_enable: GPIO irq enable/disable bitfield
62 * @no_init: No intitialisation at probe
63 * @gpio_lock: Lock used for synchronization
64 * @irq_domain: irq_domain of the controller
65 * @clk: clock resource for this driver
66 */
67 struct xgpio_instance {
> 68 struct of_mm_gpio_chip mmchip;
69 struct of_mm_gpio_chip *mmchip_dual;
70 u32 gpio_state;
71 u32 gpio_dir;
72 u32 offset;
73 int irq_base;
74 u32 irq_enable;
75 bool no_init;
76 spinlock_t gpio_lock;
77 struct irq_domain *irq_domain;
78 struct clk *clk;
79 };
80
81 /**
82 * xgpio_get - Read the specified signal of the GPIO device.
83 * @gc: Pointer to gpio_chip device structure.
84 * @gpio: GPIO signal number.
85 *
86 * This function reads the specified signal of the GPIO device.
87 *
88 * Return:
89 * 0 if direction of GPIO signals is set as input otherwise it
90 * returns negative error value.
91 */
92 static int xgpio_get(struct gpio_chip *gc, unsigned int gpio)
93 {
> 94 struct of_mm_gpio_chip *mm_gc = to_of_mm_gpio_chip(gc);
95 struct xgpio_instance *chip =
96 container_of(mm_gc, struct xgpio_instance, mmchip);
97
98 void __iomem *regs = mm_gc->regs + chip->offset;
99
100 return !!(xgpio_readreg(regs + XGPIO_DATA_OFFSET) & BIT(gpio));
101 }
102
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
2 years
[linux-review:UPDATE-20200501-062226/Chris-Wilson/drm-i915-Implement-vm_ops-access-for-gdb-access-into-mmaps/20200501-055751 1/1] include/linux/err.h:22:49: error: cast to pointer from integer of different size
by kbuild test robot
tree: https://github.com/0day-ci/linux/commits/UPDATE-20200501-062226/Chris-Wil...
head: 47428c83167420277969fe842f2115d88e4ce4a5
commit: 47428c83167420277969fe842f2115d88e4ce4a5 [1/1] drm/i915: Implement vm_ops->access for gdb access into mmaps
config: i386-randconfig-f003-20200430 (attached as .config)
compiler: gcc-7 (Ubuntu 7.5.0-6ubuntu2) 7.5.0
reproduce:
git checkout 47428c83167420277969fe842f2115d88e4ce4a5
# save the attached .config to linux build tree
make ARCH=i386
If you fix the issue, kindly add following tag as appropriate
Reported-by: kbuild test robot <lkp(a)intel.com>
All errors (new ones prefixed by >>):
In file included from include/asm-generic/bug.h:5:0,
from arch/x86/include/asm/bug.h:83,
from include/linux/bug.h:5,
from include/linux/mmdebug.h:5,
from include/linux/mm.h:9,
from include/linux/mman.h:5,
from drivers/gpu/drm/i915/gem/i915_gem_mman.c:8:
drivers/gpu/drm/i915/gem/selftests/i915_gem_mman.c: In function '__igt_mmap_access':
>> include/linux/err.h:22:49: error: cast to pointer from integer of different size [-Werror=int-to-pointer-cast]
#define IS_ERR_VALUE(x) unlikely((unsigned long)(void *)(x) >= (unsigned long)-MAX_ERRNO)
^
include/linux/compiler.h:78:42: note: in definition of macro 'unlikely'
# define unlikely(x) __builtin_expect(!!(x), 0)
^
drivers/gpu/drm/i915/gem/selftests/i915_gem_mman.c:996:6: note: in expansion of macro 'IS_ERR_VALUE'
if (IS_ERR_VALUE(addr))
^~~~~~~~~~~~
cc1: all warnings being treated as errors
vim +22 include/linux/err.h
ebba5f9fcb8823 Randy Dunlap 2006-09-27 21
aa00edc1287a69 Linus Torvalds 2016-05-27 @22 #define IS_ERR_VALUE(x) unlikely((unsigned long)(void *)(x) >= (unsigned long)-MAX_ERRNO)
07ab67c8d0d7c1 Linus Torvalds 2005-05-19 23
:::::: The code at line 22 was first introduced by commit
:::::: aa00edc1287a693eadc7bc67a3d73555d969b35d make IS_ERR_VALUE() complain about non-pointer-sized arguments
:::::: TO: Linus Torvalds <torvalds(a)linux-foundation.org>
:::::: CC: Linus Torvalds <torvalds(a)linux-foundation.org>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
2 years
Re: [PATCH v1 2/7] SUNRPC: Move xpt_mutex into socket xpo_sendto methods
by kbuild test robot
Hi Chuck,
I love your patch! Perhaps something to improve:
[auto build test WARNING on v5.7-rc3]
[also build test WARNING on next-20200501]
[cannot apply to nfs/linux-next nfsd/nfsd-next tip/perf/core]
[if your patch is applied to the wrong git tree, please drop us a note to help
improve the system. BTW, we also suggest to use '--base' option to specify the
base tree in git format-patch, please see https://stackoverflow.com/a/37406982]
url: https://github.com/0day-ci/linux/commits/Chuck-Lever/RPC-server-tracepoin...
base: 6a8b55ed4056ea5559ebe4f6a4b247f627870d4c
config: x86_64-randconfig-b002-20200502 (attached as .config)
compiler: clang version 11.0.0 (https://github.com/llvm/llvm-project 30ddd4ce19316fd2a8a50c5bc511433c87ecb95c)
reproduce:
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: kbuild test robot <lkp(a)intel.com>
All warnings (new ones prefixed by >>):
>> net/sunrpc/xprtrdma/svc_rdma_sendto.c:871:6: warning: variable 'ret' is used uninitialized whenever 'if' condition is true [-Wsometimes-uninitialized]
if (svc_xprt_is_dead(xprt))
^~~~~~~~~~~~~~~~~~~~~~
net/sunrpc/xprtrdma/svc_rdma_sendto.c:940:35: note: uninitialized use occurs here
trace_svcrdma_send_failed(rqstp, ret);
^~~
net/sunrpc/xprtrdma/svc_rdma_sendto.c:871:2: note: remove the 'if' if its condition is always false
if (svc_xprt_is_dead(xprt))
^~~~~~~~~~~~~~~~~~~~~~~~~~~
net/sunrpc/xprtrdma/svc_rdma_sendto.c:869:9: note: initialize the variable 'ret' to silence this warning
int ret;
^
= 0
1 warning generated.
vim +871 net/sunrpc/xprtrdma/svc_rdma_sendto.c
844
845 /**
846 * svc_rdma_sendto - Transmit an RPC reply
847 * @rqstp: processed RPC request, reply XDR already in ::rq_res
848 *
849 * Any resources still associated with @rqstp are released upon return.
850 * If no reply message was possible, the connection is closed.
851 *
852 * Returns:
853 * %0 if an RPC reply has been successfully posted,
854 * %-ENOMEM if a resource shortage occurred (connection is lost),
855 * %-ENOTCONN if posting failed (connection is lost).
856 */
857 int svc_rdma_sendto(struct svc_rqst *rqstp)
858 {
859 struct svc_xprt *xprt = rqstp->rq_xprt;
860 struct svcxprt_rdma *rdma =
861 container_of(xprt, struct svcxprt_rdma, sc_xprt);
862 struct svc_rdma_recv_ctxt *rctxt = rqstp->rq_xprt_ctxt;
863 __be32 *rdma_argp = rctxt->rc_recv_buf;
864 __be32 *wr_lst = rctxt->rc_write_list;
865 __be32 *rp_ch = rctxt->rc_reply_chunk;
866 struct xdr_buf *xdr = &rqstp->rq_res;
867 struct svc_rdma_send_ctxt *sctxt;
868 __be32 *p;
869 int ret;
870
> 871 if (svc_xprt_is_dead(xprt))
872 goto err0;
873
874 ret = -ENOMEM;
875 sctxt = svc_rdma_send_ctxt_get(rdma);
876 if (!sctxt)
877 goto err0;
878
879 p = xdr_reserve_space(&sctxt->sc_stream,
880 rpcrdma_fixed_maxsz * sizeof(*p));
881 if (!p)
882 goto err0;
883 *p++ = *rdma_argp;
884 *p++ = *(rdma_argp + 1);
885 *p++ = rdma->sc_fc_credits;
886 *p = rp_ch ? rdma_nomsg : rdma_msg;
887
888 if (svc_rdma_encode_read_list(sctxt) < 0)
889 goto err0;
890 if (wr_lst) {
891 /* XXX: Presume the client sent only one Write chunk */
892 unsigned long offset;
893 unsigned int length;
894
895 if (rctxt->rc_read_payload_length) {
896 offset = rctxt->rc_read_payload_offset;
897 length = rctxt->rc_read_payload_length;
898 } else {
899 offset = xdr->head[0].iov_len;
900 length = xdr->page_len;
901 }
902 ret = svc_rdma_send_write_chunk(rdma, wr_lst, xdr, offset,
903 length);
904 if (ret < 0)
905 goto err2;
906 if (svc_rdma_encode_write_list(rctxt, sctxt, length) < 0)
907 goto err0;
908 } else {
909 if (xdr_stream_encode_item_absent(&sctxt->sc_stream) < 0)
910 goto err0;
911 }
912 if (rp_ch) {
913 ret = svc_rdma_send_reply_chunk(rdma, rctxt, &rqstp->rq_res);
914 if (ret < 0)
915 goto err2;
916 if (svc_rdma_encode_reply_chunk(rctxt, sctxt, ret) < 0)
917 goto err0;
918 } else {
919 if (xdr_stream_encode_item_absent(&sctxt->sc_stream) < 0)
920 goto err0;
921 }
922
923 ret = svc_rdma_send_reply_msg(rdma, sctxt, rctxt, rqstp);
924 if (ret < 0)
925 goto err1;
926 return 0;
927
928 err2:
929 if (ret != -E2BIG && ret != -EINVAL)
930 goto err1;
931
932 ret = svc_rdma_send_error_msg(rdma, sctxt, rqstp);
933 if (ret < 0)
934 goto err1;
935 return 0;
936
937 err1:
938 svc_rdma_send_ctxt_put(rdma, sctxt);
939 err0:
940 trace_svcrdma_send_failed(rqstp, ret);
941 set_bit(XPT_CLOSE, &xprt->xpt_flags);
942 return -ENOTCONN;
943 }
944
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
2 years
[nbd168-wireless:mt76 92/96] drivers/net/wireless/mediatek/mt76/mt7615/mcu.c:2169:22: error: 'struct wiphy' has no member named 'wowlan'
by kbuild test robot
tree: https://github.com/nbd168/wireless mt76
head: f47fbfa68f8cab16348119006d07a8229d190eea
commit: 56988b2419aecc55b5f0c1811297d7c8ad32cbd4 [92/96] mt76: mt7615: add WoW support
config: c6x-allyesconfig (attached as .config)
compiler: c6x-elf-gcc (GCC) 9.3.0
reproduce:
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
git checkout 56988b2419aecc55b5f0c1811297d7c8ad32cbd4
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day GCC_VERSION=9.3.0 make.cross ARCH=c6x
If you fix the issue, kindly add following tag as appropriate
Reported-by: kbuild test robot <lkp(a)intel.com>
All errors (new ones prefixed by >>):
drivers/net/wireless/mediatek/mt76/mt7615/mcu.c: In function '__mt7663_load_firmware':
>> drivers/net/wireless/mediatek/mt76/mt7615/mcu.c:2169:22: error: 'struct wiphy' has no member named 'wowlan'
2169 | dev->mt76.hw->wiphy->wowlan = &mt7615_wowlan_support;
| ^~
drivers/net/wireless/mediatek/mt76/mt7615/mcu.c: In function 'mt7615_mcu_set_suspend_iter':
>> drivers/net/wireless/mediatek/mt76/mt7615/mcu.c:3377:44: error: 'struct wiphy' has no member named 'wowlan_config'
3377 | struct cfg80211_wowlan *wowlan = hw->wiphy->wowlan_config;
| ^~
vim +2169 drivers/net/wireless/mediatek/mt76/mt7615/mcu.c
2140
2141 int __mt7663_load_firmware(struct mt7615_dev *dev)
2142 {
2143 const char *n9_firmware;
2144 int ret;
2145
2146 ret = mt76_get_field(dev, MT_CONN_ON_MISC, MT_TOP_MISC2_FW_N9_RDY);
2147 if (ret) {
2148 dev_dbg(dev->mt76.dev, "Firmware is already download\n");
2149 return -EIO;
2150 }
2151
2152 ret = mt7663_load_rom_patch(dev, &n9_firmware);
2153 if (ret)
2154 return ret;
2155
2156 ret = mt7663_load_n9(dev, n9_firmware);
2157 if (ret)
2158 return ret;
2159
2160 if (!mt76_poll_msec(dev, MT_CONN_ON_MISC, MT_TOP_MISC2_FW_N9_RDY,
2161 MT_TOP_MISC2_FW_N9_RDY, 1500)) {
2162 ret = mt76_get_field(dev, MT_CONN_ON_MISC,
2163 MT7663_TOP_MISC2_FW_STATE);
2164 dev_err(dev->mt76.dev, "Timeout for initializing firmware\n");
2165 return -EIO;
2166 }
2167
2168 if (IS_ENABLED(CONFIG_PM) && mt7615_firmware_offload(dev))
> 2169 dev->mt76.hw->wiphy->wowlan = &mt7615_wowlan_support;
2170
2171 dev_dbg(dev->mt76.dev, "Firmware init done\n");
2172
2173 return 0;
2174 }
2175 EXPORT_SYMBOL_GPL(__mt7663_load_firmware);
2176
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
2 years
[linux-next:master 3155/6218] arch/x86/kvm/vmx/nested.c:5246:3: warning: variable 'roots_to_free' is used uninitialized whenever 'if' condition is false
by kbuild test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master
head: fb9d670f57e3f6478602328bbbf71138be06ca4f
commit: ce8fe7b77bd8ee405295e349c82d0ef8c9788200 [3155/6218] KVM: nVMX: Free only the affected contexts when emulating INVEPT
config: x86_64-randconfig-e002-20200502 (attached as .config)
compiler: clang version 11.0.0 (https://github.com/llvm/llvm-project 30ddd4ce19316fd2a8a50c5bc511433c87ecb95c)
reproduce:
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
git checkout ce8fe7b77bd8ee405295e349c82d0ef8c9788200
# 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: kbuild test robot <lkp(a)intel.com>
All warnings (new ones prefixed by >>):
>> arch/x86/kvm/vmx/nested.c:5246:3: warning: variable 'roots_to_free' is used uninitialized whenever 'if' condition is false [-Wsometimes-uninitialized]
BUG_ON(1);
^~~~~~~~~
include/asm-generic/bug.h:62:36: note: expanded from macro 'BUG_ON'
#define BUG_ON(condition) do { if (unlikely(condition)) BUG(); } while (0)
^~~~~~~~~~~~~~~~~~~
include/linux/compiler.h:48:23: note: expanded from macro 'unlikely'
# define unlikely(x) (__branch_check__(x, 0, __builtin_constant_p(x)))
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
arch/x86/kvm/vmx/nested.c:5250:6: note: uninitialized use occurs here
if (roots_to_free)
^~~~~~~~~~~~~
arch/x86/kvm/vmx/nested.c:5246:3: note: remove the 'if' if its condition is always true
BUG_ON(1);
^
include/asm-generic/bug.h:62:32: note: expanded from macro 'BUG_ON'
#define BUG_ON(condition) do { if (unlikely(condition)) BUG(); } while (0)
^
arch/x86/kvm/vmx/nested.c:5179:35: note: initialize the variable 'roots_to_free' to silence this warning
unsigned long type, roots_to_free;
^
= 0
1 warning generated.
vim +5246 arch/x86/kvm/vmx/nested.c
ce8fe7b77bd8ee Sean Christopherson 2020-03-20 5173
55d2375e58a61b Sean Christopherson 2018-12-03 5174 /* Emulate the INVEPT instruction */
55d2375e58a61b Sean Christopherson 2018-12-03 5175 static int handle_invept(struct kvm_vcpu *vcpu)
55d2375e58a61b Sean Christopherson 2018-12-03 5176 {
55d2375e58a61b Sean Christopherson 2018-12-03 5177 struct vcpu_vmx *vmx = to_vmx(vcpu);
55d2375e58a61b Sean Christopherson 2018-12-03 5178 u32 vmx_instruction_info, types;
ce8fe7b77bd8ee Sean Christopherson 2020-03-20 5179 unsigned long type, roots_to_free;
ce8fe7b77bd8ee Sean Christopherson 2020-03-20 5180 struct kvm_mmu *mmu;
55d2375e58a61b Sean Christopherson 2018-12-03 5181 gva_t gva;
55d2375e58a61b Sean Christopherson 2018-12-03 5182 struct x86_exception e;
55d2375e58a61b Sean Christopherson 2018-12-03 5183 struct {
55d2375e58a61b Sean Christopherson 2018-12-03 5184 u64 eptp, gpa;
55d2375e58a61b Sean Christopherson 2018-12-03 5185 } operand;
ce8fe7b77bd8ee Sean Christopherson 2020-03-20 5186 int i;
55d2375e58a61b Sean Christopherson 2018-12-03 5187
55d2375e58a61b Sean Christopherson 2018-12-03 5188 if (!(vmx->nested.msrs.secondary_ctls_high &
55d2375e58a61b Sean Christopherson 2018-12-03 5189 SECONDARY_EXEC_ENABLE_EPT) ||
55d2375e58a61b Sean Christopherson 2018-12-03 5190 !(vmx->nested.msrs.ept_caps & VMX_EPT_INVEPT_BIT)) {
55d2375e58a61b Sean Christopherson 2018-12-03 5191 kvm_queue_exception(vcpu, UD_VECTOR);
55d2375e58a61b Sean Christopherson 2018-12-03 5192 return 1;
55d2375e58a61b Sean Christopherson 2018-12-03 5193 }
55d2375e58a61b Sean Christopherson 2018-12-03 5194
55d2375e58a61b Sean Christopherson 2018-12-03 5195 if (!nested_vmx_check_permission(vcpu))
55d2375e58a61b Sean Christopherson 2018-12-03 5196 return 1;
55d2375e58a61b Sean Christopherson 2018-12-03 5197
55d2375e58a61b Sean Christopherson 2018-12-03 5198 vmx_instruction_info = vmcs_read32(VMX_INSTRUCTION_INFO);
55d2375e58a61b Sean Christopherson 2018-12-03 5199 type = kvm_register_readl(vcpu, (vmx_instruction_info >> 28) & 0xf);
55d2375e58a61b Sean Christopherson 2018-12-03 5200
55d2375e58a61b Sean Christopherson 2018-12-03 5201 types = (vmx->nested.msrs.ept_caps >> VMX_EPT_EXTENT_SHIFT) & 6;
55d2375e58a61b Sean Christopherson 2018-12-03 5202
55d2375e58a61b Sean Christopherson 2018-12-03 5203 if (type >= 32 || !(types & (1 << type)))
55d2375e58a61b Sean Christopherson 2018-12-03 5204 return nested_vmx_failValid(vcpu,
55d2375e58a61b Sean Christopherson 2018-12-03 5205 VMXERR_INVALID_OPERAND_TO_INVEPT_INVVPID);
55d2375e58a61b Sean Christopherson 2018-12-03 5206
55d2375e58a61b Sean Christopherson 2018-12-03 5207 /* According to the Intel VMX instruction reference, the memory
55d2375e58a61b Sean Christopherson 2018-12-03 5208 * operand is read even if it isn't needed (e.g., for type==global)
55d2375e58a61b Sean Christopherson 2018-12-03 5209 */
55d2375e58a61b Sean Christopherson 2018-12-03 5210 if (get_vmx_mem_address(vcpu, vmcs_readl(EXIT_QUALIFICATION),
fdb28619a8f033 Eugene Korenevsky 2019-06-06 5211 vmx_instruction_info, false, sizeof(operand), &gva))
55d2375e58a61b Sean Christopherson 2018-12-03 5212 return 1;
55d2375e58a61b Sean Christopherson 2018-12-03 5213 if (kvm_read_guest_virt(vcpu, gva, &operand, sizeof(operand), &e)) {
ee1fa209f5e5ca Junaid Shahid 2020-03-20 5214 kvm_inject_emulated_page_fault(vcpu, &e);
55d2375e58a61b Sean Christopherson 2018-12-03 5215 return 1;
55d2375e58a61b Sean Christopherson 2018-12-03 5216 }
55d2375e58a61b Sean Christopherson 2018-12-03 5217
ce8fe7b77bd8ee Sean Christopherson 2020-03-20 5218 /*
ce8fe7b77bd8ee Sean Christopherson 2020-03-20 5219 * Nested EPT roots are always held through guest_mmu,
ce8fe7b77bd8ee Sean Christopherson 2020-03-20 5220 * not root_mmu.
ce8fe7b77bd8ee Sean Christopherson 2020-03-20 5221 */
ce8fe7b77bd8ee Sean Christopherson 2020-03-20 5222 mmu = &vcpu->arch.guest_mmu;
ce8fe7b77bd8ee Sean Christopherson 2020-03-20 5223
55d2375e58a61b Sean Christopherson 2018-12-03 5224 switch (type) {
b119019847fbca Jim Mattson 2019-06-13 5225 case VMX_EPT_EXTENT_CONTEXT:
eed0030e4caa94 Sean Christopherson 2020-03-20 5226 if (!nested_vmx_check_eptp(vcpu, operand.eptp))
eed0030e4caa94 Sean Christopherson 2020-03-20 5227 return nested_vmx_failValid(vcpu,
eed0030e4caa94 Sean Christopherson 2020-03-20 5228 VMXERR_INVALID_OPERAND_TO_INVEPT_INVVPID);
f8aa7e3958bc43 Sean Christopherson 2020-03-20 5229
ce8fe7b77bd8ee Sean Christopherson 2020-03-20 5230 roots_to_free = 0;
ce8fe7b77bd8ee Sean Christopherson 2020-03-20 5231 if (nested_ept_root_matches(mmu->root_hpa, mmu->root_cr3,
ce8fe7b77bd8ee Sean Christopherson 2020-03-20 5232 operand.eptp))
ce8fe7b77bd8ee Sean Christopherson 2020-03-20 5233 roots_to_free |= KVM_MMU_ROOT_CURRENT;
ce8fe7b77bd8ee Sean Christopherson 2020-03-20 5234
ce8fe7b77bd8ee Sean Christopherson 2020-03-20 5235 for (i = 0; i < KVM_MMU_NUM_PREV_ROOTS; i++) {
ce8fe7b77bd8ee Sean Christopherson 2020-03-20 5236 if (nested_ept_root_matches(mmu->prev_roots[i].hpa,
ce8fe7b77bd8ee Sean Christopherson 2020-03-20 5237 mmu->prev_roots[i].cr3,
ce8fe7b77bd8ee Sean Christopherson 2020-03-20 5238 operand.eptp))
ce8fe7b77bd8ee Sean Christopherson 2020-03-20 5239 roots_to_free |= KVM_MMU_ROOT_PREVIOUS(i);
ce8fe7b77bd8ee Sean Christopherson 2020-03-20 5240 }
ce8fe7b77bd8ee Sean Christopherson 2020-03-20 5241 break;
eed0030e4caa94 Sean Christopherson 2020-03-20 5242 case VMX_EPT_EXTENT_GLOBAL:
ce8fe7b77bd8ee Sean Christopherson 2020-03-20 5243 roots_to_free = KVM_MMU_ROOTS_ALL;
55d2375e58a61b Sean Christopherson 2018-12-03 5244 break;
55d2375e58a61b Sean Christopherson 2018-12-03 5245 default:
55d2375e58a61b Sean Christopherson 2018-12-03 @5246 BUG_ON(1);
55d2375e58a61b Sean Christopherson 2018-12-03 5247 break;
55d2375e58a61b Sean Christopherson 2018-12-03 5248 }
55d2375e58a61b Sean Christopherson 2018-12-03 5249
ce8fe7b77bd8ee Sean Christopherson 2020-03-20 5250 if (roots_to_free)
ce8fe7b77bd8ee Sean Christopherson 2020-03-20 5251 kvm_mmu_free_roots(vcpu, mmu, roots_to_free);
ce8fe7b77bd8ee Sean Christopherson 2020-03-20 5252
55d2375e58a61b Sean Christopherson 2018-12-03 5253 return nested_vmx_succeed(vcpu);
55d2375e58a61b Sean Christopherson 2018-12-03 5254 }
55d2375e58a61b Sean Christopherson 2018-12-03 5255
:::::: The code at line 5246 was first introduced by commit
:::::: 55d2375e58a61be072431dd3d3c8a320f4a4a01b KVM: nVMX: Move nested code to dedicated files
:::::: TO: Sean Christopherson <sean.j.christopherson(a)intel.com>
:::::: CC: Paolo Bonzini <pbonzini(a)redhat.com>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
2 years