From nobody Mon Sep 16 19:19:38 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) client-ip=192.237.175.120; envelope-from=xen-devel-bounces@lists.xenproject.org; helo=lists.xenproject.org; Authentication-Results: mx.zohomail.com; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org Return-Path: Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) by mx.zohomail.com with SMTPS id 1721062072117255.74551476940871; Mon, 15 Jul 2024 09:47:52 -0700 (PDT) Received: from list by lists.xenproject.org with outflank-mailman.759062.1168617 (Exim 4.92) (envelope-from ) id 1sTOrQ-00079x-SG; Mon, 15 Jul 2024 16:47:36 +0000 Received: by outflank-mailman (output) from mailman id 759062.1168617; Mon, 15 Jul 2024 16:47:36 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sTOrQ-00079m-PI; Mon, 15 Jul 2024 16:47:36 +0000 Received: by outflank-mailman (input) for mailman id 759062; Mon, 15 Jul 2024 16:47:36 +0000 Received: from se1-gles-sth1-in.inumbo.com ([159.253.27.254] helo=se1-gles-sth1.inumbo.com) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sTOrP-000798-WD for xen-devel@lists.xenproject.org; Mon, 15 Jul 2024 16:47:36 +0000 Received: from support.bugseng.com (mail.bugseng.com [162.55.131.47]) by se1-gles-sth1.inumbo.com (Halon) with ESMTPS id eead601a-42c9-11ef-bbfb-fd08da9f4363; Mon, 15 Jul 2024 18:47:33 +0200 (CEST) Received: from truciolo.bugseng.com (unknown [37.163.111.28]) by support.bugseng.com (Postfix) with ESMTPSA id 9E7074EE073E; Mon, 15 Jul 2024 18:47:31 +0200 (CEST) X-Outflank-Mailman: Message body and most headers restored to incoming version X-BeenThere: xen-devel@lists.xenproject.org List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xenproject.org Precedence: list Sender: "Xen-devel" X-Inumbo-ID: eead601a-42c9-11ef-bbfb-fd08da9f4363 From: Federico Serafini To: xen-devel@lists.xenproject.org Cc: consulting@bugseng.com, Federico Serafini , Jan Beulich , Stefano Stabellini Subject: [XEN PATCH v4 1/9] automation/eclair: fix deviation of MISRA C Rule 16.3 Date: Mon, 15 Jul 2024 18:47:14 +0200 Message-Id: <490e1a84b1b4b8d983dc41af147191f79506cdbd.1721050709.git.federico.serafini@bugseng.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: References: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-ZM-MESSAGEID: 1721062072309116600 Content-Type: text/plain; charset="utf-8" Escape the final dot of the comment and extend the search of a fallthrough comment up to 2 lines after the last statement. Fixes: Fixes: a128d8da91 ("automation/eclair: add deviations for MISRA C:20= 12 Rule 16.3") Reported-by: Jan Beulich Signed-off-by: Federico Serafini Acked-by: Stefano Stabellini --- automation/eclair_analysis/ECLAIR/deviations.ecl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/automation/eclair_analysis/ECLAIR/deviations.ecl b/automation/= eclair_analysis/ECLAIR/deviations.ecl index 0d94635275..e95554acae 100644 --- a/automation/eclair_analysis/ECLAIR/deviations.ecl +++ b/automation/eclair_analysis/ECLAIR/deviations.ecl @@ -499,7 +499,7 @@ safe." -doc_end =20 -doc_begin=3D"Switch clauses ending with an explicit comment indicating th= e fallthrough intention are safe." --config=3DMC3R1.R16.3,reports+=3D{safe, "any_area(end_loc(any_exp(text(^(?= s).*/\\* [fF]all ?through.? \\*/.*$,0..1))))"} +-config=3DMC3R1.R16.3,reports+=3D{safe, "any_area(end_loc(any_exp(text(^(?= s).*/\\* [fF]all ?through\\.? \\*/.*$,0..2))))"} -doc_end =20 -doc_begin=3D"Switch statements having a controlling expression of enum ty= pe deliberately do not have a default case: gcc -Wall enables -Wswitch whic= h warns (and breaks the build as we use -Werror) if one of the enum labels = is missing from the switch." --=20 2.34.1 From nobody Mon Sep 16 19:19:38 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) client-ip=192.237.175.120; envelope-from=xen-devel-bounces@lists.xenproject.org; helo=lists.xenproject.org; Authentication-Results: mx.zohomail.com; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org Return-Path: Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) by mx.zohomail.com with SMTPS id 1721062072632759.741705293908; Mon, 15 Jul 2024 09:47:52 -0700 (PDT) Received: from list by lists.xenproject.org with outflank-mailman.759063.1168628 (Exim 4.92) (envelope-from ) id 1sTOrS-0007Ps-7a; Mon, 15 Jul 2024 16:47:38 +0000 Received: by outflank-mailman (output) from mailman id 759063.1168628; Mon, 15 Jul 2024 16:47:38 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sTOrS-0007Ph-4P; Mon, 15 Jul 2024 16:47:38 +0000 Received: by outflank-mailman (input) for mailman id 759063; Mon, 15 Jul 2024 16:47:36 +0000 Received: from se1-gles-sth1-in.inumbo.com ([159.253.27.254] helo=se1-gles-sth1.inumbo.com) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sTOrQ-000798-Kh for xen-devel@lists.xenproject.org; Mon, 15 Jul 2024 16:47:36 +0000 Received: from support.bugseng.com (mail.bugseng.com [162.55.131.47]) by se1-gles-sth1.inumbo.com (Halon) with ESMTPS id ef64baa8-42c9-11ef-bbfb-fd08da9f4363; Mon, 15 Jul 2024 18:47:34 +0200 (CEST) Received: from truciolo.bugseng.com (unknown [37.163.111.28]) by support.bugseng.com (Postfix) with ESMTPSA id 494CF4EE073F; Mon, 15 Jul 2024 18:47:33 +0200 (CEST) X-Outflank-Mailman: Message body and most headers restored to incoming version X-BeenThere: xen-devel@lists.xenproject.org List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xenproject.org Precedence: list Sender: "Xen-devel" X-Inumbo-ID: ef64baa8-42c9-11ef-bbfb-fd08da9f4363 From: Federico Serafini To: xen-devel@lists.xenproject.org Cc: consulting@bugseng.com, Federico Serafini , Stefano Stabellini , Jan Beulich Subject: [XEN PATCH v4 2/9] x86/cpuid: use fallthrough pseudo keyword Date: Mon, 15 Jul 2024 18:47:15 +0200 Message-Id: X-Mailer: git-send-email 2.34.1 In-Reply-To: References: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-ZM-MESSAGEID: 1721062074361116600 Content-Type: text/plain; charset="utf-8" The current comment making explicit the fallthrough intention does not follow the agreed syntax: replace it with the pseduo keyword. No functional change. Signed-off-by: Federico Serafini Reviewed-by: Stefano Stabellini Acked-by: Jan Beulich --- xen/arch/x86/cpuid.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/xen/arch/x86/cpuid.c b/xen/arch/x86/cpuid.c index a822e80c7e..2a777436ee 100644 --- a/xen/arch/x86/cpuid.c +++ b/xen/arch/x86/cpuid.c @@ -97,9 +97,8 @@ void guest_cpuid(const struct vcpu *v, uint32_t leaf, if ( is_viridian_domain(d) ) return cpuid_viridian_leaves(v, leaf, subleaf, res); =20 + fallthrough; /* - * Fallthrough. - * * Intel reserve up until 0x4fffffff for hypervisor use. AMD rese= rve * only until 0x400000ff, but we already use double that. */ --=20 2.34.1 From nobody Mon Sep 16 19:19:38 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) client-ip=192.237.175.120; envelope-from=xen-devel-bounces@lists.xenproject.org; helo=lists.xenproject.org; Authentication-Results: mx.zohomail.com; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org Return-Path: Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) by mx.zohomail.com with SMTPS id 1721062077739244.75103491346033; Mon, 15 Jul 2024 09:47:57 -0700 (PDT) Received: from list by lists.xenproject.org with outflank-mailman.759064.1168638 (Exim 4.92) (envelope-from ) id 1sTOrT-0007fs-FF; Mon, 15 Jul 2024 16:47:39 +0000 Received: by outflank-mailman (output) from mailman id 759064.1168638; Mon, 15 Jul 2024 16:47:39 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sTOrT-0007fh-Bd; Mon, 15 Jul 2024 16:47:39 +0000 Received: by outflank-mailman (input) for mailman id 759064; Mon, 15 Jul 2024 16:47:37 +0000 Received: from se1-gles-flk1-in.inumbo.com ([94.247.172.50] helo=se1-gles-flk1.inumbo.com) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sTOrR-0006CY-AE for xen-devel@lists.xenproject.org; Mon, 15 Jul 2024 16:47:37 +0000 Received: from support.bugseng.com (mail.bugseng.com [162.55.131.47]) by se1-gles-flk1.inumbo.com (Halon) with ESMTPS id f02873b5-42c9-11ef-8776-851b0ebba9a2; Mon, 15 Jul 2024 18:47:35 +0200 (CEST) Received: from truciolo.bugseng.com (unknown [37.163.111.28]) by support.bugseng.com (Postfix) with ESMTPSA id 9C4B64EE0739; Mon, 15 Jul 2024 18:47:34 +0200 (CEST) X-Outflank-Mailman: Message body and most headers restored to incoming version X-BeenThere: xen-devel@lists.xenproject.org List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xenproject.org Precedence: list Sender: "Xen-devel" X-Inumbo-ID: f02873b5-42c9-11ef-8776-851b0ebba9a2 From: Federico Serafini To: xen-devel@lists.xenproject.org Cc: consulting@bugseng.com, Federico Serafini , Stefano Stabellini , Jan Beulich Subject: [XEN PATCH v4 3/9] x86/domctl: address a violation of MISRA C Rule 16.3 Date: Mon, 15 Jul 2024 18:47:16 +0200 Message-Id: <759ef52606d90ec0efed9fc6d87fd432a42f7cc4.1721050709.git.federico.serafini@bugseng.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: References: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-ZM-MESSAGEID: 1721062078372116600 Content-Type: text/plain; charset="utf-8" Add missing break statement to address a violation of MISRA C Rule 16.3: "An unconditional `break' statement shall terminate every switch-clause". No functional change. Signed-off-by: Federico Serafini Reviewed-by: Stefano Stabellini Acked-by: Jan Beulich --- xen/arch/x86/domctl.c | 1 + 1 file changed, 1 insertion(+) diff --git a/xen/arch/x86/domctl.c b/xen/arch/x86/domctl.c index 9190e11faa..68b5b46d1a 100644 --- a/xen/arch/x86/domctl.c +++ b/xen/arch/x86/domctl.c @@ -517,6 +517,7 @@ long arch_do_domctl( =20 default: ret =3D -ENOSYS; + break; } break; } --=20 2.34.1 From nobody Mon Sep 16 19:19:38 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) client-ip=192.237.175.120; envelope-from=xen-devel-bounces@lists.xenproject.org; helo=lists.xenproject.org; Authentication-Results: mx.zohomail.com; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org Return-Path: Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) by mx.zohomail.com with SMTPS id 1721062079156156.85923220150494; Mon, 15 Jul 2024 09:47:59 -0700 (PDT) Received: from list by lists.xenproject.org with outflank-mailman.759066.1168643 (Exim 4.92) (envelope-from ) id 1sTOrT-0007jK-Qz; Mon, 15 Jul 2024 16:47:39 +0000 Received: by outflank-mailman (output) from mailman id 759066.1168643; Mon, 15 Jul 2024 16:47:39 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sTOrT-0007iS-Jq; Mon, 15 Jul 2024 16:47:39 +0000 Received: by outflank-mailman (input) for mailman id 759066; Mon, 15 Jul 2024 16:47:38 +0000 Received: from se1-gles-flk1-in.inumbo.com ([94.247.172.50] helo=se1-gles-flk1.inumbo.com) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sTOrS-0006CY-AS for xen-devel@lists.xenproject.org; Mon, 15 Jul 2024 16:47:38 +0000 Received: from support.bugseng.com (mail.bugseng.com [162.55.131.47]) by se1-gles-flk1.inumbo.com (Halon) with ESMTPS id f08dee2b-42c9-11ef-8776-851b0ebba9a2; Mon, 15 Jul 2024 18:47:36 +0200 (CEST) Received: from truciolo.bugseng.com (unknown [37.163.111.28]) by support.bugseng.com (Postfix) with ESMTPSA id CC67B4EE0742; Mon, 15 Jul 2024 18:47:35 +0200 (CEST) X-Outflank-Mailman: Message body and most headers restored to incoming version X-BeenThere: xen-devel@lists.xenproject.org List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xenproject.org Precedence: list Sender: "Xen-devel" X-Inumbo-ID: f08dee2b-42c9-11ef-8776-851b0ebba9a2 From: Federico Serafini To: xen-devel@lists.xenproject.org Cc: consulting@bugseng.com, Federico Serafini , Stefano Stabellini Subject: [XEN PATCH v4 4/9] x86/vpmu: address violations of MISRA C Rule 16.3 Date: Mon, 15 Jul 2024 18:47:17 +0200 Message-Id: <67c30f4ef05846f8c3b371eb5fb2de4bd42eb5f1.1721050709.git.federico.serafini@bugseng.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: References: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-ZM-MESSAGEID: 1721062080377116600 Content-Type: text/plain; charset="utf-8" Add missing break statements to address violations of MISRA C Rule 16.3: "An unconditional `break' statement shall terminate every switch-clause". No functional change. Signed-off-by: Federico Serafini Reviewed-by: Stefano Stabellini --- xen/arch/x86/cpu/vpmu.c | 3 +++ xen/arch/x86/cpu/vpmu_intel.c | 2 ++ 2 files changed, 5 insertions(+) diff --git a/xen/arch/x86/cpu/vpmu.c b/xen/arch/x86/cpu/vpmu.c index a7bc0cd1fc..b2ba999412 100644 --- a/xen/arch/x86/cpu/vpmu.c +++ b/xen/arch/x86/cpu/vpmu.c @@ -663,6 +663,8 @@ long do_xenpmu_op( =20 if ( pmu_params.version.maj !=3D XENPMU_VER_MAJ ) return -EINVAL; + + break; } =20 switch ( op ) @@ -776,6 +778,7 @@ long do_xenpmu_op( =20 default: ret =3D -EINVAL; + break; } =20 return ret; diff --git a/xen/arch/x86/cpu/vpmu_intel.c b/xen/arch/x86/cpu/vpmu_intel.c index cd414165df..26dd3a9358 100644 --- a/xen/arch/x86/cpu/vpmu_intel.c +++ b/xen/arch/x86/cpu/vpmu_intel.c @@ -666,6 +666,7 @@ static int cf_check core2_vpmu_do_wrmsr(unsigned int ms= r, uint64_t msr_content) =20 xen_pmu_cntr_pair[tmp].control =3D msr_content; } + break; } =20 if ( type !=3D MSR_TYPE_GLOBAL ) @@ -713,6 +714,7 @@ static int cf_check core2_vpmu_do_rdmsr(unsigned int ms= r, uint64_t *msr_content) break; default: rdmsrl(msr, *msr_content); + break; } } else if ( msr =3D=3D MSR_IA32_MISC_ENABLE ) --=20 2.34.1 From nobody Mon Sep 16 19:19:38 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) client-ip=192.237.175.120; envelope-from=xen-devel-bounces@lists.xenproject.org; helo=lists.xenproject.org; Authentication-Results: mx.zohomail.com; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org Return-Path: Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) by mx.zohomail.com with SMTPS id 172106207919836.236332178823204; Mon, 15 Jul 2024 09:47:59 -0700 (PDT) Received: from list by lists.xenproject.org with outflank-mailman.759067.1168647 (Exim 4.92) (envelope-from ) id 1sTOrU-0007pS-4x; Mon, 15 Jul 2024 16:47:40 +0000 Received: by outflank-mailman (output) from mailman id 759067.1168647; Mon, 15 Jul 2024 16:47:40 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sTOrT-0007ns-VP; Mon, 15 Jul 2024 16:47:39 +0000 Received: by outflank-mailman (input) for mailman id 759067; Mon, 15 Jul 2024 16:47:38 +0000 Received: from se1-gles-sth1-in.inumbo.com ([159.253.27.254] helo=se1-gles-sth1.inumbo.com) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sTOrS-000798-LK for xen-devel@lists.xenproject.org; Mon, 15 Jul 2024 16:47:38 +0000 Received: from support.bugseng.com (mail.bugseng.com [162.55.131.47]) by se1-gles-sth1.inumbo.com (Halon) with ESMTPS id f1077e25-42c9-11ef-bbfb-fd08da9f4363; Mon, 15 Jul 2024 18:47:37 +0200 (CEST) Received: from truciolo.bugseng.com (unknown [37.163.111.28]) by support.bugseng.com (Postfix) with ESMTPSA id 7BB284EE0745; Mon, 15 Jul 2024 18:47:36 +0200 (CEST) X-Outflank-Mailman: Message body and most headers restored to incoming version X-BeenThere: xen-devel@lists.xenproject.org List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xenproject.org Precedence: list Sender: "Xen-devel" X-Inumbo-ID: f1077e25-42c9-11ef-bbfb-fd08da9f4363 From: Federico Serafini To: xen-devel@lists.xenproject.org Cc: consulting@bugseng.com, Federico Serafini , Stefano Stabellini Subject: [XEN PATCH v4 5/9] x86/traps: address violations of MISRA C Rule 16.3 Date: Mon, 15 Jul 2024 18:47:18 +0200 Message-Id: X-Mailer: git-send-email 2.34.1 In-Reply-To: References: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-ZM-MESSAGEID: 1721062080387116600 Content-Type: text/plain; charset="utf-8" Add break or pseudo keyword fallthrough to address violations of MISRA C Rule 16.3: "An unconditional `break' statement shall terminate every switch-clause". No functional change. Signed-off-by: Federico Serafini Reviewed-by: Stefano Stabellini --- xen/arch/x86/traps.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/xen/arch/x86/traps.c b/xen/arch/x86/traps.c index ee91fc56b1..7a9299ae6c 100644 --- a/xen/arch/x86/traps.c +++ b/xen/arch/x86/traps.c @@ -1186,6 +1186,7 @@ void cpuid_hypervisor_leaves(const struct vcpu *v, ui= nt32_t leaf, =20 default: ASSERT_UNREACHABLE(); + break; } } =20 @@ -1748,6 +1749,7 @@ static void io_check_error(const struct cpu_user_regs= *regs) { case 'd': /* 'dom0' */ nmi_hwdom_report(_XEN_NMIREASON_io_error); + break; case 'i': /* 'ignore' */ break; default: /* 'fatal' */ @@ -1768,6 +1770,7 @@ static void unknown_nmi_error(const struct cpu_user_r= egs *regs, { case 'd': /* 'dom0' */ nmi_hwdom_report(_XEN_NMIREASON_unknown); + break; case 'i': /* 'ignore' */ break; default: /* 'fatal' */ --=20 2.34.1 From nobody Mon Sep 16 19:19:38 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) client-ip=192.237.175.120; envelope-from=xen-devel-bounces@lists.xenproject.org; helo=lists.xenproject.org; Authentication-Results: mx.zohomail.com; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org Return-Path: Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) by mx.zohomail.com with SMTPS id 1721062080483802.4889322322018; Mon, 15 Jul 2024 09:48:00 -0700 (PDT) Received: from list by lists.xenproject.org with outflank-mailman.759069.1168668 (Exim 4.92) (envelope-from ) id 1sTOrW-0008Tv-Gj; Mon, 15 Jul 2024 16:47:42 +0000 Received: by outflank-mailman (output) from mailman id 759069.1168668; Mon, 15 Jul 2024 16:47:42 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sTOrW-0008Tc-CZ; Mon, 15 Jul 2024 16:47:42 +0000 Received: by outflank-mailman (input) for mailman id 759069; Mon, 15 Jul 2024 16:47:40 +0000 Received: from se1-gles-flk1-in.inumbo.com ([94.247.172.50] helo=se1-gles-flk1.inumbo.com) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sTOrU-0006CY-77 for xen-devel@lists.xenproject.org; Mon, 15 Jul 2024 16:47:40 +0000 Received: from support.bugseng.com (mail.bugseng.com [162.55.131.47]) by se1-gles-flk1.inumbo.com (Halon) with ESMTPS id f1e1340e-42c9-11ef-8776-851b0ebba9a2; Mon, 15 Jul 2024 18:47:38 +0200 (CEST) Received: from truciolo.bugseng.com (unknown [37.163.111.28]) by support.bugseng.com (Postfix) with ESMTPSA id 616B34EE0746; Mon, 15 Jul 2024 18:47:37 +0200 (CEST) X-Outflank-Mailman: Message body and most headers restored to incoming version X-BeenThere: xen-devel@lists.xenproject.org List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xenproject.org Precedence: list Sender: "Xen-devel" X-Inumbo-ID: f1e1340e-42c9-11ef-8776-851b0ebba9a2 From: Federico Serafini To: xen-devel@lists.xenproject.org Cc: consulting@bugseng.com, Federico Serafini , Stefano Stabellini , Jan Beulich Subject: [XEN PATCH v4 6/9] x86/mce: address violations of MISRA C Rule 16.3 Date: Mon, 15 Jul 2024 18:47:19 +0200 Message-Id: X-Mailer: git-send-email 2.34.1 In-Reply-To: References: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-ZM-MESSAGEID: 1721062082360116600 Content-Type: text/plain; charset="utf-8" Add missing break statements to address violations of MISRA C Rule 16.3: "An unconditional `break' statement shall terminate every switch-clause". No functional change. Signed-off-by: Federico Serafini Reviewed-by: Stefano Stabellini Acked-by: Jan Beulich --- xen/arch/x86/cpu/mcheck/mce_amd.c | 1 + xen/arch/x86/cpu/mcheck/mce_intel.c | 2 ++ 2 files changed, 3 insertions(+) diff --git a/xen/arch/x86/cpu/mcheck/mce_amd.c b/xen/arch/x86/cpu/mcheck/mc= e_amd.c index 3318b8204f..4f06a3153b 100644 --- a/xen/arch/x86/cpu/mcheck/mce_amd.c +++ b/xen/arch/x86/cpu/mcheck/mce_amd.c @@ -201,6 +201,7 @@ static void mcequirk_amd_apply(enum mcequirk_amd_flags = flags) =20 default: ASSERT(flags =3D=3D MCEQUIRK_NONE); + break; } } =20 diff --git a/xen/arch/x86/cpu/mcheck/mce_intel.c b/xen/arch/x86/cpu/mcheck/= mce_intel.c index dd812f4b8a..9574dedbfd 100644 --- a/xen/arch/x86/cpu/mcheck/mce_intel.c +++ b/xen/arch/x86/cpu/mcheck/mce_intel.c @@ -896,6 +896,8 @@ static void intel_init_ppin(const struct cpuinfo_x86 *c) ppin_msr =3D 0; else if ( c =3D=3D &boot_cpu_data ) ppin_msr =3D MSR_PPIN; + + break; } } =20 --=20 2.34.1 From nobody Mon Sep 16 19:19:38 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) client-ip=192.237.175.120; envelope-from=xen-devel-bounces@lists.xenproject.org; helo=lists.xenproject.org; Authentication-Results: mx.zohomail.com; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org Return-Path: Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) by mx.zohomail.com with SMTPS id 1721062087717576.6333132819155; Mon, 15 Jul 2024 09:48:07 -0700 (PDT) Received: from list by lists.xenproject.org with outflank-mailman.759070.1168674 (Exim 4.92) (envelope-from ) id 1sTOrX-00006A-5B; Mon, 15 Jul 2024 16:47:43 +0000 Received: by outflank-mailman (output) from mailman id 759070.1168674; Mon, 15 Jul 2024 16:47:43 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sTOrW-00004s-Oc; Mon, 15 Jul 2024 16:47:42 +0000 Received: by outflank-mailman (input) for mailman id 759070; Mon, 15 Jul 2024 16:47:40 +0000 Received: from se1-gles-sth1-in.inumbo.com ([159.253.27.254] helo=se1-gles-sth1.inumbo.com) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sTOrU-000798-Lc for xen-devel@lists.xenproject.org; Mon, 15 Jul 2024 16:47:40 +0000 Received: from support.bugseng.com (mail.bugseng.com [162.55.131.47]) by se1-gles-sth1.inumbo.com (Halon) with ESMTPS id f27fad77-42c9-11ef-bbfb-fd08da9f4363; Mon, 15 Jul 2024 18:47:39 +0200 (CEST) Received: from truciolo.bugseng.com (unknown [37.163.111.28]) by support.bugseng.com (Postfix) with ESMTPSA id D61BA4EE0755; Mon, 15 Jul 2024 18:47:38 +0200 (CEST) X-Outflank-Mailman: Message body and most headers restored to incoming version X-BeenThere: xen-devel@lists.xenproject.org List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xenproject.org Precedence: list Sender: "Xen-devel" X-Inumbo-ID: f27fad77-42c9-11ef-bbfb-fd08da9f4363 From: Federico Serafini To: xen-devel@lists.xenproject.org Cc: consulting@bugseng.com, Federico Serafini Subject: [XEN PATCH v4 7/9] x86/hvm: address violations of MISRA C Rule 16.3 Date: Mon, 15 Jul 2024 18:47:20 +0200 Message-Id: X-Mailer: git-send-email 2.34.1 In-Reply-To: References: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-ZM-MESSAGEID: 1721062088619116600 Content-Type: text/plain; charset="utf-8" MISRA C Rule 16.3 states that "An unconditional `break' statement shall terminate every switch-clause". Add pseudo keyword fallthrough or missing break statement to address violations of the rule. As a defensive measure, return an error message or a null pointer in case an unreachable return statement is reached. Signed-off-by: Federico Serafini --- Changes in v4: - do not separate different parts of HVM: a) squash patches 8, 11 and 12 of v3 into this patch; b) address also violations of SVM and VMX; - re-arrange fallthrough positioning to comply with Coverity. Changes in v3: - squashed here modifications of pmtimer.c; - no blank line after fallthrough; - better indentation of fallthrough. --- xen/arch/x86/hvm/emulate.c | 10 ++++++---- xen/arch/x86/hvm/hvm.c | 5 +++++ xen/arch/x86/hvm/hypercall.c | 2 +- xen/arch/x86/hvm/irq.c | 1 + xen/arch/x86/hvm/pmtimer.c | 1 + xen/arch/x86/hvm/svm/svm.c | 2 ++ xen/arch/x86/hvm/vlapic.c | 1 + xen/arch/x86/hvm/vmx/vmcs.c | 2 ++ xen/arch/x86/hvm/vmx/vmx.c | 3 ++- xen/arch/x86/hvm/vmx/vvmx.c | 1 + xen/arch/x86/hvm/vpic.c | 1 + xen/arch/x86/hvm/vpt.c | 3 +-- 12 files changed, 24 insertions(+), 8 deletions(-) diff --git a/xen/arch/x86/hvm/emulate.c b/xen/arch/x86/hvm/emulate.c index 02e378365b..a749d16137 100644 --- a/xen/arch/x86/hvm/emulate.c +++ b/xen/arch/x86/hvm/emulate.c @@ -339,7 +339,7 @@ static int hvmemul_do_io( } case X86EMUL_UNIMPLEMENTED: ASSERT_UNREACHABLE(); - /* Fall-through */ + fallthrough; default: BUG(); } @@ -397,7 +397,6 @@ static int hvmemul_acquire_page(unsigned long gmfn, str= uct page_info **page) default: ASSERT_UNREACHABLE(); /* Fallthrough */ - case -EINVAL: return X86EMUL_UNHANDLEABLE; } @@ -2674,6 +2673,7 @@ static int _hvm_emulate_one(struct hvm_emulate_ctxt *= hvmemul_ctxt, =20 default: ASSERT_UNREACHABLE(); + break; } =20 if ( hvmemul_ctxt->ctxt.retire.singlestep ) @@ -2764,6 +2764,7 @@ int hvm_emulate_one_mmio(unsigned long mfn, unsigned = long gla) /* fallthrough */ default: hvm_emulate_writeback(&ctxt); + break; } =20 return rc; @@ -2799,10 +2800,11 @@ void hvm_emulate_one_vm_event(enum emul_kind kind, = unsigned int trapnr, memcpy(hvio->mmio_insn, curr->arch.vm_event->emul.insn.data, hvio->mmio_insn_bytes); } - /* Fall-through */ + fallthrough; default: ctx.set_context =3D (kind =3D=3D EMUL_KIND_SET_CONTEXT_DATA); rc =3D hvm_emulate_one(&ctx, VIO_no_completion); + break; } =20 switch ( rc ) @@ -2818,7 +2820,7 @@ void hvm_emulate_one_vm_event(enum emul_kind kind, un= signed int trapnr, case X86EMUL_UNIMPLEMENTED: if ( hvm_monitor_emul_unimplemented() ) return; - /* fall-through */ + fallthrough; case X86EMUL_UNHANDLEABLE: hvm_dump_emulation_state(XENLOG_G_DEBUG, "Mem event", &ctx, rc); hvm_inject_hw_exception(trapnr, errcode); diff --git a/xen/arch/x86/hvm/hvm.c b/xen/arch/x86/hvm/hvm.c index 7f4b627b1f..d7f195ba9a 100644 --- a/xen/arch/x86/hvm/hvm.c +++ b/xen/arch/x86/hvm/hvm.c @@ -4919,6 +4919,8 @@ static int do_altp2m_op( =20 default: ASSERT_UNREACHABLE(); + rc =3D -EOPNOTSUPP; + break; } =20 out: @@ -5020,6 +5022,8 @@ static int compat_altp2m_op( =20 default: ASSERT_UNREACHABLE(); + rc =3D -EOPNOTSUPP; + break; } =20 return rc; @@ -5283,6 +5287,7 @@ void hvm_get_segment_register(struct vcpu *v, enum x8= 6_segment seg, * %cs and %tr are unconditionally present. SVM ignores these pre= sent * bits and will happily run without them set. */ + fallthrough; case x86_seg_cs: reg->p =3D 1; break; diff --git a/xen/arch/x86/hvm/hypercall.c b/xen/arch/x86/hvm/hypercall.c index 7fb3136f0c..c1bd17571e 100644 --- a/xen/arch/x86/hvm/hypercall.c +++ b/xen/arch/x86/hvm/hypercall.c @@ -110,7 +110,7 @@ int hvm_hypercall(struct cpu_user_regs *regs) { case 8: eax =3D regs->rax; - /* Fallthrough to permission check. */ + fallthrough; case 4: case 2: if ( currd->arch.monitor.guest_request_userspace_enabled && diff --git a/xen/arch/x86/hvm/irq.c b/xen/arch/x86/hvm/irq.c index 210cebb0e6..1eab44defc 100644 --- a/xen/arch/x86/hvm/irq.c +++ b/xen/arch/x86/hvm/irq.c @@ -282,6 +282,7 @@ static void hvm_set_callback_irq_level(struct vcpu *v) __hvm_pci_intx_assert(d, pdev, pintx); else __hvm_pci_intx_deassert(d, pdev, pintx); + break; default: break; } diff --git a/xen/arch/x86/hvm/pmtimer.c b/xen/arch/x86/hvm/pmtimer.c index 97099ac305..87a7a01c9f 100644 --- a/xen/arch/x86/hvm/pmtimer.c +++ b/xen/arch/x86/hvm/pmtimer.c @@ -185,6 +185,7 @@ static int cf_check handle_evt_io( gdprintk(XENLOG_WARNING,=20 "Bad ACPI PM register write: %x bytes (%x) at %x\= n",=20 bytes, *val, port); + break; } } /* Fix up the SCI state to match the new register state */ diff --git a/xen/arch/x86/hvm/svm/svm.c b/xen/arch/x86/hvm/svm/svm.c index 988250dbc1..92bb10c504 100644 --- a/xen/arch/x86/hvm/svm/svm.c +++ b/xen/arch/x86/hvm/svm/svm.c @@ -681,6 +681,7 @@ static void cf_check svm_get_segment_register( ASSERT_UNREACHABLE(); domain_crash(v->domain); *reg =3D (struct segment_register){}; + break; } } =20 @@ -2416,6 +2417,7 @@ static void cf_check svm_set_reg(struct vcpu *v, unsi= gned int reg, uint64_t val) printk(XENLOG_G_ERR "%s(%pv, 0x%08x, 0x%016"PRIx64") Bad register\= n", __func__, v, reg, val); domain_crash(d); + break; } } =20 diff --git a/xen/arch/x86/hvm/vlapic.c b/xen/arch/x86/hvm/vlapic.c index 9cfc82666a..2ec9594271 100644 --- a/xen/arch/x86/hvm/vlapic.c +++ b/xen/arch/x86/hvm/vlapic.c @@ -367,6 +367,7 @@ static void vlapic_accept_irq(struct vcpu *v, uint32_t = icr_low) gdprintk(XENLOG_ERR, "TODO: unsupported delivery mode in ICR %x\n", icr_low); domain_crash(v->domain); + break; } } =20 diff --git a/xen/arch/x86/hvm/vmx/vmcs.c b/xen/arch/x86/hvm/vmx/vmcs.c index 9b6dc51f36..9c5a22dafd 100644 --- a/xen/arch/x86/hvm/vmx/vmcs.c +++ b/xen/arch/x86/hvm/vmx/vmcs.c @@ -1446,6 +1446,7 @@ struct vmx_msr_entry *vmx_find_msr(const struct vcpu = *v, uint32_t msr, =20 default: ASSERT_UNREACHABLE(); + return NULL; } =20 if ( !start ) @@ -1598,6 +1599,7 @@ int vmx_del_msr(struct vcpu *v, uint32_t msr, enum vm= x_msr_list_type type) =20 default: ASSERT_UNREACHABLE(); + return -EINVAL; } =20 if ( !start ) diff --git a/xen/arch/x86/hvm/vmx/vmx.c b/xen/arch/x86/hvm/vmx/vmx.c index f16faa6a61..46911c3e1c 100644 --- a/xen/arch/x86/hvm/vmx/vmx.c +++ b/xen/arch/x86/hvm/vmx/vmx.c @@ -2745,6 +2745,7 @@ static void cf_check vmx_set_reg(struct vcpu *v, unsi= gned int reg, uint64_t val) printk(XENLOG_G_ERR "%s(%pv, 0x%08x, 0x%016"PRIx64") Bad register\= n", __func__, v, reg, val); domain_crash(d); + break; } vmx_vmcs_exit(v); } @@ -3393,7 +3394,7 @@ static int cf_check vmx_msr_read_intercept( *msr_content |=3D MSR_IA32_MISC_ENABLE_BTS_UNAVAIL | MSR_IA32_MISC_ENABLE_PEBS_UNAVAIL; /* Perhaps vpmu will change some bits. */ - /* FALLTHROUGH */ + fallthrough; case MSR_P6_PERFCTR(0)...MSR_P6_PERFCTR(7): case MSR_P6_EVNTSEL(0)...MSR_P6_EVNTSEL(3): case MSR_CORE_PERF_FIXED_CTR0...MSR_CORE_PERF_FIXED_CTR2: diff --git a/xen/arch/x86/hvm/vmx/vvmx.c b/xen/arch/x86/hvm/vmx/vvmx.c index 39290c9861..c05e0e9326 100644 --- a/xen/arch/x86/hvm/vmx/vvmx.c +++ b/xen/arch/x86/hvm/vmx/vvmx.c @@ -2768,6 +2768,7 @@ int nvmx_n2_vmexit_handler(struct cpu_user_regs *regs, gprintk(XENLOG_ERR, "Unhandled nested vmexit: reason %u\n", exit_reason); domain_crash(v->domain); + break; } =20 return ( nvcpu->nv_vmexit_pending =3D=3D 1 ); diff --git a/xen/arch/x86/hvm/vpic.c b/xen/arch/x86/hvm/vpic.c index 7c3b5c7254..6427b08086 100644 --- a/xen/arch/x86/hvm/vpic.c +++ b/xen/arch/x86/hvm/vpic.c @@ -309,6 +309,7 @@ static void vpic_ioport_write( if ( !(vpic->init_state & 8) ) break; /* CASCADE mode: wait for write to ICW3. */ /* SNGL mode: fall through (no ICW3). */ + fallthrough; case 2: /* ICW3 */ vpic->init_state++; diff --git a/xen/arch/x86/hvm/vpt.c b/xen/arch/x86/hvm/vpt.c index e1d6845a28..5e7b9a9f66 100644 --- a/xen/arch/x86/hvm/vpt.c +++ b/xen/arch/x86/hvm/vpt.c @@ -119,8 +119,7 @@ static int pt_irq_masked(struct periodic_time *pt) =20 gsi =3D hvm_isa_irq_to_gsi(pt->irq); } - - /* Fallthrough to check if the interrupt is masked on the IO APIC. */ + fallthrough; case PTSRC_ioapic: { int mask =3D vioapic_get_mask(v->domain, gsi); --=20 2.34.1 From nobody Mon Sep 16 19:19:38 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) client-ip=192.237.175.120; envelope-from=xen-devel-bounces@lists.xenproject.org; helo=lists.xenproject.org; Authentication-Results: mx.zohomail.com; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org Return-Path: Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) by mx.zohomail.com with SMTPS id 172106208267019.571626877851486; Mon, 15 Jul 2024 09:48:02 -0700 (PDT) Received: from list by lists.xenproject.org with outflank-mailman.759073.1168684 (Exim 4.92) (envelope-from ) id 1sTOrY-0000UE-9L; Mon, 15 Jul 2024 16:47:44 +0000 Received: by outflank-mailman (output) from mailman id 759073.1168684; Mon, 15 Jul 2024 16:47:44 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sTOrY-0000TW-3k; Mon, 15 Jul 2024 16:47:44 +0000 Received: by outflank-mailman (input) for mailman id 759073; Mon, 15 Jul 2024 16:47:42 +0000 Received: from se1-gles-flk1-in.inumbo.com ([94.247.172.50] helo=se1-gles-flk1.inumbo.com) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sTOrW-0006CY-Dl for xen-devel@lists.xenproject.org; Mon, 15 Jul 2024 16:47:42 +0000 Received: from support.bugseng.com (mail.bugseng.com [162.55.131.47]) by se1-gles-flk1.inumbo.com (Halon) with ESMTPS id f33504ea-42c9-11ef-8776-851b0ebba9a2; Mon, 15 Jul 2024 18:47:40 +0200 (CEST) Received: from truciolo.bugseng.com (unknown [37.163.111.28]) by support.bugseng.com (Postfix) with ESMTPSA id CC5E94EE0739; Mon, 15 Jul 2024 18:47:39 +0200 (CEST) X-Outflank-Mailman: Message body and most headers restored to incoming version X-BeenThere: xen-devel@lists.xenproject.org List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xenproject.org Precedence: list Sender: "Xen-devel" X-Inumbo-ID: f33504ea-42c9-11ef-8776-851b0ebba9a2 From: Federico Serafini To: xen-devel@lists.xenproject.org Cc: consulting@bugseng.com, Federico Serafini Subject: [XEN PATCH v4 8/9] x86/mm: add defensive return Date: Mon, 15 Jul 2024 18:47:21 +0200 Message-Id: X-Mailer: git-send-email 2.34.1 In-Reply-To: References: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-ZM-MESSAGEID: 1721062084356116600 Content-Type: text/plain; charset="utf-8" Add defensive return statement at the end of an unreachable default case. Other than improve safety, this meets the requirements to deviate a violation of MISRA C Rule 16.3: "An unconditional `break' statement shall terminate every switch-clause". Signed-off-by: Federico Serafini Reviewed-by: Stefano Stabellini --- No changes from v3, further feedback on this thread would be appreciated: https://lists.xenproject.org/archives/html/xen-devel/2024-07/msg00474.html --- xen/arch/x86/mm.c | 1 + 1 file changed, 1 insertion(+) diff --git a/xen/arch/x86/mm.c b/xen/arch/x86/mm.c index 648d6dd475..a1e28b3360 100644 --- a/xen/arch/x86/mm.c +++ b/xen/arch/x86/mm.c @@ -916,6 +916,7 @@ get_page_from_l1e( return 0; default: ASSERT_UNREACHABLE(); + return -EPERM; } } else if ( l1f & _PAGE_RW ) --=20 2.34.1 From nobody Mon Sep 16 19:19:38 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) client-ip=192.237.175.120; envelope-from=xen-devel-bounces@lists.xenproject.org; helo=lists.xenproject.org; Authentication-Results: mx.zohomail.com; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org Return-Path: Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) by mx.zohomail.com with SMTPS id 1721062084212350.7657191222394; Mon, 15 Jul 2024 09:48:04 -0700 (PDT) Received: from list by lists.xenproject.org with outflank-mailman.759074.1168692 (Exim 4.92) (envelope-from ) id 1sTOrY-0000d0-Uy; Mon, 15 Jul 2024 16:47:44 +0000 Received: by outflank-mailman (output) from mailman id 759074.1168692; Mon, 15 Jul 2024 16:47:44 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sTOrY-0000bG-Lp; Mon, 15 Jul 2024 16:47:44 +0000 Received: by outflank-mailman (input) for mailman id 759074; Mon, 15 Jul 2024 16:47:42 +0000 Received: from se1-gles-sth1-in.inumbo.com ([159.253.27.254] helo=se1-gles-sth1.inumbo.com) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sTOrW-000798-Lu for xen-devel@lists.xenproject.org; Mon, 15 Jul 2024 16:47:42 +0000 Received: from support.bugseng.com (mail.bugseng.com [162.55.131.47]) by se1-gles-sth1.inumbo.com (Halon) with ESMTPS id f3d5e52f-42c9-11ef-bbfb-fd08da9f4363; Mon, 15 Jul 2024 18:47:42 +0200 (CEST) Received: from truciolo.bugseng.com (unknown [37.163.111.28]) by support.bugseng.com (Postfix) with ESMTPSA id 136764EE0737; Mon, 15 Jul 2024 18:47:40 +0200 (CEST) X-Outflank-Mailman: Message body and most headers restored to incoming version X-BeenThere: xen-devel@lists.xenproject.org List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xenproject.org Precedence: list Sender: "Xen-devel" X-Inumbo-ID: f3d5e52f-42c9-11ef-bbfb-fd08da9f4363 From: Federico Serafini To: xen-devel@lists.xenproject.org Cc: consulting@bugseng.com, Federico Serafini , Stefano Stabellini , Jan Beulich Subject: [XEN PATCH v4 9/9] x86/mpparse: address a violation of MISRA C Rule 16.3 Date: Mon, 15 Jul 2024 18:47:22 +0200 Message-Id: X-Mailer: git-send-email 2.34.1 In-Reply-To: References: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-ZM-MESSAGEID: 1721062086369116600 Content-Type: text/plain; charset="utf-8" Add a missing break statement to address a violation of MISRA C Rule 16.3: "An unconditional `break' statement shall terminate every switch-clause". No functional change. Signed-off-by: Federico Serafini Reviewed-by: Stefano Stabellini Acked-by: Jan Beulich --- xen/arch/x86/mpparse.c | 1 + 1 file changed, 1 insertion(+) diff --git a/xen/arch/x86/mpparse.c b/xen/arch/x86/mpparse.c index d8ccab2449..306d8ed97a 100644 --- a/xen/arch/x86/mpparse.c +++ b/xen/arch/x86/mpparse.c @@ -544,6 +544,7 @@ static inline void __init construct_default_ISA_mptable= (int mpc_default_type) case 4: case 7: memcpy(bus.mpc_bustype, "MCA ", 6); + break; } MP_bus_info(&bus); if (mpc_default_type > 4) { --=20 2.34.1