qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [RFC PATCH v3 09/78] hw/acpi/aml-build.c: add fallthrough pseudo-key


From: Ani Sinha
Subject: Re: [RFC PATCH v3 09/78] hw/acpi/aml-build.c: add fallthrough pseudo-keyword
Date: Tue, 17 Oct 2023 14:10:34 +0530


> On 13-Oct-2023, at 2:15 PM, Emmanouil Pitsidianakis 
> <manos.pitsidianakis@linaro.org> wrote:
> 
> In preparation of raising -Wimplicit-fallthrough to 5, replace all
> fall-through comments with the fallthrough attribute pseudo-keyword.
> 
> Signed-off-by: Emmanouil Pitsidianakis <manos.pitsidianakis@linaro.org>

What was wrong with QEMU_FALLTHROUGH? 
https://www.mail-archive.com/qemu-devel@nongnu.org/msg996916.html does not 
explain and there is no commit message that justifies the change.

Other than that,

Reviewed-by: Ani Sinha <anisinha@redhat.com>


> ---
> hw/acpi/aml-build.c | 6 +++---
> 1 file changed, 3 insertions(+), 3 deletions(-)
> 
> diff --git a/hw/acpi/aml-build.c b/hw/acpi/aml-build.c
> index af66bde0f5..b0cf0c6073 100644
> --- a/hw/acpi/aml-build.c
> +++ b/hw/acpi/aml-build.c
> @@ -326,17 +326,16 @@ build_prepend_package_length(GArray *package, unsigned 
> length, bool incl_self)
>         byte = length >> PACKAGE_LENGTH_4BYTE_SHIFT;
>         build_prepend_byte(package, byte);
>         length &= (1 << PACKAGE_LENGTH_4BYTE_SHIFT) - 1;
> -        /* fall through */
> +        fallthrough;
>     case 3:
>         byte = length >> PACKAGE_LENGTH_3BYTE_SHIFT;
>         build_prepend_byte(package, byte);
>         length &= (1 << PACKAGE_LENGTH_3BYTE_SHIFT) - 1;
> -        /* fall through */
> +        fallthrough;
>     case 2:
>         byte = length >> PACKAGE_LENGTH_2BYTE_SHIFT;
>         build_prepend_byte(package, byte);
>         length &= (1 << PACKAGE_LENGTH_2BYTE_SHIFT) - 1;
> -        /* fall through */
>     }
>     /*
>      * Most significant two bits of byte zero indicate how many following 
> bytes
> @@ -528,6 +527,7 @@ void aml_append(Aml *parent_ctx, Aml *child)
>          */
>         build_append_byte(buf, 0);
>         /* fall through, to pack resources in buffer */
> +        fallthrough;
>     case AML_BUFFER:
>         build_buffer(buf, child->op);
>         break;
> -- 
> 2.39.2
> 




reply via email to

[Prev in Thread] Current Thread [Next in Thread]