From nobody Mon May 20 13:51:19 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org ARC-Seal: i=1; a=rsa-sha256; t=1604020297; cv=none; d=zohomail.com; s=zohoarc; b=ZIigAB0SoFRJShuDyN/M3meJH3hJpXS+A9K9goOg7o0e682c9qZcQK5Y2wqF6ZJYba4RhEpHBbmuimlONb7giByQK4DlorsbFbZaKryRoSRKkfY5UirxYlfGtxMlO6QZdkuQBMaZQP519FHs276SnyKSUALyXAyOgR+JiuDC8zE= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1604020297; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=IHvwWzbFt7uNHDyZkNjkuP9W/XkCcmcfuq/Mxq2J0g0=; b=k+7ygRmSA3sFcXuwTre0ciHACdWQAHpY/uELlmAhk9Q8aFoDyFf/kzhhCqEl5aEURh7l4tLm/8sCTiTnIp7gy6otLbKKl9fYem2o+NGQ06lFRKRKMNMjHXMkvUT5Dq3zE3gabJ5Ckgio6kWp8wqmuPbz7v8xmMooK8c3uAyy5aw= ARC-Authentication-Results: i=1; mx.zohomail.com; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1604020297410935.7224388417261; Thu, 29 Oct 2020 18:11:37 -0700 (PDT) Received: from localhost ([::1]:54808 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kYIx6-0005DJ-3L for importer@patchew.org; Thu, 29 Oct 2020 21:11:36 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:44938) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kYITp-0001W9-9r; Thu, 29 Oct 2020 20:41:21 -0400 Received: from szxga04-in.huawei.com ([45.249.212.190]:2368) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kYITm-00013k-Lq; Thu, 29 Oct 2020 20:41:20 -0400 Received: from DGGEMS409-HUB.china.huawei.com (unknown [172.30.72.58]) by szxga04-in.huawei.com (SkyGuard) with ESMTP id 4CMk583tpYz15PJ7; Fri, 30 Oct 2020 08:41:16 +0800 (CST) Received: from huawei.com (10.175.104.175) by DGGEMS409-HUB.china.huawei.com (10.3.19.209) with Microsoft SMTP Server id 14.3.487.0; Fri, 30 Oct 2020 08:41:03 +0800 From: Chen Qun To: , Subject: [PATCH v2 1/8] target/i386: silence the compiler warnings in gen_shiftd_rm_T1 Date: Fri, 30 Oct 2020 08:40:39 +0800 Message-ID: <20201030004046.2191790-2-kuhn.chenqun@huawei.com> X-Mailer: git-send-email 2.23.0 In-Reply-To: <20201030004046.2191790-1-kuhn.chenqun@huawei.com> References: <20201030004046.2191790-1-kuhn.chenqun@huawei.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-Originating-IP: [10.175.104.175] X-CFilter-Loop: Reflected Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=45.249.212.190; envelope-from=kuhn.chenqun@huawei.com; helo=szxga04-in.huawei.com X-detected-operating-system: by eggs.gnu.org: First seen = 2020/10/29 20:41:14 X-ACL-Warn: Detected OS = Linux 3.1-3.10 [fuzzy] X-Spam_score_int: -41 X-Spam_score: -4.2 X-Spam_bar: ---- X-Spam_report: (-4.2 / 5.0 requ) BAYES_00=-1.9, RCVD_IN_DNSWL_MED=-2.3, RCVD_IN_MSPIKE_H4=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham 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 , zhang.zhanghailiang@huawei.com, Richard Henderson , Paolo Bonzini , ganqixin@huawei.com, Euler Robot , Chen Qun , Eduardo Habkost Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" The current "#ifdef TARGET_X86_64" statement affects the compiler's determination of fall through. When using -Wimplicit-fallthrough in our CFLAGS, the compiler showed warnin= g: target/i386/translate.c: In function =E2=80=98gen_shiftd_rm_T1=E2=80=99: target/i386/translate.c:1773:12: warning: this statement may fall through [= -Wimplicit-fallthrough=3D] if (is_right) { ^ target/i386/translate.c:1782:5: note: here case MO_32: ^~~~ Reported-by: Euler Robot Signed-off-by: Chen Qun Reviewed-by: Richard Henderson Reviewed-by: Thomas Huth --- v1->v2: Add comments to explain the two case of fall through, depending on whether TARGET_X86_64 is defined. Cc: Thomas Huth Cc: Paolo Bonzini Cc: Richard Henderson Cc: Eduardo Habkost --- target/i386/translate.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/target/i386/translate.c b/target/i386/translate.c index caea6f5fb1..77cb66208e 100644 --- a/target/i386/translate.c +++ b/target/i386/translate.c @@ -1777,9 +1777,12 @@ static void gen_shiftd_rm_T1(DisasContext *s, MemOp = ot, int op1, } else { tcg_gen_deposit_tl(s->T1, s->T0, s->T1, 16, 16); } - /* FALLTHRU */ -#ifdef TARGET_X86_64 + /* + * If TARGET_X86_64 defined then fall through into MO_32 case, + * otherwise fall through default case. + */ case MO_32: +#ifdef TARGET_X86_64 /* Concatenate the two 32-bit values and use a 64-bit shift. */ tcg_gen_subi_tl(s->tmp0, count, 1); if (is_right) { --=20 2.27.0 From nobody Mon May 20 13:51:19 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org ARC-Seal: i=1; a=rsa-sha256; t=1604020371; cv=none; d=zohomail.com; s=zohoarc; b=hmykQ2bXxhxDOw5orOdNy4Y6WnJRA1AF7EOi52/AqEGF0aF/Zb0abuZAjyQxDSxPUtDMfFDiB2UIxGhuHpjBjn23dAZ6P2iR89YRtz6SagazwHOKt5HYAQ3qPwj9GW79oxmwO/kR3JdeXVynTDBtcaeCjfWl+Z6yfh/UNGyZS+Q= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1604020371; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=9jA5dqeRnYFwBkFB6LYnGruoT0nTnUFeD6X8J769Ciw=; b=lD5OCGH2HnJ+TX0OU+/8NwHO+U8A6604uBuRCkLtn+a1bMSYh0RZEKQ9p3Tqhp9UsMkM4P1Bod4t5uBy+fTlf/R+VRqQzoGDgPW/dDPK/L72s7sNT3VRpSwjhiTODPDl10RgYf8NE/KjgQ23iN1c8jZRAz7Eou/nNCK+ZnOArhc= ARC-Authentication-Results: i=1; mx.zohomail.com; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 160402037158237.519612509642684; Thu, 29 Oct 2020 18:12:51 -0700 (PDT) Received: from localhost ([::1]:59078 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kYIyI-0006yV-Ih for importer@patchew.org; Thu, 29 Oct 2020 21:12:50 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:44956) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kYITq-0001Xm-94; Thu, 29 Oct 2020 20:41:23 -0400 Received: from szxga04-in.huawei.com ([45.249.212.190]:2313) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kYITm-00013h-MX; Thu, 29 Oct 2020 20:41:21 -0400 Received: from DGGEMS409-HUB.china.huawei.com (unknown [172.30.72.58]) by szxga04-in.huawei.com (SkyGuard) with ESMTP id 4CMk574mdjzkbpt; Fri, 30 Oct 2020 08:41:15 +0800 (CST) Received: from huawei.com (10.175.104.175) by DGGEMS409-HUB.china.huawei.com (10.3.19.209) with Microsoft SMTP Server id 14.3.487.0; Fri, 30 Oct 2020 08:41:05 +0800 From: Chen Qun To: , Subject: [PATCH v2 2/8] hw/intc/arm_gicv3_kvm: silence the compiler warnings Date: Fri, 30 Oct 2020 08:40:40 +0800 Message-ID: <20201030004046.2191790-3-kuhn.chenqun@huawei.com> X-Mailer: git-send-email 2.23.0 In-Reply-To: <20201030004046.2191790-1-kuhn.chenqun@huawei.com> References: <20201030004046.2191790-1-kuhn.chenqun@huawei.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-Originating-IP: [10.175.104.175] X-CFilter-Loop: Reflected Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=45.249.212.190; envelope-from=kuhn.chenqun@huawei.com; helo=szxga04-in.huawei.com X-detected-operating-system: by eggs.gnu.org: First seen = 2020/10/29 20:41:14 X-ACL-Warn: Detected OS = Linux 3.1-3.10 [fuzzy] X-Spam_score_int: -41 X-Spam_score: -4.2 X-Spam_bar: ---- X-Spam_report: (-4.2 / 5.0 requ) BAYES_00=-1.9, RCVD_IN_DNSWL_MED=-2.3, RCVD_IN_MSPIKE_H4=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham 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: Peter Maydell , zhang.zhanghailiang@huawei.com, qemu-arm@nongnu.org, ganqixin@huawei.com, Euler Robot , Chen Qun Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" When using -Wimplicit-fallthrough in our CFLAGS, the compiler showed warnin= g: hw/intc/arm_gicv3_kvm.c: In function =E2=80=98kvm_arm_gicv3_put=E2=80=99: hw/intc/arm_gicv3_kvm.c:484:13: warning: this statement may fall through [-= Wimplicit-fallthrough=3D] kvm_gicc_access(s, ICC_AP0R_EL1(1), ncpu, ®64, true); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ hw/intc/arm_gicv3_kvm.c:485:9: note: here default: ^~~~~~~ hw/intc/arm_gicv3_kvm.c:495:13: warning: this statement may fall through [-= Wimplicit-fallthrough=3D] kvm_gicc_access(s, ICC_AP1R_EL1(2), ncpu, ®64, true); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ hw/intc/arm_gicv3_kvm.c:496:9: note: here case 6: ^~~~ hw/intc/arm_gicv3_kvm.c:498:13: warning: this statement may fall through [-= Wimplicit-fallthrough=3D] kvm_gicc_access(s, ICC_AP1R_EL1(1), ncpu, ®64, true); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ hw/intc/arm_gicv3_kvm.c:499:9: note: here default: ^~~~~~~ hw/intc/arm_gicv3_kvm.c: In function =E2=80=98kvm_arm_gicv3_get=E2=80=99: hw/intc/arm_gicv3_kvm.c:634:37: warning: this statement may fall through [-= Wimplicit-fallthrough=3D] c->icc_apr[GICV3_G0][2] =3D reg64; ~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~ hw/intc/arm_gicv3_kvm.c:635:9: note: here case 6: ^~~~ hw/intc/arm_gicv3_kvm.c:637:37: warning: this statement may fall through [-= Wimplicit-fallthrough=3D] c->icc_apr[GICV3_G0][1] =3D reg64; ~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~ hw/intc/arm_gicv3_kvm.c:638:9: note: here default: ^~~~~~~ hw/intc/arm_gicv3_kvm.c:648:39: warning: this statement may fall through [-= Wimplicit-fallthrough=3D] c->icc_apr[GICV3_G1NS][2] =3D reg64; ~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~ hw/intc/arm_gicv3_kvm.c:649:9: note: here case 6: ^~~~ hw/intc/arm_gicv3_kvm.c:651:39: warning: this statement may fall through [-= Wimplicit-fallthrough=3D] c->icc_apr[GICV3_G1NS][1] =3D reg64; ~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~ hw/intc/arm_gicv3_kvm.c:652:9: note: here default: ^~~~~~~ Reported-by: Euler Robot Signed-off-by: Chen Qun Reviewed-by: Peter Maydell --- Cc: Peter Maydell Cc: qemu-arm@nongnu.org --- hw/intc/arm_gicv3_kvm.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/hw/intc/arm_gicv3_kvm.c b/hw/intc/arm_gicv3_kvm.c index 187eb054e0..d040a5d1e9 100644 --- a/hw/intc/arm_gicv3_kvm.c +++ b/hw/intc/arm_gicv3_kvm.c @@ -478,9 +478,11 @@ static void kvm_arm_gicv3_put(GICv3State *s) kvm_gicc_access(s, ICC_AP0R_EL1(3), ncpu, ®64, true); reg64 =3D c->icc_apr[GICV3_G0][2]; kvm_gicc_access(s, ICC_AP0R_EL1(2), ncpu, ®64, true); + /* fall through */ case 6: reg64 =3D c->icc_apr[GICV3_G0][1]; kvm_gicc_access(s, ICC_AP0R_EL1(1), ncpu, ®64, true); + /* fall through */ default: reg64 =3D c->icc_apr[GICV3_G0][0]; kvm_gicc_access(s, ICC_AP0R_EL1(0), ncpu, ®64, true); @@ -492,9 +494,11 @@ static void kvm_arm_gicv3_put(GICv3State *s) kvm_gicc_access(s, ICC_AP1R_EL1(3), ncpu, ®64, true); reg64 =3D c->icc_apr[GICV3_G1NS][2]; kvm_gicc_access(s, ICC_AP1R_EL1(2), ncpu, ®64, true); + /* fall through */ case 6: reg64 =3D c->icc_apr[GICV3_G1NS][1]; kvm_gicc_access(s, ICC_AP1R_EL1(1), ncpu, ®64, true); + /* fall through */ default: reg64 =3D c->icc_apr[GICV3_G1NS][0]; kvm_gicc_access(s, ICC_AP1R_EL1(0), ncpu, ®64, true); @@ -631,9 +635,11 @@ static void kvm_arm_gicv3_get(GICv3State *s) c->icc_apr[GICV3_G0][3] =3D reg64; kvm_gicc_access(s, ICC_AP0R_EL1(2), ncpu, ®64, false); c->icc_apr[GICV3_G0][2] =3D reg64; + /* fall through */ case 6: kvm_gicc_access(s, ICC_AP0R_EL1(1), ncpu, ®64, false); c->icc_apr[GICV3_G0][1] =3D reg64; + /* fall through */ default: kvm_gicc_access(s, ICC_AP0R_EL1(0), ncpu, ®64, false); c->icc_apr[GICV3_G0][0] =3D reg64; @@ -645,9 +651,11 @@ static void kvm_arm_gicv3_get(GICv3State *s) c->icc_apr[GICV3_G1NS][3] =3D reg64; kvm_gicc_access(s, ICC_AP1R_EL1(2), ncpu, ®64, false); c->icc_apr[GICV3_G1NS][2] =3D reg64; + /* fall through */ case 6: kvm_gicc_access(s, ICC_AP1R_EL1(1), ncpu, ®64, false); c->icc_apr[GICV3_G1NS][1] =3D reg64; + /* fall through */ default: kvm_gicc_access(s, ICC_AP1R_EL1(0), ncpu, ®64, false); c->icc_apr[GICV3_G1NS][0] =3D reg64; --=20 2.27.0 From nobody Mon May 20 13:51:19 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org ARC-Seal: i=1; a=rsa-sha256; t=1604020199; cv=none; d=zohomail.com; s=zohoarc; b=JR9s04o9u9anV4YArfZH7rGsMVZndreGxGrauWsXvgmuAMNqzLagx+sg3B5gf7DTRTuOp2AgGtWFkzO0nfE58lTcKCa9mAwiw6kz6pgQoLhhogx+BOmX1B+srQjVgI+qO8fz6qUgK961YHEFhGmy8GBAHt8GVSJarJHNCPXSsSo= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1604020199; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=zL2npiykSx9bZl7prLMPR92WvjVJyaxwGKj+xKuhmj4=; b=lBAGg/sbdVJqQ3TouChz3SfG5XuoX8qsrnAUVNz1lsNRI9uZQpnjZwXAkeEuRJNeoCDGeHmzw9woNlNmC5XOYpj4RYwVg3mxsCYO9TJbqDcaIccc+y4FcStA3u5pdPhjx6hZnzTph6Wdh+43hBpNiE2A9M+E48qsraVI1d/axGM= ARC-Authentication-Results: i=1; mx.zohomail.com; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1604020199537332.98351075049845; Thu, 29 Oct 2020 18:09:59 -0700 (PDT) Received: from localhost ([::1]:51232 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kYIvW-0003co-EB for importer@patchew.org; Thu, 29 Oct 2020 21:09:58 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:44928) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kYITo-0001W0-R8; Thu, 29 Oct 2020 20:41:20 -0400 Received: from szxga04-in.huawei.com ([45.249.212.190]:2367) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kYITm-00013j-HI; Thu, 29 Oct 2020 20:41:20 -0400 Received: from DGGEMS409-HUB.china.huawei.com (unknown [172.30.72.58]) by szxga04-in.huawei.com (SkyGuard) with ESMTP id 4CMk583hqkz15PJ5; Fri, 30 Oct 2020 08:41:16 +0800 (CST) Received: from huawei.com (10.175.104.175) by DGGEMS409-HUB.china.huawei.com (10.3.19.209) with Microsoft SMTP Server id 14.3.487.0; Fri, 30 Oct 2020 08:41:06 +0800 From: Chen Qun To: , Subject: [PATCH v2 3/8] accel/tcg/user-exec: silence the compiler warnings Date: Fri, 30 Oct 2020 08:40:41 +0800 Message-ID: <20201030004046.2191790-4-kuhn.chenqun@huawei.com> X-Mailer: git-send-email 2.23.0 In-Reply-To: <20201030004046.2191790-1-kuhn.chenqun@huawei.com> References: <20201030004046.2191790-1-kuhn.chenqun@huawei.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-Originating-IP: [10.175.104.175] X-CFilter-Loop: Reflected Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=45.249.212.190; envelope-from=kuhn.chenqun@huawei.com; helo=szxga04-in.huawei.com X-detected-operating-system: by eggs.gnu.org: First seen = 2020/10/29 20:41:14 X-ACL-Warn: Detected OS = Linux 3.1-3.10 [fuzzy] X-Spam_score_int: -41 X-Spam_score: -4.2 X-Spam_bar: ---- X-Spam_report: (-4.2 / 5.0 requ) BAYES_00=-1.9, RCVD_IN_DNSWL_MED=-2.3, RCVD_IN_MSPIKE_H4=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham 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 , zhang.zhanghailiang@huawei.com, Riku Voipio , Richard Henderson , Paolo Bonzini , ganqixin@huawei.com, Euler Robot , Chen Qun Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" When using -Wimplicit-fallthrough in our CFLAGS, the compiler showed warnin= g: ../accel/tcg/user-exec.c: In function =E2=80=98handle_cpu_signal=E2=80=99: ../accel/tcg/user-exec.c:169:13: warning: this statement may fall through [= -Wimplicit-fallthrough=3D] 169 | cpu_exit_tb_from_sighandler(cpu, old_set); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ../accel/tcg/user-exec.c:172:9: note: here 172 | default: Mark the cpu_exit_tb_from_sighandler() function with QEMU_NORETURN to fix i= t. Reported-by: Euler Robot Signed-off-by: Chen Qun Reviewed-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Richard Henderson Reviewed-by: Thomas Huth --- v1->v2: Add QEMU_NORETURN to cpu_exit_tb_from_sighandler() function to avoid the compiler warnings(Base on Thomas's and Richard's comments). Cc: Thomas Huth Cc: Riku Voipio Cc: Richard Henderson Cc: Paolo Bonzini --- accel/tcg/user-exec.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/accel/tcg/user-exec.c b/accel/tcg/user-exec.c index 4ebe25461a..293ee86ea4 100644 --- a/accel/tcg/user-exec.c +++ b/accel/tcg/user-exec.c @@ -49,7 +49,8 @@ __thread uintptr_t helper_retaddr; /* exit the current TB from a signal handler. The host registers are restored in a state compatible with the CPU emulator */ -static void cpu_exit_tb_from_sighandler(CPUState *cpu, sigset_t *old_set) +static void QEMU_NORETURN cpu_exit_tb_from_sighandler(CPUState *cpu, + sigset_t *old_set) { /* XXX: use siglongjmp ? */ sigprocmask(SIG_SETMASK, old_set, NULL); --=20 2.27.0 From nobody Mon May 20 13:51:19 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org ARC-Seal: i=1; a=rsa-sha256; t=1604018728; cv=none; d=zohomail.com; s=zohoarc; b=nY0CqzuJ1EzclFd2D3Sf08cRzVgbvDWFWd/ZGoBeSkiIXFB4/ThFjAx5sw2ceMAEIvssbulFwK4U65kggXMDpTU0mmSKSm13zjeK+jLQapPHki+tWtW/UfkOIPre67WCzzYQVNO8CxLE0kibr4HurUq+7SmJBzHPjNCeWWuG9Ac= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1604018728; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=svnswBMNvO9U8eHP+epnLcb8CUgVpg/BphC1ph3vhCw=; b=TXCEkhVNermI4b/iQFtx/H+MrPtwzncElo/diDNGlptWy/uFE+5mKj4uhDGMweez9YDTJ+DqypTABaVF/TOufTAv5o8oe+ZSTGsABXqt/bbSKzpZ9AJgSKahIpplU7GnpeTfrFy8K1gJdmBk7sqlL1RYbeQR2sTMuTLJoYIE01Q= ARC-Authentication-Results: i=1; mx.zohomail.com; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1604018728894929.4864201821606; Thu, 29 Oct 2020 17:45:28 -0700 (PDT) Received: from localhost ([::1]:33674 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kYIXn-0006Y8-Qu for importer@patchew.org; Thu, 29 Oct 2020 20:45:27 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:44946) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kYITp-0001WP-Dz; Thu, 29 Oct 2020 20:41:21 -0400 Received: from szxga04-in.huawei.com ([45.249.212.190]:2366) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kYITm-00013i-NU; Thu, 29 Oct 2020 20:41:21 -0400 Received: from DGGEMS409-HUB.china.huawei.com (unknown [172.30.72.58]) by szxga04-in.huawei.com (SkyGuard) with ESMTP id 4CMk583W8Wz15PJ3; Fri, 30 Oct 2020 08:41:16 +0800 (CST) Received: from huawei.com (10.175.104.175) by DGGEMS409-HUB.china.huawei.com (10.3.19.209) with Microsoft SMTP Server id 14.3.487.0; Fri, 30 Oct 2020 08:41:08 +0800 From: Chen Qun To: , Subject: [PATCH v2 4/8] linux-user/mips/cpu_loop: silence the compiler warnings Date: Fri, 30 Oct 2020 08:40:42 +0800 Message-ID: <20201030004046.2191790-5-kuhn.chenqun@huawei.com> X-Mailer: git-send-email 2.23.0 In-Reply-To: <20201030004046.2191790-1-kuhn.chenqun@huawei.com> References: <20201030004046.2191790-1-kuhn.chenqun@huawei.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-Originating-IP: [10.175.104.175] X-CFilter-Loop: Reflected Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=45.249.212.190; envelope-from=kuhn.chenqun@huawei.com; helo=szxga04-in.huawei.com X-detected-operating-system: by eggs.gnu.org: First seen = 2020/10/29 20:41:14 X-ACL-Warn: Detected OS = Linux 3.1-3.10 [fuzzy] X-Spam_score_int: -41 X-Spam_score: -4.2 X-Spam_bar: ---- X-Spam_report: (-4.2 / 5.0 requ) BAYES_00=-1.9, RCVD_IN_DNSWL_MED=-2.3, RCVD_IN_MSPIKE_H4=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham 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 , zhang.zhanghailiang@huawei.com, Laurent Vivier , ganqixin@huawei.com, Euler Robot , Chen Qun Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" When using -Wimplicit-fallthrough in our CFLAGS, the compiler showed warnin= g: linux-user/mips/cpu_loop.c: In function =E2=80=98cpu_loop=E2=80=99: linux-user/mips/cpu_loop.c:104:24: warning: this statement may fall through= [-Wimplicit-fallthrough=3D] 104 | if ((ret =3D get_user_ual(arg8, sp_reg + 28)) != =3D 0) { | ^ linux-user/mips/cpu_loop.c:107:17: note: here 107 | case 7: | ^~~~ linux-user/mips/cpu_loop.c:108:24: warning: this statement may fall through= [-Wimplicit-fallthrough=3D] 108 | if ((ret =3D get_user_ual(arg7, sp_reg + 24)) != =3D 0) { | ^ linux-user/mips/cpu_loop.c:111:17: note: here 111 | case 6: | ^~~~ linux-user/mips/cpu_loop.c:112:24: warning: this statement may fall through= [-Wimplicit-fallthrough=3D] 112 | if ((ret =3D get_user_ual(arg6, sp_reg + 20)) != =3D 0) { | ^ linux-user/mips/cpu_loop.c:115:17: note: here 115 | case 5: | ^~~~ Add the corresponding "fall through" comment to fix it. Reported-by: Euler Robot Signed-off-by: Chen Qun Reviewed-by: Thomas Huth Reviewed-by: Laurent Vivier --- Cc: Laurent Vivier --- linux-user/mips/cpu_loop.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/linux-user/mips/cpu_loop.c b/linux-user/mips/cpu_loop.c index 553e8ca7f5..cfe7ba5c47 100644 --- a/linux-user/mips/cpu_loop.c +++ b/linux-user/mips/cpu_loop.c @@ -104,18 +104,22 @@ void cpu_loop(CPUMIPSState *env) if ((ret =3D get_user_ual(arg8, sp_reg + 28)) !=3D 0) { goto done_syscall; } + /* fall through */ case 7: if ((ret =3D get_user_ual(arg7, sp_reg + 24)) !=3D 0) { goto done_syscall; } + /* fall through */ case 6: if ((ret =3D get_user_ual(arg6, sp_reg + 20)) !=3D 0) { goto done_syscall; } + /* fall through */ case 5: if ((ret =3D get_user_ual(arg5, sp_reg + 16)) !=3D 0) { goto done_syscall; } + /* fall through */ default: break; } --=20 2.27.0 From nobody Mon May 20 13:51:19 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org ARC-Seal: i=1; a=rsa-sha256; t=1604018905; cv=none; d=zohomail.com; s=zohoarc; b=OYxD3YNO9JYR0j3ZAjDy1fFJABF6KTLswscyKTGpIXbKIzmYKLaJD9ds2PatCknWM+iyzK3ggZrnxOVzNQzK/IndRJr1fRZYtptZN7uax1B21asKM30hBDztup0mQirP0Yr1hcmmWtNFcZH7f96oChTadoNJMLAZvdS0H6vb3lo= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1604018905; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=Rd+Aj0i7JMrB2PZXNbDZdQh9T8smmT9mrrSMAPzQPWI=; b=cY1MQ2beKDn0MKytCVcJDa928jEXgj6nPxMT0O5WdPTYR48vpnK3K8XQclLnU5q5G8qYVqOC2U95DgpmB3oq1XdXE89u2lSI96CTYHtCAoZf81JOEvXYg2/LRQqZI+P4jahytNDlL2Qih2H2zgKenTE3/X3PyQ2f8dxKpuGdS6s= ARC-Authentication-Results: i=1; mx.zohomail.com; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1604018905387759.5459364819094; Thu, 29 Oct 2020 17:48:25 -0700 (PDT) Received: from localhost ([::1]:43226 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kYIae-00025K-9b for importer@patchew.org; Thu, 29 Oct 2020 20:48:24 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:45014) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kYITt-0001ao-8X; Thu, 29 Oct 2020 20:41:25 -0400 Received: from szxga06-in.huawei.com ([45.249.212.32]:2060) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kYITq-00014N-Dr; Thu, 29 Oct 2020 20:41:24 -0400 Received: from DGGEMS409-HUB.china.huawei.com (unknown [172.30.72.60]) by szxga06-in.huawei.com (SkyGuard) with ESMTP id 4CMk5G3Bpdzhd2m; Fri, 30 Oct 2020 08:41:22 +0800 (CST) Received: from huawei.com (10.175.104.175) by DGGEMS409-HUB.china.huawei.com (10.3.19.209) with Microsoft SMTP Server id 14.3.487.0; Fri, 30 Oct 2020 08:41:09 +0800 From: Chen Qun To: , Subject: [PATCH v2 5/8] target/sparc/translate: silence the compiler warnings Date: Fri, 30 Oct 2020 08:40:43 +0800 Message-ID: <20201030004046.2191790-6-kuhn.chenqun@huawei.com> X-Mailer: git-send-email 2.23.0 In-Reply-To: <20201030004046.2191790-1-kuhn.chenqun@huawei.com> References: <20201030004046.2191790-1-kuhn.chenqun@huawei.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-Originating-IP: [10.175.104.175] X-CFilter-Loop: Reflected Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=45.249.212.32; envelope-from=kuhn.chenqun@huawei.com; helo=szxga06-in.huawei.com X-detected-operating-system: by eggs.gnu.org: First seen = 2020/10/29 20:41:10 X-ACL-Warn: Detected OS = Linux 3.1-3.10 [fuzzy] X-Spam_score_int: -41 X-Spam_score: -4.2 X-Spam_bar: ---- X-Spam_report: (-4.2 / 5.0 requ) BAYES_00=-1.9, RCVD_IN_DNSWL_MED=-2.3, RCVD_IN_MSPIKE_H4=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham 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: zhang.zhanghailiang@huawei.com, Mark Cave-Ayland , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , ganqixin@huawei.com, Euler Robot , Chen Qun , Artyom Tarasenko Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" When using -Wimplicit-fallthrough in our CFLAGS, the compiler showed warnin= g: target/sparc/translate.c: In function =E2=80=98gen_st_asi=E2=80=99: target/sparc/translate.c:2320:12: warning: this statement may fall through = [-Wimplicit-fallthrough=3D] 2320 | if (!(dc->def->features & CPU_FEATURE_HYPV)) { | ^ target/sparc/translate.c:2329:5: note: here 2329 | case GET_ASI_DIRECT: | ^~~~ The "fall through" statement place is not correctly identified by the compi= ler. Reported-by: Euler Robot Signed-off-by: Chen Qun Reviewed-by: Artyom Tarasenko Reviewed-by: Philippe Mathieu-Daud=C3=A9 --- Cc: Mark Cave-Ayland Cc: Artyom Tarasenko --- target/sparc/translate.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/target/sparc/translate.c b/target/sparc/translate.c index 1a4efd4ed6..a3d9aaa46b 100644 --- a/target/sparc/translate.c +++ b/target/sparc/translate.c @@ -2324,8 +2324,8 @@ static void gen_st_asi(DisasContext *dc, TCGv src, TC= Gv addr, } /* in OpenSPARC T1+ CPUs TWINX ASIs in store instructions * are ST_BLKINIT_ ASIs */ - /* fall through */ #endif + /* fall through */ case GET_ASI_DIRECT: gen_address_mask(dc, addr); tcg_gen_qemu_st_tl(src, addr, da.mem_idx, da.memop); --=20 2.27.0 From nobody Mon May 20 13:51:19 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org ARC-Seal: i=1; a=rsa-sha256; t=1604019179; cv=none; d=zohomail.com; s=zohoarc; b=lX1ZBiO/gAGouUWsOWpGdIW/eCzyFgSCpWcdWANo3fYUSYUobhdfEUn3l36SfwE2yTDT4JvtZiNza/I6Go7E4/C0ToBdGK+Fz45UAILJ+uALqGfNQ3pUcRL+y5+5X1b99AxrESXPWReSLlGzkhnawhxo5wapvHzvYTzfIVkrxdA= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1604019179; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=0oQTa2yxZpIJ3o0KiZFFnlfUJ5TGXv/lqS8uQcJ8e0E=; b=fx7tFlDLh2IBHjIZaGdM3q60rGefF6bLpp+VTrDCzdRWI2r5aVWGafxNzAvv174PqVWTCzP9lsTnX4ImCMMVdrI9HyQ+hWk8jIgvIW+TicuIMUj7i2ovB6eIDt89VmKfFLnLiP8tnUvlvkwCZp5ttSezE/TtiAo+jV9Ixo0tF/0= ARC-Authentication-Results: i=1; mx.zohomail.com; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1604019179144906.9856915867047; Thu, 29 Oct 2020 17:52:59 -0700 (PDT) Received: from localhost ([::1]:58586 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kYIf4-0008Sg-4Y for importer@patchew.org; Thu, 29 Oct 2020 20:52:58 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:45024) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kYITv-0001ff-2D; Thu, 29 Oct 2020 20:41:27 -0400 Received: from szxga06-in.huawei.com ([45.249.212.32]:2063) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kYITs-00014T-0H; Thu, 29 Oct 2020 20:41:26 -0400 Received: from DGGEMS409-HUB.china.huawei.com (unknown [172.30.72.60]) by szxga06-in.huawei.com (SkyGuard) with ESMTP id 4CMk5G3cqJzhd8P; Fri, 30 Oct 2020 08:41:22 +0800 (CST) Received: from huawei.com (10.175.104.175) by DGGEMS409-HUB.china.huawei.com (10.3.19.209) with Microsoft SMTP Server id 14.3.487.0; Fri, 30 Oct 2020 08:41:10 +0800 From: Chen Qun To: , Subject: [PATCH v2 6/8] target/sparc/win_helper: silence the compiler warnings Date: Fri, 30 Oct 2020 08:40:44 +0800 Message-ID: <20201030004046.2191790-7-kuhn.chenqun@huawei.com> X-Mailer: git-send-email 2.23.0 In-Reply-To: <20201030004046.2191790-1-kuhn.chenqun@huawei.com> References: <20201030004046.2191790-1-kuhn.chenqun@huawei.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-Originating-IP: [10.175.104.175] X-CFilter-Loop: Reflected Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=45.249.212.32; envelope-from=kuhn.chenqun@huawei.com; helo=szxga06-in.huawei.com X-detected-operating-system: by eggs.gnu.org: First seen = 2020/10/29 20:41:10 X-ACL-Warn: Detected OS = Linux 3.1-3.10 [fuzzy] X-Spam_score_int: -41 X-Spam_score: -4.2 X-Spam_bar: ---- X-Spam_report: (-4.2 / 5.0 requ) BAYES_00=-1.9, RCVD_IN_DNSWL_MED=-2.3, RCVD_IN_MSPIKE_H4=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham 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: zhang.zhanghailiang@huawei.com, Mark Cave-Ayland , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , ganqixin@huawei.com, Euler Robot , Chen Qun , Artyom Tarasenko Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" When using -Wimplicit-fallthrough in our CFLAGS, the compiler showed warnin= g: target/sparc/win_helper.c: In function =E2=80=98get_gregset=E2=80=99: target/sparc/win_helper.c:304:9: warning: this statement may fall through [= -Wimplicit-fallthrough=3D] 304 | trace_win_helper_gregset_error(pstate); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ target/sparc/win_helper.c:306:5: note: here 306 | case 0: | ^~~~ Add the corresponding "fall through" comment to fix it. Reported-by: Euler Robot Signed-off-by: Chen Qun Reviewed-by: Artyom Tarasenko Reviewed-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Richard Henderson --- v1->v2: Combine the /* fall through */ to the preceding comments (Base on Philippe's comments). Cc: Philippe Mathieu-Daud=C3=A9 Cc: Mark Cave-Ayland Cc: Artyom Tarasenko --- target/sparc/win_helper.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/target/sparc/win_helper.c b/target/sparc/win_helper.c index 8290a21142..e78660b60a 100644 --- a/target/sparc/win_helper.c +++ b/target/sparc/win_helper.c @@ -302,7 +302,7 @@ static inline uint64_t *get_gregset(CPUSPARCState *env,= uint32_t pstate) switch (pstate) { default: trace_win_helper_gregset_error(pstate); - /* pass through to normal set of global registers */ + /* fall through to normal set of global registers */ case 0: return env->bgregs; case PS_AG: --=20 2.27.0 From nobody Mon May 20 13:51:19 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org ARC-Seal: i=1; a=rsa-sha256; t=1604020306; cv=none; d=zohomail.com; s=zohoarc; b=XiU0+Uso2g9LRePnpBvRgbJZozJ+amZLd5el+/2ssUpdiETkVc+dMX3LPQUrt2jHPGX7bC5pUhiqtVyocafDX1rgfYHtvbhwqiPJsXU862FXWeU4R21sczhUtQw3cXOg7CcKbMfHd62lbFIa+CD+/tZqgTDbtIxehiktyz5bf2Q= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1604020306; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=ikWVJ9CS7LVPTNTnnnvO1JeKIrIJWHfKj+qKnG63ecs=; b=exvcC62eNm05xaSbDevCHxHRX5X7IY6+HY4p4yYlqXGAkYi60YR/ZKIcbswXcxg94Z/dofiDEnvOzPaAVSvKeq8CWl0F2upHVuFOli7g5/eSKq7lBkrA8YhfPwKAqmjNJPi5fSZVBVjDEDSXtKf2YtvPbFT6wbANvqc9zoszLno= ARC-Authentication-Results: i=1; mx.zohomail.com; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1604020306517251.84884588870966; Thu, 29 Oct 2020 18:11:46 -0700 (PDT) Received: from localhost ([::1]:55458 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kYIxF-0005Uy-HW for importer@patchew.org; Thu, 29 Oct 2020 21:11:45 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:45020) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kYITu-0001d3-2t; Thu, 29 Oct 2020 20:41:26 -0400 Received: from szxga06-in.huawei.com ([45.249.212.32]:2061) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kYITs-00014P-03; Thu, 29 Oct 2020 20:41:25 -0400 Received: from DGGEMS409-HUB.china.huawei.com (unknown [172.30.72.60]) by szxga06-in.huawei.com (SkyGuard) with ESMTP id 4CMk5G3V4Xzhd7q; Fri, 30 Oct 2020 08:41:22 +0800 (CST) Received: from huawei.com (10.175.104.175) by DGGEMS409-HUB.china.huawei.com (10.3.19.209) with Microsoft SMTP Server id 14.3.487.0; Fri, 30 Oct 2020 08:41:12 +0800 From: Chen Qun To: , Subject: [PATCH v2 7/8] ppc: Add a missing break for PPC6xx_INPUT_TBEN Date: Fri, 30 Oct 2020 08:40:45 +0800 Message-ID: <20201030004046.2191790-8-kuhn.chenqun@huawei.com> X-Mailer: git-send-email 2.23.0 In-Reply-To: <20201030004046.2191790-1-kuhn.chenqun@huawei.com> References: <20201030004046.2191790-1-kuhn.chenqun@huawei.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-Originating-IP: [10.175.104.175] X-CFilter-Loop: Reflected Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=45.249.212.32; envelope-from=kuhn.chenqun@huawei.com; helo=szxga06-in.huawei.com X-detected-operating-system: by eggs.gnu.org: First seen = 2020/10/29 20:41:10 X-ACL-Warn: Detected OS = Linux 3.1-3.10 [fuzzy] X-Spam_score_int: -41 X-Spam_score: -4.2 X-Spam_bar: ---- X-Spam_report: (-4.2 / 5.0 requ) BAYES_00=-1.9, RCVD_IN_DNSWL_MED=-2.3, RCVD_IN_MSPIKE_H4=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham 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 , zhang.zhanghailiang@huawei.com, ganqixin@huawei.com, Euler Robot , Chen Qun , David Gibson Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" When using -Wimplicit-fallthrough in our CFLAGS, the compiler showed warnin= g: hw/ppc/ppc.c: In function =E2=80=98ppc6xx_set_irq=E2=80=99: hw/ppc/ppc.c:118:16: warning: this statement may fall through [-Wimplicit-f= allthrough=3D] 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 Signed-off-by: Chen Qun Acked-by: David Gibson Reviewed-by: Thomas Huth --- v1->v2: Add a "break" statement here instead of /* fall through */ comments (Base on Thomas's and David review). Cc: Thomas Huth Cc: David Gibson --- 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 l= evel) } 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", --=20 2.27.0 From nobody Mon May 20 13:51:19 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org ARC-Seal: i=1; a=rsa-sha256; t=1604019061; cv=none; d=zohomail.com; s=zohoarc; b=QhD2HmV2h2vfTXdOm0f+doajjbbs9ZiiqW/2G5CIJ2f2jm6pbI7eO+FrufMu/c3kmMqljzyncYbX+gNKzbuLuFxyafg4xku8eVEEgU2k1bEiZiYRHVW6wANtlUycFjkvmDnXV6EFFtAKfbsNsl8Qlhm85jxle3cbM/6R9J08n3c= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1604019061; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=7+WXEUfVmDSIwVINO8DVZjmKn4J1QeFF91P2Q/R12kM=; b=G5OeHj1B1L+jpOQ0ejiVGXvdB8s9NVC7hw+KPkP9aKQvxxAJqra1fWNreowHEgwLO2P7bp3+/Nzg5NW9CxdYs1DpQq0nSUUbsjbh5HlZFuGV/RxuhEyhucaY7kAbJjFWuWGd8G/UDgkRkxqAG2eNV+1bP7VWLjHM65MiuJm0ONo= ARC-Authentication-Results: i=1; mx.zohomail.com; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1604019061539563.2718815122278; Thu, 29 Oct 2020 17:51:01 -0700 (PDT) Received: from localhost ([::1]:49842 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kYIdA-0004qx-86 for importer@patchew.org; Thu, 29 Oct 2020 20:51:00 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:45018) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kYITt-0001bK-Gl; Thu, 29 Oct 2020 20:41:25 -0400 Received: from szxga06-in.huawei.com ([45.249.212.32]:2062) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kYITq-00014Q-FP; Thu, 29 Oct 2020 20:41:25 -0400 Received: from DGGEMS409-HUB.china.huawei.com (unknown [172.30.72.60]) by szxga06-in.huawei.com (SkyGuard) with ESMTP id 4CMk5G3LnWzhd5x; Fri, 30 Oct 2020 08:41:22 +0800 (CST) Received: from huawei.com (10.175.104.175) by DGGEMS409-HUB.china.huawei.com (10.3.19.209) with Microsoft SMTP Server id 14.3.487.0; Fri, 30 Oct 2020 08:41:13 +0800 From: Chen Qun To: , Subject: [PATCH v2 8/8] target/ppc: replaced the TODO with LOG_UNIMP and add break for silence warnings Date: Fri, 30 Oct 2020 08:40:46 +0800 Message-ID: <20201030004046.2191790-9-kuhn.chenqun@huawei.com> X-Mailer: git-send-email 2.23.0 In-Reply-To: <20201030004046.2191790-1-kuhn.chenqun@huawei.com> References: <20201030004046.2191790-1-kuhn.chenqun@huawei.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-Originating-IP: [10.175.104.175] X-CFilter-Loop: Reflected Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=45.249.212.32; envelope-from=kuhn.chenqun@huawei.com; helo=szxga06-in.huawei.com X-detected-operating-system: by eggs.gnu.org: First seen = 2020/10/29 20:41:10 X-ACL-Warn: Detected OS = Linux 3.1-3.10 [fuzzy] X-Spam_score_int: -41 X-Spam_score: -4.2 X-Spam_bar: ---- X-Spam_report: (-4.2 / 5.0 requ) BAYES_00=-1.9, RCVD_IN_DNSWL_MED=-2.3, RCVD_IN_MSPIKE_H4=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham 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 , zhang.zhanghailiang@huawei.com, ganqixin@huawei.com, Euler Robot , Chen Qun , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , David Gibson Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" When using -Wimplicit-fallthrough in our CFLAGS, the compiler showed warnin= g: target/ppc/mmu_helper.c: In function =E2=80=98dump_mmu=E2=80=99: target/ppc/mmu_helper.c:1351:12: warning: this statement may fall through [= -Wimplicit-fallthrough=3D] 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 Acked-by: David Gibson Reviewed-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Thomas Huth --- v1->v2: replace the TODO by a LOG_UNIMP call and add break statement(Base o= n Philippe's comments) Cc: Thomas Huth Cc: David Gibson Cc: Philippe Mathieu-Daud=C3=A9 --- 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..12723362b7 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 unsupported\n", + __func__); } else { dump_slb(env_archcpu(env)); - break; } + break; #endif default: qemu_log_mask(LOG_UNIMP, "%s: unimplemented\n", __func__); --=20 2.27.0