Skip to contentSkip to conversation

ACPICA: Use fallthrough pseudo-keyword

PATCH In review Wei Ming Chen 3 participants 3 messages May 6, 2021 – May 11, 2021

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

PATCH 1/1 ACPICA: Use fallthrough pseudo-keyword

Replace /* FALLTHROUGH */ comment with pseudo-keyword macro fallthrough[1]

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

---
 drivers/acpi/acpica/utprint.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/acpi/acpica/utprint.c +1 -1
index e37d612e8db5..0b511434b80b 100644
@@ -475,7 +475,7 @@ int vsnprintf(char *string, acpi_size size, const char *format, va_list args)
 		case 'X':
 
 			type |= ACPI_FORMAT_UPPER;
-			/* FALLTHROUGH */
+			fallthrough;
 
 		case 'x':
 
Signature · 1 line
2.25.1
#1 lore raw
Quoted 15 lines · Wei Ming Chen

Replace /* FALLTHROUGH */ comment with pseudo-keyword macro fallthrough[1]

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

Signed-off-by Wei Ming Chen <jj251510319013(a)gmail.com>
---
 drivers/acpi/acpica/utprint.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/acpi/acpica/utprint.c +0 -0
index e37d612e8db5..0b511434b80b 100644

drivers/acpi/acpica/utprint.c int vsnprintf(char *string, acpi_size size, const char *format, va_list args)

Quoted 9 lines
drivers/acpi/acpica/utprint.c +1 -2
@@ -475,7 +475,7 @@ int vsnprintf(char *string, acpi_size size, const char *format, va_list args)
                case 'X':
 
                        type |= ACPI_FORMAT_UPPER;
-                       /* FALLTHROUGH */
+                       fallthrough;
 
                case 'x':
 
--

This is ACPICA material, so I'm leaving it to Erik and Bob.

Thanks!

#2 lore raw
In reply to Wei Ming Chen
Quoted 27 lines

-----Original Message-----
From: Wei Ming Chen <[email protected]>
Sent: Thursday, May 6, 2021 5:49 AM
To: [email protected]
Cc: [email protected]; [email protected]; Wei Ming Chen <[email protected]>
Subject: [PATCH] ACPICA: Use fallthrough pseudo-keyword

Replace /* FALLTHROUGH */ comment with pseudo-keyword macro fallthrough[1]

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

---
 drivers/acpi/acpica/utprint.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/acpi/acpica/utprint.c +0 -0
index e37d612e8db5..0b511434b80b 100644

drivers/acpi/acpica/utprint.c int vsnprintf(char *string, acpi_size size, const char · line 477

Quoted 3 lines
drivers/acpi/acpica/utprint.c +0 -0
@@ -475,7 +475,7 @@ int vsnprintf(char *string, acpi_size size, const char
 *format, va_list args)
 		case 'X':
 

Hi,

drivers/acpi/acpica/utprint.c int vsnprintf(char *string, acpi_size size, const char *format, va_list args) · line 478

Quoted 3 lines
drivers/acpi/acpica/utprint.c +1 -1
 			type |= ACPI_FORMAT_UPPER;
-			/* FALLTHROUGH */
+			fallthrough;

Since fallthrough is specific to gcc, we use the macro ACPI_FALLTHROUGH for code in drivers/acpi/acpica. Please resubmit using this keyword and I can take the commit for upstream ACPICA.

Thanks,
Erik

Quoted 5 lines
drivers/acpi/acpica/utprint.c +0 -1
 		case 'x':
 
--

2.25.1