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,
	"Philippe Mathieu-Daudé" <f4bug@amsat.org>,
	qemu-devel@nongnu.org, ganqixin@huawei.com,
	"Euler Robot" <euler.robot@huawei.com>,
	"Philippe Mathieu-Daudé" <philmd@redhat.com>
Subject: Re: [PATCH v3 7/7] target/ppc: replaced the TODO with LOG_UNIMP and add break for silence warnings
Date: Mon, 23 Nov 2020 16:45:10 +1100	[thread overview]
Message-ID: <20201123054510.GR521467@yekko.fritz.box> (raw)
In-Reply-To: <20201116024810.2415819-8-kuhn.chenqun@huawei.com>

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

On Mon, Nov 16, 2020 at 10:48:10AM +0800, Chen Qun wrote:
> When using -Wimplicit-fallthrough in our CFLAGS, the compiler showed warning:
> target/ppc/mmu_helper.c: In function ‘dump_mmu’:
> target/ppc/mmu_helper.c:1351:12: warning: this statement may fall through [-Wimplicit-fallthrough=]
>  1351 |         if (ppc64_v3_radix(env_archcpu(env))) {
>       |            ^
> target/ppc/mmu_helper.c:1358:5: note: here
>  1358 |     default:
>       |     ^~~~~~~
> 
> Use "qemu_log_mask(LOG_UNIMP**)" instead of the TODO comment.
> And add the break statement to fix it.
> 
> Reported-by: Euler Robot <euler.robot@huawei.com>
> Signed-off-by: Chen Qun <kuhn.chenqun@huawei.com>
> Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
> Reviewed-by: Thomas Huth <thuth@redhat.com>
> Acked-by: David Gibson <david@gibson.dropbear.id.au>

Applied to ppc-for-6.0, thanks.

> ---
> v1->v2: replace the TODO by a LOG_UNIMP call and add break statement(Base on Philippe's comments)
> 
> Cc: Thomas Huth <thuth@redhat.com>
> Cc: David Gibson <david@gibson.dropbear.id.au>
> Cc: Philippe Mathieu-Daudé <philmd@redhat.com>
> ---
>  target/ppc/mmu_helper.c | 5 +++--
>  1 file changed, 3 insertions(+), 2 deletions(-)
> 
> diff --git a/target/ppc/mmu_helper.c b/target/ppc/mmu_helper.c
> index 8972714775..3bb50546f8 100644
> --- a/target/ppc/mmu_helper.c
> +++ b/target/ppc/mmu_helper.c
> @@ -1349,11 +1349,12 @@ void dump_mmu(CPUPPCState *env)
>          break;
>      case POWERPC_MMU_3_00:
>          if (ppc64_v3_radix(env_archcpu(env))) {
> -            /* TODO - Unsupported */
> +            qemu_log_mask(LOG_UNIMP, "%s: the PPC64 MMU is unsupported\n",
> +                          __func__);
>          } else {
>              dump_slb(env_archcpu(env));
> -            break;
>          }
> +        break;
>  #endif
>      default:
>          qemu_log_mask(LOG_UNIMP, "%s: unimplemented\n", __func__);

-- 
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-11-23  6:20 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-11-16  2:48 [PATCH v3 0/7] silence the compiler warnings Chen Qun
2020-11-16  2:48 ` [PATCH v3 1/7] target/i386: silence the compiler warnings in gen_shiftd_rm_T1 Chen Qun
2020-11-16  2:48 ` [PATCH v3 2/7] hw/intc/arm_gicv3_kvm: silence the compiler warnings Chen Qun
2020-11-16  2:48 ` [PATCH v3 3/7] accel/tcg/user-exec: " Chen Qun
2020-11-16 13:36   ` Alex Bennée
2020-11-16  2:48 ` [PATCH v3 4/7] target/sparc/translate: " Chen Qun
2020-11-16  2:48 ` [PATCH v3 5/7] target/sparc/win_helper: " Chen Qun
2020-11-16  2:48 ` [PATCH v3 6/7] ppc: Add a missing break for PPC6xx_INPUT_TBEN Chen Qun
2020-11-16 11:46   ` [PATCH-for-5.2 " Philippe Mathieu-Daudé
2020-11-23  5:46     ` David Gibson
2020-11-23  5:46   ` [PATCH " David Gibson
2020-11-16  2:48 ` [PATCH v3 7/7] target/ppc: replaced the TODO with LOG_UNIMP and add break for silence warnings Chen Qun
2020-11-23  5:45   ` David Gibson [this message]
2020-12-11  2:22 ` [PATCH v3 0/7] silence the compiler warnings Chenqun (kuhn)
2020-12-11  8:30   ` Thomas Huth

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=20201123054510.GR521467@yekko.fritz.box \
    --to=david@gibson.dropbear.id.au \
    --cc=euler.robot@huawei.com \
    --cc=f4bug@amsat.org \
    --cc=ganqixin@huawei.com \
    --cc=kuhn.chenqun@huawei.com \
    --cc=philmd@redhat.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).