diff mbox series

ACPICA: Use fallthrough pseudo-keyword

Message ID 20210506124912.7725-1-jj251510319013@gmail.com
State New
Headers show
Series ACPICA: Use fallthrough pseudo-keyword | expand

Commit Message

Wei Ming Chen May 6, 2021, 12:49 p.m. UTC
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@gmail.com>
---
 drivers/acpi/acpica/utprint.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Rafael J. Wysocki May 10, 2021, 5:06 p.m. UTC | #1
On Thu, May 6, 2021 at 2:49 PM Wei Ming Chen <jj251510319013@gmail.com> wrote:
>

> 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@gmail.com>

> ---

>  drivers/acpi/acpica/utprint.c | 2 +-

>  1 file changed, 1 insertion(+), 1 deletion(-)

>

> diff --git a/drivers/acpi/acpica/utprint.c b/drivers/acpi/acpica/utprint.c

> index e37d612e8db5..0b511434b80b 100644

> --- a/drivers/acpi/acpica/utprint.c

> +++ b/drivers/acpi/acpica/utprint.c

> @@ -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!
Erik Kaneda May 11, 2021, 6:20 p.m. UTC | #2
> -----Original Message-----

> From: Wei Ming Chen <jj251510319013@gmail.com>

> Sent: Thursday, May 6, 2021 5:49 AM

> To: linux-kernel@vger.kernel.org

> Cc: linux-acpi@vger.kernel.org; devel@acpica.org; Wei Ming Chen

> <jj251510319013@gmail.com>

> 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

> 

> Signed-off-by: Wei Ming Chen <jj251510319013@gmail.com>

> ---

>  drivers/acpi/acpica/utprint.c | 2 +-

>  1 file changed, 1 insertion(+), 1 deletion(-)

> 

> diff --git a/drivers/acpi/acpica/utprint.c b/drivers/acpi/acpica/utprint.c

> index e37d612e8db5..0b511434b80b 100644

> --- a/drivers/acpi/acpica/utprint.c

> +++ b/drivers/acpi/acpica/utprint.c

> @@ -475,7 +475,7 @@ int vsnprintf(char *string, acpi_size size, const char

> *format, va_list args)

>  		case 'X':

> 

Hi,

>  			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
> 

>  		case 'x':

> 

> --

> 2.25.1
diff mbox series

Patch

diff --git a/drivers/acpi/acpica/utprint.c b/drivers/acpi/acpica/utprint.c
index e37d612e8db5..0b511434b80b 100644
--- a/drivers/acpi/acpica/utprint.c
+++ b/drivers/acpi/acpica/utprint.c
@@ -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':