Re: [PATCH V3 5/9] pm80xx : cleanup in pm8001_abort_task function.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Viswas,

[auto build test WARNING on mkp-scsi/for-next]
[also build test WARNING on v4.14-rc1 next-20170920]
[if your patch is applied to the wrong git tree, please drop us a note to help improve the system]

url:    https://github.com/0day-ci/linux/commits/Viswas-G/pm80xx-updates/20170920-202506
base:   https://git.kernel.org/pub/scm/linux/kernel/git/mkp/scsi.git for-next
config: x86_64-randconfig-a0-09202136 (attached as .config)
compiler: gcc-4.4 (Debian 4.4.7-8) 4.4.7
reproduce:
        # save the attached .config to linux build tree
        make ARCH=x86_64 

All warnings (new ones prefixed by >>):

   drivers/scsi/pm8001/pm8001_sas.c: In function 'pm8001_abort_task':
   drivers/scsi/pm8001/pm8001_sas.c:1206: warning: label 'out' defined but not used
>> drivers/scsi/pm8001/pm8001_sas.c:1166: warning: unused variable 'ccb'

vim +/ccb +1166 drivers/scsi/pm8001/pm8001_sas.c

dbf9bfe61 jack wang 2009-10-14  1157  
dbf9bfe61 jack wang 2009-10-14  1158  /*  mandatory SAM-3, still need free task/ccb info, abord the specified task */
dbf9bfe61 jack wang 2009-10-14  1159  int pm8001_abort_task(struct sas_task *task)
dbf9bfe61 jack wang 2009-10-14  1160  {
dbf9bfe61 jack wang 2009-10-14  1161  	unsigned long flags;
a9d840710 Viswas G  2017-09-19  1162  	u32 tag;
dbf9bfe61 jack wang 2009-10-14  1163  	u32 device_id;
dbf9bfe61 jack wang 2009-10-14  1164  	struct domain_device *dev ;
a9d840710 Viswas G  2017-09-19  1165  	struct pm8001_hba_info *pm8001_ha;
dbf9bfe61 jack wang 2009-10-14 @1166  	struct pm8001_ccb_info *ccb;
dbf9bfe61 jack wang 2009-10-14  1167  	struct scsi_lun lun;
dbf9bfe61 jack wang 2009-10-14  1168  	struct pm8001_device *pm8001_dev;
dbf9bfe61 jack wang 2009-10-14  1169  	struct pm8001_tmf_task tmf_task;
dbf9bfe61 jack wang 2009-10-14  1170  	int rc = TMF_RESP_FUNC_FAILED;
dbf9bfe61 jack wang 2009-10-14  1171  	if (unlikely(!task || !task->lldd_task || !task->dev))
a9d840710 Viswas G  2017-09-19  1172  		return TMF_RESP_FUNC_FAILED;
a9d840710 Viswas G  2017-09-19  1173  	dev = task->dev;
a9d840710 Viswas G  2017-09-19  1174  	pm8001_dev = dev->lldd_dev;
a9d840710 Viswas G  2017-09-19  1175  	pm8001_ha = pm8001_find_ha_by_dev(dev);
a9d840710 Viswas G  2017-09-19  1176  	device_id = pm8001_dev->device_id;
a9d840710 Viswas G  2017-09-19  1177  	rc = pm8001_find_tag(task, &tag);
a9d840710 Viswas G  2017-09-19  1178  	if (rc == 0) {
a9d840710 Viswas G  2017-09-19  1179  		pm8001_printk("no tag for task:%p\n", task);
a9d840710 Viswas G  2017-09-19  1180  		return TMF_RESP_FUNC_FAILED;
a9d840710 Viswas G  2017-09-19  1181  	}
dbf9bfe61 jack wang 2009-10-14  1182  	spin_lock_irqsave(&task->task_state_lock, flags);
dbf9bfe61 jack wang 2009-10-14  1183  	if (task->task_state_flags & SAS_TASK_STATE_DONE) {
dbf9bfe61 jack wang 2009-10-14  1184  		spin_unlock_irqrestore(&task->task_state_lock, flags);
a9d840710 Viswas G  2017-09-19  1185  		return TMF_RESP_FUNC_COMPLETE;
dbf9bfe61 jack wang 2009-10-14  1186  	}
dbf9bfe61 jack wang 2009-10-14  1187  	spin_unlock_irqrestore(&task->task_state_lock, flags);
dbf9bfe61 jack wang 2009-10-14  1188  	if (task->task_proto & SAS_PROTOCOL_SSP) {
dbf9bfe61 jack wang 2009-10-14  1189  		struct scsi_cmnd *cmnd = task->uldd_task;
dbf9bfe61 jack wang 2009-10-14  1190  		int_to_scsilun(cmnd->device->lun, &lun);
dbf9bfe61 jack wang 2009-10-14  1191  		tmf_task.tmf = TMF_ABORT_TASK;
dbf9bfe61 jack wang 2009-10-14  1192  		tmf_task.tag_of_task_to_be_managed = tag;
dbf9bfe61 jack wang 2009-10-14  1193  		rc = pm8001_issue_ssp_tmf(dev, lun.scsi_lun, &tmf_task);
97ee20886 jack_wang 2009-11-05  1194  		pm8001_exec_internal_task_abort(pm8001_ha, pm8001_dev,
dbf9bfe61 jack wang 2009-10-14  1195  			pm8001_dev->sas_device, 0, tag);
dbf9bfe61 jack wang 2009-10-14  1196  	} else if (task->task_proto & SAS_PROTOCOL_SATA ||
dbf9bfe61 jack wang 2009-10-14  1197  		task->task_proto & SAS_PROTOCOL_STP) {
dbf9bfe61 jack wang 2009-10-14  1198  		rc = pm8001_exec_internal_task_abort(pm8001_ha, pm8001_dev,
dbf9bfe61 jack wang 2009-10-14  1199  			pm8001_dev->sas_device, 0, tag);
dbf9bfe61 jack wang 2009-10-14  1200  	} else if (task->task_proto & SAS_PROTOCOL_SMP) {
dbf9bfe61 jack wang 2009-10-14  1201  		/* SMP */
dbf9bfe61 jack wang 2009-10-14  1202  		rc = pm8001_exec_internal_task_abort(pm8001_ha, pm8001_dev,
dbf9bfe61 jack wang 2009-10-14  1203  			pm8001_dev->sas_device, 0, tag);
dbf9bfe61 jack wang 2009-10-14  1204  
dbf9bfe61 jack wang 2009-10-14  1205  	}
dbf9bfe61 jack wang 2009-10-14 @1206  out:
dbf9bfe61 jack wang 2009-10-14  1207  	if (rc != TMF_RESP_FUNC_COMPLETE)
dbf9bfe61 jack wang 2009-10-14  1208  		pm8001_printk("rc= %d\n", rc);
dbf9bfe61 jack wang 2009-10-14  1209  	return rc;
dbf9bfe61 jack wang 2009-10-14  1210  }
dbf9bfe61 jack wang 2009-10-14  1211  

:::::: The code at line 1166 was first introduced by commit
:::::: dbf9bfe615717d1145f263c0049fe2328e6ed395 [SCSI] pm8001: add SAS/SATA HBA driver

:::::: TO: jack wang <jack_wang@xxxxxxxxx>
:::::: CC: James Bottomley <James.Bottomley@xxxxxxx>

---
0-DAY kernel test infrastructure                Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all                   Intel Corporation

Attachment: .config.gz
Description: application/gzip


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [SCSI Target Devel]     [Linux SCSI Target Infrastructure]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Linux IIO]     [Samba]     [Device Mapper]

  Powered by Linux