RE: [PATCH v2 72/84] storvsc_drv: Call scsi_done() directly

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

 




> -----Original Message-----
> From: Bart Van Assche <bvanassche@xxxxxxx>
> Sent: Wednesday, September 29, 2021 6:06 PM
> To: Martin K . Petersen <martin.petersen@xxxxxxxxxx>
> Cc: linux-scsi@xxxxxxxxxxxxxxx; Bart Van Assche <bvanassche@xxxxxxx>; KY
> Srinivasan <kys@xxxxxxxxxxxxx>; Haiyang Zhang <haiyangz@xxxxxxxxxxxxx>;
> Stephen Hemminger <sthemmin@xxxxxxxxxxxxx>; Wei Liu <wei.liu@xxxxxxxxxx>;
> Dexuan Cui <decui@xxxxxxxxxxxxx>; James E.J. Bottomley
> <jejb@xxxxxxxxxxxxx>
> Subject: [PATCH v2 72/84] storvsc_drv: Call scsi_done() directly
> 
> Conditional statements are faster than indirect calls. Hence call
> scsi_done() directly.
> 
> Signed-off-by: Bart Van Assche <bvanassche@xxxxxxx>
> ---
>  drivers/scsi/storvsc_drv.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/scsi/storvsc_drv.c b/drivers/scsi/storvsc_drv.c
> index ebbbc1299c62..70d0b1dd0f75 100644
> --- a/drivers/scsi/storvsc_drv.c
> +++ b/drivers/scsi/storvsc_drv.c
> @@ -1154,7 +1154,7 @@ static void storvsc_command_completion(struct
> storvsc_cmd_request *cmd_request,
>  	scsi_set_resid(scmnd,
>  		cmd_request->payload->range.len - data_transfer_length);
> 
> -	scmnd->scsi_done(scmnd);
> +	scsi_done(scmnd);
> 
>  	if (payload_sz >
>  		sizeof(struct vmbus_channel_packet_multipage_buffer))
> @@ -1753,7 +1753,7 @@ static int storvsc_queuecommand(struct Scsi_Host
> *host, struct scsi_cmnd *scmnd)
>  		 * future versions of the host.
>  		 */
>  		if (!storvsc_scsi_cmd_ok(scmnd)) {
> -			scmnd->scsi_done(scmnd);
> +			scsi_done(scmnd);
>  			return 0;
>  		}
>  	}

Thanks.
Reviewed-by: Haiyang Zhang <haiyangz@xxxxxxxxxxxxx>





[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