Re: [PATCH 18/20] target: Compare explicitly with SAM_STAT_GOOD

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

 



On 4/13/21 12:07 PM, Bart Van Assche wrote:
> Instead of leaving it implicit that SAM_STAT_GOOD == 0, compare explicitly
> with SAM_STAT_GOOD.
> 
> Cc: Mike Christie <michael.christie@xxxxxxxxxx>
> Signed-off-by: Bart Van Assche <bvanassche@xxxxxxx>
> ---
>  drivers/target/target_core_pscsi.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/target/target_core_pscsi.c b/drivers/target/target_core_pscsi.c
> index 1c9aeab93477..dac44caf77a3 100644
> --- a/drivers/target/target_core_pscsi.c
> +++ b/drivers/target/target_core_pscsi.c
> @@ -1046,7 +1046,7 @@ static void pscsi_req_done(struct request *req, blk_status_t status)
>  	int result = scsi_req(req)->result;
>  	u8 scsi_status = status_byte(result) << 1;
>  
> -	if (scsi_status) {
> +	if (scsi_status != SAM_STAT_GOOD) {
>  		pr_debug("PSCSI Status Byte exception at cmd: %p CDB:"
>  			" 0x%02x Result: 0x%08x\n", cmd, pt->pscsi_cdb[0],
>  			result);
> 

Reviewed-by: Mike Christie <michael.christie@xxxxxxxxxx>



[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