[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <1266273848.29987.21.camel@Joe-Laptop.home>
Date: Mon, 15 Feb 2010 14:44:08 -0800
From: Joe Perches <joe@...ches.com>
To: Roel Kluin <roel.kluin@...il.com>
Cc: Matthew Dharm <mdharm-usb@...-eyed-alien.net>,
linux-usb@...r.kernel.org, usb-storage@...ts.one-eyed-alien.net,
Andrew Morton <akpm@...ux-foundation.org>,
LKML <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] USB: misplaced parenthesis
On Mon, 2010-02-15 at 23:40 +0100, Roel Kluin wrote:
> The parenthesis was misplaced
>
> Signed-off-by: Roel Kluin <roel.kluin@...il.com>
> ---
> Is this maybe, as the comment states, why blanking a cdrw at speed 4
> was unreliable?
>
> diff --git a/drivers/usb/storage/shuttle_usbat.c b/drivers/usb/storage/shuttle_usbat.c
> index b62a288..b958db5 100644
> --- a/drivers/usb/storage/shuttle_usbat.c
> +++ b/drivers/usb/storage/shuttle_usbat.c
> @@ -1645,8 +1645,8 @@ static int usbat_hp8200e_transport(struct scsi_cmnd *srb, struct us_data *us)
>
> if ((result = usbat_write_block(us,
> USBAT_ATA, srb->cmnd, 12,
> - (srb->cmnd[0]==GPCMD_BLANK ? 75 : 10), 0) !=
> - USB_STOR_TRANSPORT_GOOD)) {
> + (srb->cmnd[0]==GPCMD_BLANK ? 75 : 10), 0)) !=
> + USB_STOR_TRANSPORT_GOOD) {
> return result;
> }
I think it'd be better if you hoisted the set'n'test out of the if()
Isn't this the current logic?
result = usbat_write_block(us, USBAT_ATA, srb->cmnd, 12,
srb->cmnd[0] == GPCMD_BLANK ? 75 : 10, 0);
result = result != USB_STOR_TRANSPORT_GOOD;
if (result)
return result;
I wonder if it should be:
result = usbat_write_block(us, USBAT_ATA, srb->cmnd, 12,
srb->cmnd[0] == GPCMD_BLANK ? 75 : 10, 0);
if (result != USB_STOR_TRANSPORT_GOOD)
return result;
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists