Skip to content

Commit 7c7e2d0

Browse files
Martin Enderleitgregkh
authored andcommitted
usb: storage: freecom: Fixed several coding style issues.
Fixed several coding style issues in freecom.c. Signed-off-by: Martin Enderleit <menderleit@gmail.com> Cc: Matthew Dharm <mdharm-usb@one-eyed-alien.net> Cc: Daniel Mack <daniel@caiaq.de> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
1 parent 8ca47c8 commit 7c7e2d0

1 file changed

Lines changed: 11 additions & 12 deletions

File tree

‎drivers/usb/storage/freecom.c‎

Lines changed: 11 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -269,7 +269,7 @@ static int freecom_transport(struct scsi_cmnd *srb, struct us_data *us)
269269
/* The firmware will time-out commands after 20 seconds. Some commands
270270
* can legitimately take longer than this, so we use a different
271271
* command that only waits for the interrupt and then sends status,
272-
* without having to send a new ATAPI command to the device.
272+
* without having to send a new ATAPI command to the device.
273273
*
274274
* NOTE: There is some indication that a data transfer after a timeout
275275
* 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)
324324

325325
/* Find the length we desire to read. */
326326
switch (srb->cmnd[0]) {
327-
case INQUIRY:
328-
case REQUEST_SENSE: /* 16 or 18 bytes? spec says 18, lots of devices only have 16 */
329-
case MODE_SENSE:
330-
case MODE_SENSE_10:
331-
length = le16_to_cpu(fst->Count);
332-
break;
333-
default:
334-
length = scsi_bufflen(srb);
327+
case INQUIRY:
328+
case REQUEST_SENSE: /* 16 or 18 bytes? spec says 18, lots of devices only have 16 */
329+
case MODE_SENSE:
330+
case MODE_SENSE_10:
331+
length = le16_to_cpu(fst->Count);
332+
break;
333+
default:
334+
length = scsi_bufflen(srb);
335335
}
336336

337337
/* verify that this amount is legal */
@@ -414,7 +414,7 @@ static int freecom_transport(struct scsi_cmnd *srb, struct us_data *us)
414414
/* should never hit here -- filtered in usb.c */
415415
US_DEBUGP ("freecom unimplemented direction: %d\n",
416416
us->srb->sc_data_direction);
417-
// Return fail, SCSI seems to handle this better.
417+
/* Return fail, SCSI seems to handle this better. */
418418
return USB_STOR_TRANSPORT_FAILED;
419419
break;
420420
}
@@ -494,8 +494,7 @@ static void pdump (void *ibuffer, int length)
494494
offset = 0;
495495
}
496496
offset += sprintf (line+offset, "%08x:", i);
497-
}
498-
else if ((i & 7) == 0) {
497+
} else if ((i & 7) == 0) {
499498
offset += sprintf (line+offset, " -");
500499
}
501500
offset += sprintf (line+offset, " %02x", buffer[i] & 0xff);

0 commit comments

Comments
 (0)