From patchwork Mon Dec 11 10:30:21 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nicola Vetrini X-Patchwork-Id: 13486988 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 5BC83C10DC3 for ; Mon, 11 Dec 2023 10:30:56 +0000 (UTC) Received: from list by lists.xenproject.org with outflank-mailman.651594.1017312 (Exim 4.92) (envelope-from ) id 1rCdYb-0005BT-6f; Mon, 11 Dec 2023 10:30:37 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 651594.1017312; Mon, 11 Dec 2023 10:30:37 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1rCdYb-0005BM-37; Mon, 11 Dec 2023 10:30:37 +0000 Received: by outflank-mailman (input) for mailman id 651594; Mon, 11 Dec 2023 10:30:35 +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 1rCdYZ-00059V-GZ for xen-devel@lists.xenproject.org; Mon, 11 Dec 2023 10:30:35 +0000 Received: from support.bugseng.com (mail.bugseng.com [162.55.131.47]) by se1-gles-sth1.inumbo.com (Halon) with ESMTPS id 508176d3-9810-11ee-98e8-6d05b1d4d9a1; Mon, 11 Dec 2023 11:30:33 +0100 (CET) Received: from nico.bugseng.com (unknown [147.123.100.131]) by support.bugseng.com (Postfix) with ESMTPSA id 584A64EE073E; Mon, 11 Dec 2023 11:30:31 +0100 (CET) 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: 508176d3-9810-11ee-98e8-6d05b1d4d9a1 From: Nicola Vetrini To: xen-devel@lists.xenproject.org Cc: consulting@bugseng.com, Nicola Vetrini , Andrew Cooper , George Dunlap , Jan Beulich , Julien Grall , Stefano Stabellini , Wei Liu , =?utf-8?q?Roger_Pau_Monn=C3=A9?= , Bertrand Marquis , Michal Orzel , Volodymyr Babchuk , Dario Faggioli Subject: [XEN PATCH 0/7] address violations of MISRA C:2012 Rule 2.1 Date: Mon, 11 Dec 2023 11:30:21 +0100 Message-Id: X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 MISRA C:2012 Rule 2.1 states: "A project shall not contain unreachable code". As such, this series eliminates various instances of unreachable code found in Xen, by providing equivalent compliant constructs. This series is loosely based on my earlier series [1], but the overall approach has changed since; for instance, declarations without initialization are now ignored, as detailed in docs/misra/deviations.rst. [1] https://lore.kernel.org/xen-devel/cover.1690985045.git.nicola.vetrini@bugseng.com/ Nicola Vetrini (7): xen/shutdown: address MISRA C:2012 Rule 2.1 x86/mm: address MISRA C:2012 Rule 2.1 xen/arm: address MISRA C:2012 Rule 2.1 xen/sched: address MISRA C:2012 Rule 2.1 xen/arm: traps: add ASSERT_UNREACHABLE() where needed x86/platform: removed break to address MISRA C:2012 Rule 2.1 x86/xstate: move BUILD_BUG_ON to address MISRA C:2012 Rule 2.1 xen/arch/arm/mm.c | 2 +- xen/arch/arm/traps.c | 6 +++--- xen/arch/arm/vgic-v3-its.c | 10 +++++----- xen/arch/x86/mm.c | 6 +++--- xen/arch/x86/platform_hypercall.c | 1 - xen/arch/x86/xstate.c | 3 ++- xen/common/sched/core.c | 1 - xen/common/shutdown.c | 11 ++--------- xen/include/xen/shutdown.h | 2 +- 9 files changed, 17 insertions(+), 25 deletions(-)