qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: David Gibson <david@gibson.dropbear.id.au>
To: Chen Qun <kuhn.chenqun@huawei.com>
Cc: zhang.zhanghailiang@huawei.com, qemu-trivial@nongnu.org,
	qemu-devel@nongnu.org, clg@kaod.org, ganqixin@huawei.com,
	Euler Robot <euler.robot@huawei.com>
Subject: Re: [PATCH] target/ppc/excp_helper: Add a fallthrough for fix compiler warning
Date: Wed, 28 Oct 2020 16:53:12 +1100	[thread overview]
Message-ID: <20201028055312.GE5604@yekko.fritz.box> (raw)
In-Reply-To: <20201028055107.2170401-1-kuhn.chenqun@huawei.com>

[-- Attachment #1: Type: text/plain, Size: 1737 bytes --]

On Wed, Oct 28, 2020 at 01:51:07PM +0800, Chen Qun wrote:
> When using -Wimplicit-fallthrough in our CFLAGS, the compiler showed warning:
> ../target/ppc/excp_helper.c: In function ‘powerpc_excp’:
> ../target/ppc/excp_helper.c:529:13: warning: this statement may fall through [-Wimplicit-fallthrough=]
>   529 |         msr |= env->error_code;
>       |         ~~~~^~~~~~~~~~~~~~~~~~
> ../target/ppc/excp_helper.c:530:5: note: here
>   530 |     case POWERPC_EXCP_HDECR:     /* Hypervisor decrementer exception         */
>       |     ^~~~
> 
> Add the corresponding "fall through" comment to fix it.
> 
> Reported-by: Euler Robot <euler.robot@huawei.com>
> Signed-off-by: Chen Qun <kuhn.chenqun@huawei.com>

Applied to ppc-for-5.2, thanks.

> ---
>  target/ppc/excp_helper.c | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/target/ppc/excp_helper.c b/target/ppc/excp_helper.c
> index a988ba15f4..c639516399 100644
> --- a/target/ppc/excp_helper.c
> +++ b/target/ppc/excp_helper.c
> @@ -527,6 +527,7 @@ static inline void powerpc_excp(PowerPCCPU *cpu, int excp_model, int excp)
>          break;
>      case POWERPC_EXCP_HISI:      /* Hypervisor instruction storage exception */
>          msr |= env->error_code;
> +        /* fall through */
>      case POWERPC_EXCP_HDECR:     /* Hypervisor decrementer exception         */
>      case POWERPC_EXCP_HDSI:      /* Hypervisor data storage exception        */
>      case POWERPC_EXCP_HDSEG:     /* Hypervisor data segment exception        */

-- 
David Gibson			| I'll have my music baroque, and my code
david AT gibson.dropbear.id.au	| minimalist, thank you.  NOT _the_ _other_
				| _way_ _around_!
http://www.ozlabs.org/~dgibson

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

      reply	other threads:[~2020-10-28  6:06 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-10-28  5:51 [PATCH] target/ppc/excp_helper: Add a fallthrough for fix compiler warning Chen Qun
2020-10-28  5:53 ` David Gibson [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20201028055312.GE5604@yekko.fritz.box \
    --to=david@gibson.dropbear.id.au \
    --cc=clg@kaod.org \
    --cc=euler.robot@huawei.com \
    --cc=ganqixin@huawei.com \
    --cc=kuhn.chenqun@huawei.com \
    --cc=qemu-devel@nongnu.org \
    --cc=qemu-trivial@nongnu.org \
    --cc=zhang.zhanghailiang@huawei.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).