[PATCH 02/17] lpfc: NVME Initiator: Base modifications Part A

James Smart jsmart2021 at gmail.com
Wed Jan 18 18:34:02 PST 2017



On 1/18/2017 1:50 AM, Johannes Thumshirn wrote:

>> @@ -4959,11 +4968,11 @@ lpfc_send_taskmgmt(struct lpfc_vport *vport, struct scsi_cmnd *cmnd,
>>   	int status;
>>   
>>   	rdata = lpfc_rport_data_from_scsi_device(cmnd->device);
>> -	if (!rdata || !rdata->pnode || !NLP_CHK_NODE_ACT(rdata->pnode))
>> -		return FAILED;
> OK, I don't get this hunk. lpfc_rport_data_from_scsi_device() cannot return
> NULL anymore?
>
> I at least expected something like:
>
>    	rdata = lpfc_rport_data_from_scsi_device(cmnd->device);
> 	if (!rdata || !rdata->pnode)
> 		return FAILED;
> 	
> 	pnode = rdata->pnode;
> 	if (!NLP_CHK_NODE_ACT(pnode)
> 		return FAILED;

it can and the order of precedence for the if check allows for it. I 
don't see any difference in what you wrote vs what's there, other than 
pnode gets an assignment.


Agree with all your other comments and will address them.

-- james





More information about the Linux-nvme mailing list