From: Daniel Mack <daniel@caiaq.de>
To: Martin Enderleit <menderleit@gmail.com>
Cc: mdharm-usb@one-eyed-alien.net, gregkh@suse.de,
linux-usb@vger.kernel.org, usb-storage@lists.one-eyed-alien.net,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH] usb: storage: freecom: Fixed several coding style issues.
Date: Sat, 10 Jul 2010 18:49:46 +0200 [thread overview]
Message-ID: <20100710164946.GI17833@buzzloop.caiaq.de> (raw)
In-Reply-To: <1278773412-21989-1-git-send-email-menderleit@gmail.com>
On Sat, Jul 10, 2010 at 04:50:12PM +0200, Martin Enderleit wrote:
> Fixed several coding style issues in freecom.c.
>
> Signed-off-by: Martin Enderleit <menderleit@gmail.com>
> ---
> drivers/usb/storage/freecom.c | 23 +++++++++++------------
> 1 files changed, 11 insertions(+), 12 deletions(-)
>
> diff --git a/drivers/usb/storage/freecom.c b/drivers/usb/storage/freecom.c
> index 54cc942..6542ca4 100644
> --- a/drivers/usb/storage/freecom.c
> +++ b/drivers/usb/storage/freecom.c
> @@ -269,7 +269,7 @@ static int freecom_transport(struct scsi_cmnd *srb, struct us_data *us)
> /* The firmware will time-out commands after 20 seconds. Some commands
> * can legitimately take longer than this, so we use a different
> * command that only waits for the interrupt and then sends status,
> - * without having to send a new ATAPI command to the device.
> + * without having to send a new ATAPI command to the device.
> *
> * NOTE: There is some indication that a data transfer after a timeout
> * may not work, but that is a condition that should never happen.
> @@ -324,14 +324,14 @@ static int freecom_transport(struct scsi_cmnd *srb, struct us_data *us)
>
> /* Find the length we desire to read. */
> switch (srb->cmnd[0]) {
> - case INQUIRY:
> - case REQUEST_SENSE: /* 16 or 18 bytes? spec says 18, lots of devices only have 16 */
> - case MODE_SENSE:
> - case MODE_SENSE_10:
> - length = le16_to_cpu(fst->Count);
> - break;
> - default:
> - length = scsi_bufflen(srb);
> + case INQUIRY:
> + case REQUEST_SENSE: /* 16 or 18 bytes? spec says 18, lots of devices only have 16 */
> + case MODE_SENSE:
> + case MODE_SENSE_10:
> + length = le16_to_cpu(fst->Count);
> + break;
> + default:
> + length = scsi_bufflen(srb);
> }
>
> /* verify that this amount is legal */
> @@ -414,7 +414,7 @@ static int freecom_transport(struct scsi_cmnd *srb, struct us_data *us)
> /* should never hit here -- filtered in usb.c */
> US_DEBUGP ("freecom unimplemented direction: %d\n",
> us->srb->sc_data_direction);
> - // Return fail, SCSI seems to handle this better.
> + /* Return fail, SCSI seems to handle this better. */
> return USB_STOR_TRANSPORT_FAILED;
> break;
While at it, you can also remove this useless break;
Daniel
prev parent reply other threads:[~2010-07-10 16:49 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-07-10 14:50 [PATCH] usb: storage: freecom: Fixed several coding style issues Martin Enderleit
2010-07-10 16:49 ` Daniel Mack [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20100710164946.GI17833@buzzloop.caiaq.de \
--to=daniel@caiaq.de \
--cc=gregkh@suse.de \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-usb@vger.kernel.org \
--cc=mdharm-usb@one-eyed-alien.net \
--cc=menderleit@gmail.com \
--cc=usb-storage@lists.one-eyed-alien.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox