Re: [PATCH 17/24] scsi: do not use DRIVER_INVALID

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

 



On Thu, 31 Oct 2019, Hannes Reinecke wrote:

> diff --git a/drivers/scsi/vmw_pvscsi.c b/drivers/scsi/vmw_pvscsi.c
> index 74e5ed940952..e988a8c3fc7f 100644
> --- a/drivers/scsi/vmw_pvscsi.c
> +++ b/drivers/scsi/vmw_pvscsi.c
> @@ -572,25 +572,25 @@ static void pvscsi_complete_request(struct pvscsi_adapter *adapter,
>  		case BTSTAT_LINKED_COMMAND_COMPLETED:
>  		case BTSTAT_LINKED_COMMAND_COMPLETED_WITH_FLAG:
>  			/* If everything went fine, let's move on..  */
> -			cmd->result = (DID_OK << 16);
> +			set_host_byte(cmd, DID_OK);
>  			break;
>  
>  		case BTSTAT_DATARUN:
>  		case BTSTAT_DATA_UNDERRUN:
>  			/* Report residual data in underruns */
>  			scsi_set_resid(cmd, scsi_bufflen(cmd) - e->dataLen);
> -			cmd->result = (DID_ERROR << 16);
> +			set_host_byte(cmd, DID_ERROR);
>  			break;
>  
>  		case BTSTAT_SELTIMEO:
>  			/* Our emulation returns this for non-connected devs */
> -			cmd->result = (DID_BAD_TARGET << 16);
> +			set_host_byte(cmd, DID_BAD_TARGET);
>  			break;
>  
>  		case BTSTAT_LUNMISMATCH:
>  		case BTSTAT_TAGREJECT:
>  		case BTSTAT_BADMSG:
> -			cmd->result = (DRIVER_INVALID << 24);
> +			cmd->result = 0;
>  			/* fall through */
>  
>  		case BTSTAT_HAHARDWARE:

That cmd->result = 0 assignment already exists (before the switch).

-- 



[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