Linux USB
 help / color / mirror / Atom feed
* [PATCH] usb: storage: transport: Fix switch-case indentation typo in 'transport.c'
@ 2023-11-23  6:34 Ren Xiao
  2023-11-26 10:34 ` Greg Kroah-Hartman
  0 siblings, 1 reply; 2+ messages in thread
From: Ren Xiao @ 2023-11-23  6:34 UTC (permalink / raw)
  To: Alan Stern, Greg Kroah-Hartman
  Cc: hust-os-kernel-patches, Ren Xiao, Dongliang Mu, linux-usb,
	usb-storage, linux-kernel

Adjusted the indentation of the switch-case code blocks which
start from line 1051 and line 1304.

Signed-off-by: Ren Xiao <u202112004@hust.edu.cn>
Reviewed-by: Dongliang Mu <dzm91@hust.edu.cn>
---
 drivers/usb/storage/transport.c | 46 ++++++++++++++++-----------------
 1 file changed, 23 insertions(+), 23 deletions(-)

diff --git a/drivers/usb/storage/transport.c b/drivers/usb/storage/transport.c
index 8f236854c83b..88d9f839d809 100644
--- a/drivers/usb/storage/transport.c
+++ b/drivers/usb/storage/transport.c
@@ -1049,10 +1049,10 @@ int usb_stor_CB_transport(struct scsi_cmnd *srb, struct us_data *us)
 
 	/* The second byte & 0x0F should be 0x0 for good, otherwise error */
 	switch (us->iobuf[1] & 0x0F) {
-		case 0x00: 
-			return USB_STOR_TRANSPORT_GOOD;
-		case 0x01: 
-			goto Failed;
+	case 0x00:
+		return USB_STOR_TRANSPORT_GOOD;
+	case 0x01:
+		goto Failed;
 	}
 	return USB_STOR_TRANSPORT_ERROR;
 
@@ -1302,28 +1302,28 @@ int usb_stor_Bulk_transport(struct scsi_cmnd *srb, struct us_data *us)
 
 	/* based on the status code, we report good or bad */
 	switch (bcs->Status) {
-		case US_BULK_STAT_OK:
-			/* device babbled -- return fake sense data */
-			if (fake_sense) {
-				memcpy(srb->sense_buffer, 
-				       usb_stor_sense_invalidCDB, 
-				       sizeof(usb_stor_sense_invalidCDB));
-				return USB_STOR_TRANSPORT_NO_SENSE;
-			}
+	case US_BULK_STAT_OK:
+		/* device babbled -- return fake sense data */
+		if (fake_sense) {
+			memcpy(srb->sense_buffer,
+			       usb_stor_sense_invalidCDB,
+			       sizeof(usb_stor_sense_invalidCDB));
+			return USB_STOR_TRANSPORT_NO_SENSE;
+		}
 
-			/* command good -- note that data could be short */
-			return USB_STOR_TRANSPORT_GOOD;
+		/* command good -- note that data could be short */
+		return USB_STOR_TRANSPORT_GOOD;
 
-		case US_BULK_STAT_FAIL:
-			/* command failed */
-			return USB_STOR_TRANSPORT_FAILED;
+	case US_BULK_STAT_FAIL:
+		/* command failed */
+		return USB_STOR_TRANSPORT_FAILED;
 
-		case US_BULK_STAT_PHASE:
-			/*
-			 * phase error -- note that a transport reset will be
-			 * invoked by the invoke_transport() function
-			 */
-			return USB_STOR_TRANSPORT_ERROR;
+	case US_BULK_STAT_PHASE:
+		/*
+		 * phase error -- note that a transport reset will be
+		 * invoked by the invoke_transport() function
+		 */
+		return USB_STOR_TRANSPORT_ERROR;
 	}
 
 	/* we should never get here, but if we do, we're in trouble */
-- 
2.34.1


^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2023-11-26 10:34 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-11-23  6:34 [PATCH] usb: storage: transport: Fix switch-case indentation typo in 'transport.c' Ren Xiao
2023-11-26 10:34 ` Greg Kroah-Hartman

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox