lkml.org 
[lkml]   [2008]   [Feb]   [12]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: [PATCH] ide-scsi: do non-atomic pc->flags testing
Date
On Tuesday 12 February 2008, Borislav Petkov wrote:
> commit 272976f0f5754707f9e41da315717a6eb8d9d536
> Author: Borislav Petkov <petkovbb@gmail.com>
> Date: Tue Feb 12 16:22:44 2008 +0100
>
> ide-scsi: do non-atomic pc->flags testing
>
> Signed-off-by: Borislav Petkov <petkovbb@gmail.com>
>
> 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.


\
 
 \ /
  Last update: 2008-02-12 22:31    [W:0.119 / U:0.216 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site