Skip to contentSkip to conversation

rt2x00: Use fallthrough pseudo-keyword

PATCH In review Gustavo A. R. Silva 2 participants 2 messages Aug 21, 2020 – Aug 27, 2020

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 rt2x00: Use fallthrough pseudo-keyword

Replace the existing /* fall through */ comments and its variants with the new pseudo-keyword macro fallthrough[1]. Also, remove unnecessary fall-through markings when it is the case.

[1] https://www.kernel.org/doc/html/v5.7/process/deprecated.html?highlight=fallthrough#implicit-switch-case-fall-through

---
 .../net/wireless/ralink/rt2x00/rt2400pci.c    |  2 +-
 .../net/wireless/ralink/rt2x00/rt2500pci.c    |  2 +-
 .../net/wireless/ralink/rt2x00/rt2800lib.c    | 42 +++++++++----------
 .../net/wireless/ralink/rt2x00/rt2800mmio.c   |  1 -
 .../net/wireless/ralink/rt2x00/rt2800usb.c    |  1 -
 drivers/net/wireless/ralink/rt2x00/rt61pci.c  |  3 +-
 drivers/net/wireless/ralink/rt2x00/rt73usb.c  |  1 -
 7 files changed, 24 insertions(+), 28 deletions(-)
drivers/net/wireless/ralink/rt2x00/rt2400pci.c +1 -1
index c1ac933349d1..c8bb378148c3 100644
@@ -1291,7 +1291,7 @@ static void rt2400pci_txdone(struct rt2x00_dev *rt2x00dev,
 			break;
 		case 2: /* Failure, excessive retries */
 			__set_bit(TXDONE_EXCESSIVE_RETRY, &txdesc.flags);
-			/* Fall through - this is a failed frame! */
+			fallthrough;	/* this is a failed frame! */
 		default: /* Failure */
 			__set_bit(TXDONE_FAILURE, &txdesc.flags);
 		}
drivers/net/wireless/ralink/rt2x00/rt2500pci.c +1 -1
index 0859adebd860..2e015c16cd4b 100644
@@ -1419,7 +1419,7 @@ static void rt2500pci_txdone(struct rt2x00_dev *rt2x00dev,
 			break;
 		case 2: /* Failure, excessive retries */
 			__set_bit(TXDONE_EXCESSIVE_RETRY, &txdesc.flags);
-			/* Fall through - this is a failed frame! */
+			fallthrough;	/* this is a failed frame! */
 		default: /* Failure */
 			__set_bit(TXDONE_FAILURE, &txdesc.flags);
 		}
drivers/net/wireless/ralink/rt2x00/rt2800lib.c +21 -21

138 lines not on this page · raw message

drivers/net/wireless/ralink/rt2x00/rt2800mmio.c +0 -1
index 110bb391c372..6e7c14757261 100644
@@ -593,7 +593,6 @@ void rt2800mmio_queue_init(struct data_queue *queue)
 		break;
 
 	case QID_ATIM:
-		/* fallthrough */
 	default:
 		BUG();
 		break;
drivers/net/wireless/ralink/rt2x00/rt2800usb.c +0 -1
index 4cc64fe481a7..d08b251ec5a2 100644
@@ -746,7 +746,6 @@ static void rt2800usb_queue_init(struct data_queue *queue)
 		break;
 
 	case QID_ATIM:
-		/* fallthrough */
 	default:
 		BUG();
 		break;
drivers/net/wireless/ralink/rt2x00/rt61pci.c +1 -2
index eefce76fc99b..43c3cdd13710 100644
@@ -2130,7 +2130,7 @@ static void rt61pci_txdone(struct rt2x00_dev *rt2x00dev)
 			break;
 		case 6: /* Failure, excessive retries */
 			__set_bit(TXDONE_EXCESSIVE_RETRY, &txdesc.flags);
-			/* Fall through - this is a failed frame! */
+			fallthrough;	/* this is a failed frame! */
 		default: /* Failure */
 			__set_bit(TXDONE_FAILURE, &txdesc.flags);
 		}
@@ -2953,7 +2953,6 @@ static void rt61pci_queue_init(struct data_queue *queue)
 		break;
 
 	case QID_ATIM:
-		/* fallthrough */
 	default:
 		BUG();
 		break;
drivers/net/wireless/ralink/rt2x00/rt73usb.c +0 -1
index e908c303b677..e69793773d87 100644
@@ -2373,7 +2373,6 @@ static void rt73usb_queue_init(struct data_queue *queue)
 		break;
 
 	case QID_ATIM:
-		/* fallthrough */
 	default:
 		BUG();
 		break;
Signature · 1 line
2.27.0
#1 lore raw
Quoted 7 lines · Gustavo A. R. Silva

Replace the existing /* fall through */ comments and its variants with the new pseudo-keyword macro fallthrough[1]. Also, remove unnecessary fall-through markings when it is the case.

[1] https://www.kernel.org/doc/html/v5.7/process/deprecated.html?highlight=fallthrough#implicit-switch-case-fall-through

Patch applied to wireless-drivers-next.git, thanks.

74aad39490a7 rt2x00: Use fallthrough pseudo-keyword

Signature · 3 lines
https://patchwork.kernel.org/patch/11728199/

https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches