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.ro...@huawei.com> > Signed-off-by: Chen Qun <kuhn.chen...@huawei.com> > Reviewed-by: Philippe Mathieu-Daudé <f4...@amsat.org> > Reviewed-by: Thomas Huth <th...@redhat.com> > Acked-by: David Gibson <da...@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 <th...@redhat.com> > Cc: David Gibson <da...@gibson.dropbear.id.au> > Cc: Philippe Mathieu-Daudé <phi...@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
signature.asc
Description: PGP signature