From patchwork Fri Dec 11 04:14:45 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: David Gibson X-Patchwork-Id: 1414710 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=nongnu.org (client-ip=209.51.188.17; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=gibson.dropbear.id.au Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=gibson.dropbear.id.au header.i=@gibson.dropbear.id.au header.a=rsa-sha256 header.s=201602 header.b=Hag8G2gj; dkim-atps=neutral Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4Cscyz6Jgsz9sVs for ; Fri, 11 Dec 2020 15:20:43 +1100 (AEDT) Received: from localhost ([::1]:59788 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1knZv7-0001nN-R9 for incoming@patchwork.ozlabs.org; Thu, 10 Dec 2020 23:20:41 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:34000) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1knZq9-0005db-Rl; Thu, 10 Dec 2020 23:15:33 -0500 Received: from bilbo.ozlabs.org ([203.11.71.1]:45309 helo=ozlabs.org) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1knZq6-0000j0-Qu; Thu, 10 Dec 2020 23:15:33 -0500 Received: by ozlabs.org (Postfix, from userid 1007) id 4Cscrb2JBGz9sWk; Fri, 11 Dec 2020 15:15:11 +1100 (AEDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gibson.dropbear.id.au; s=201602; t=1607660111; bh=VCi/RL9feCBuXYp0mnHX3j7nsht0uB1kvqEeq6F3O7A=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Hag8G2gjb8e4tLhgMQ0uDaIDWXqZ+Ou4vS8JBu8wO597OV+T+tS70r907mWYBSdqE KkpbZy5KJc+m9B6hopusbjVgSE8aLcu9DI+L6m9/BSaTbLKzx/JjNr9/3YXqg3IHHA NlQs1yVMYCDldZK5aKp1ltpFZgGCwSoWor0JtzdE= From: David Gibson To: peter.maydell@linaro.org Subject: [PULL 08/30] target/ppc: replaced the TODO with LOG_UNIMP and add break for silence warnings Date: Fri, 11 Dec 2020 15:14:45 +1100 Message-Id: <20201211041507.425378-9-david@gibson.dropbear.id.au> X-Mailer: git-send-email 2.29.2 In-Reply-To: <20201211041507.425378-1-david@gibson.dropbear.id.au> References: <20201211041507.425378-1-david@gibson.dropbear.id.au> MIME-Version: 1.0 Received-SPF: pass client-ip=203.11.71.1; envelope-from=dgibson@ozlabs.org; helo=ozlabs.org X-Spam_score_int: -17 X-Spam_score: -1.8 X-Spam_bar: - X-Spam_report: (-1.8 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, HEADER_FROM_DIFFERENT_DOMAINS=0.25, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Thomas Huth , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , qemu-devel@nongnu.org, groug@kaod.org, qemu-ppc@nongnu.org, Euler Robot , Chen Qun , David Gibson Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: "Qemu-devel" From: Chen Qun 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 Signed-off-by: Chen Qun Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Thomas Huth Acked-by: David Gibson Message-Id: <20201116024810.2415819-8-kuhn.chenqun@huawei.com> Signed-off-by: David Gibson --- 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 064d2e8d13..9f22b66ea9 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__);