Re: [PATCH 2/2] ide-cd: cdrom_decode_status: use return codes instead of naked numbers

From: Bartlomiej Zolnierkiewicz
Date: Mon Apr 06 2009 - 17:13:31 EST


On Sunday 05 April 2009, Borislav Petkov wrote:
> Remove unused SECTOR_SIZE while at it.
>
> There should be no functional change resulting from this patch.
>
> Signed-off-by: Borislav Petkov <petkovbb@xxxxxxxxx>

[...]

> @@ -431,7 +425,7 @@ static int cdrom_decode_status(ide_drive_t *drive, u8 stat)
> /* if we got a CHECK_CONDITION status, queue a request sense command */
> if (stat & ATA_ERR)
> cdrom_queue_request_sense(drive, NULL, NULL);
> - return 1;
> + return REQ_RECOVER;
>
> end_request:
> if (stat & ATA_ERR) {
> @@ -445,9 +439,9 @@ end_request:
> hwif->rq = NULL;
>
> cdrom_queue_request_sense(drive, rq->sense, rq);
> - return 1;
> - } else
> - return 2;
> + return REQ_RECOVER;
> + }
> + return REQ_FAIL;
> }

Could it be that cdrom_newpc_intr() chunk got lost somewhere along the way,
IIRC it was there?

[...]

> +/* internal decode_status codes */
> +#define REQ_CONT 0
> +#define REQ_RECOVER 1
> +#define REQ_FAIL 2

Did you notice my comments about REQ_* in previous mail?
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/