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: Thomas Huth <thuth@redhat.com>,
	zhang.zhanghailiang@huawei.com, qemu-trivial@nongnu.org,
	qemu-devel@nongnu.org, ganqixin@huawei.com,
	Euler Robot <euler.robot@huawei.com>
Subject: Re: [PATCH v2 7/8] ppc: Add a missing break for PPC6xx_INPUT_TBEN
Date: Sat, 31 Oct 2020 16:01:02 +1100	[thread overview]
Message-ID: <20201031050102.GA17638@yekko.fritz.box> (raw)
In-Reply-To: <20201030004046.2191790-8-kuhn.chenqun@huawei.com>

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

On Fri, Oct 30, 2020 at 08:40:45AM +0800, Chen Qun wrote:
> When using -Wimplicit-fallthrough in our CFLAGS, the compiler showed warning:
> hw/ppc/ppc.c: In function ‘ppc6xx_set_irq’:
> hw/ppc/ppc.c:118:16: warning: this statement may fall through [-Wimplicit-fallthrough=]
>   118 |             if (level) {
>       |                ^
> hw/ppc/ppc.c:123:9: note: here
>   123 |         case PPC6xx_INPUT_INT:
>       |         ^~~~
> 
> According to the discussion, a break statement needs to be added here.
> 
> Reported-by: Euler Robot <euler.robot@huawei.com>
> Signed-off-by: Chen Qun <kuhn.chenqun@huawei.com>
> ---
> v1->v2: Add a "break" statement here instead of /* fall through */ comments
> (Base on Thomas's and David review).
> 
> Cc: Thomas Huth <thuth@redhat.com>
> Cc: David Gibson <david@gibson.dropbear.id.au>

Acked-by: David Gibson <david@gibson.dropbear.id.au>

> ---
>  hw/ppc/ppc.c | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/hw/ppc/ppc.c b/hw/ppc/ppc.c
> index 4a11fb1640..1b98272076 100644
> --- a/hw/ppc/ppc.c
> +++ b/hw/ppc/ppc.c
> @@ -120,6 +120,7 @@ static void ppc6xx_set_irq(void *opaque, int pin, int level)
>              } else {
>                  cpu_ppc_tb_stop(env);
>              }
> +            break;
>          case PPC6xx_INPUT_INT:
>              /* Level sensitive - active high */
>              LOG_IRQ("%s: set the external IRQ state to %d\n",

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

  parent reply	other threads:[~2020-10-31  5:19 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-10-30  0:40 [PATCH v2 0/8] silence the compiler warnings Chen Qun
2020-10-30  0:40 ` [PATCH v2 1/8] target/i386: silence the compiler warnings in gen_shiftd_rm_T1 Chen Qun
2020-10-30  0:40 ` [PATCH v2 2/8] hw/intc/arm_gicv3_kvm: silence the compiler warnings Chen Qun
2020-10-30  0:40 ` [PATCH v2 3/8] accel/tcg/user-exec: " Chen Qun
2020-10-30  5:50   ` Richard Henderson
2020-10-30  6:31   ` Philippe Mathieu-Daudé
2020-10-30 15:40   ` Thomas Huth
2020-10-30  0:40 ` [PATCH v2 4/8] linux-user/mips/cpu_loop: " Chen Qun
2020-10-30  9:55   ` Laurent Vivier
2020-11-04 21:22   ` Laurent Vivier
2020-10-30  0:40 ` [PATCH v2 5/8] target/sparc/translate: " Chen Qun
2020-10-30  0:40 ` [PATCH v2 6/8] target/sparc/win_helper: " Chen Qun
2020-10-30  5:52   ` Richard Henderson
2020-10-30  6:32   ` Philippe Mathieu-Daudé
2020-10-30  0:40 ` [PATCH v2 7/8] ppc: Add a missing break for PPC6xx_INPUT_TBEN Chen Qun
2020-10-30 15:41   ` Thomas Huth
2020-10-31  5:01   ` David Gibson [this message]
2020-10-30  0:40 ` [PATCH v2 8/8] target/ppc: replaced the TODO with LOG_UNIMP and add break for silence warnings Chen Qun
2020-10-30  6:33   ` Philippe Mathieu-Daudé
2020-10-30 15:43   ` Thomas Huth
2020-10-31  5:01   ` David Gibson

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=20201031050102.GA17638@yekko.fritz.box \
    --to=david@gibson.dropbear.id.au \
    --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=thuth@redhat.com \
    --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).