Re: [PATCH 08/16] scsi: libsas: Add sas_execute_ssp_tmf()

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

 



On Tue, Jan 25, 2022 at 07:32:44PM +0800, John Garry wrote:
> Add a function to issue an SSP TMF.
> 
> Add a temp prototype to keep make W=1 happy.
> 
> Signed-off-by: John Garry <john.garry@xxxxxxxxxx>
> ---
>  drivers/scsi/libsas/sas_scsi_host.c | 20 ++++++++++++++++++++
>  1 file changed, 20 insertions(+)
> 
> diff --git a/drivers/scsi/libsas/sas_scsi_host.c b/drivers/scsi/libsas/sas_scsi_host.c
> index 93ca6da63104..cfdf4a031be0 100644
> --- a/drivers/scsi/libsas/sas_scsi_host.c
> +++ b/drivers/scsi/libsas/sas_scsi_host.c
> @@ -938,6 +938,11 @@ int sas_execute_tmf(struct domain_device *device, void *parameter,
>  		task->dev = device;
>  		task->task_proto = device->tproto;
>  
> +		if (dev_is_sata(device)) {
> +		} else {
> +			memcpy(&task->ssp_task, parameter, para_len);
> +		}

This looks strange, why not:

		if (!dev_is_sata(device))
			memcpy(&task->ssp_task, parameter, para_len);



[Index of Archives]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Linux FS]     [Yosemite Forum]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]     [Linux Resources]

  Powered by Linux