Re: [PATCH] ide-scsi: do non-atomic pc->flags testing

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

 



On Tuesday 12 February 2008, Borislav Petkov wrote:
> commit 272976f0f5754707f9e41da315717a6eb8d9d536
> Author: Borislav Petkov <petkovbb@xxxxxxxxx>
> Date:   Tue Feb 12 16:22:44 2008 +0100
> 
>     ide-scsi: do non-atomic pc->flags testing
> 
>     Signed-off-by: Borislav Petkov <petkovbb@xxxxxxxxx>
> 
> diff --git a/drivers/scsi/ide-scsi.c b/drivers/scsi/ide-scsi.c
> index 5ec421c..eb84cdc 100644
> --- a/drivers/scsi/ide-scsi.c
> +++ b/drivers/scsi/ide-scsi.c
> @@ -319,8 +319,10 @@ static int idescsi_end_request (ide_drive_t *drive, int uptodate, int nrsecs)
>  		pc = opc;
>  		rq = pc->rq;
>  		pc->scsi_cmd->result = (CHECK_CONDITION << 1) |
> -					((test_bit(PC_TIMEDOUT, &pc->flags)?DID_TIME_OUT:DID_OK) << 16);
> -	} else if (test_bit(PC_TIMEDOUT, &pc->flags)) {
> +					(((pc->flags & PC_TIMEDOUT) ?
> +							  DID_TIME_OUT :
> +							  DID_OK) << 16);
> +	} else if (pc->flags & PC_TIMEDOUT) {

How's about renaming flag defines to PC_FLAG_* at the same time
(like it was done for other ATAPI drivers)?

Otherwise looks good.
-
To unsubscribe from this list: send the line "unsubscribe linux-ide" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Filesystems]     [Linux SCSI]     [Linux RAID]     [Git]     [Kernel Newbies]     [Linux Newbie]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Samba]     [Device Mapper]

  Powered by Linux