From patchwork Wed Dec 13 16:10:49 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simone Ballarin X-Patchwork-Id: 13491586 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 32DC8C4332F for ; Wed, 13 Dec 2023 16:12:28 +0000 (UTC) Received: from list by lists.xenproject.org with outflank-mailman.654092.1020750 (Exim 4.92) (envelope-from ) id 1rDRqB-0007ym-3j; Wed, 13 Dec 2023 16:12:07 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 654092.1020750; Wed, 13 Dec 2023 16:12:07 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1rDRqB-0007yf-1A; Wed, 13 Dec 2023 16:12:07 +0000 Received: by outflank-mailman (input) for mailman id 654092; Wed, 13 Dec 2023 16:12:05 +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 1rDRq9-0007yZ-7N for xen-devel@lists.xenproject.org; Wed, 13 Dec 2023 16:12:05 +0000 Received: from support.bugseng.com (mail.bugseng.com [162.55.131.47]) by se1-gles-flk1.inumbo.com (Halon) with ESMTPS id 59f7d8e0-99d2-11ee-9b0f-b553b5be7939; Wed, 13 Dec 2023 17:12:02 +0100 (CET) Received: from beta.station (net-37-182-35-120.cust.vodafonedsl.it [37.182.35.120]) by support.bugseng.com (Postfix) with ESMTPSA id D99BA4EE0737; Wed, 13 Dec 2023 17:12:01 +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: 59f7d8e0-99d2-11ee-9b0f-b553b5be7939 From: Simone Ballarin To: xen-devel@lists.xenproject.org Cc: consulting@bugseng.com, Maria Celeste Cesario , Jan Beulich , Andrew Cooper , =?utf-8?q?Roger_Pau_Monn=C3=A9?= , Wei Liu , Kevin Tian Subject: [PATCH v2 0/2] xen: address violations of MISRA C:2012 Rule 14.4 Date: Wed, 13 Dec 2023 17:10:49 +0100 Message-Id: X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 From: Maria Celeste Cesario The xen sources contain violations of MISRA C:2012 Rule 14.4 whose headline states: "The controlling expression of an if statement and the controlling expression of an iteration-statement shall have essentially Boolean type". Add comparisons to avoid using enum constants as controlling expressions to comply with Rule 14.4. Changes in v2: - rename patch prefix from AMD/IOMMU to x86/IOMMU; - move changes on hpet.c and msi.c from xen/x86 to x86/IOMMU patch; - rename patch prefix from xen/x86 to xen/x86_emulate. Maria Celeste Cesario (2): x86/IOMMU: address violations of MISRA C:2012 Rule 14.4 xen/x86_emulate: address violations of MISRA C:2012 Rule 14.4 xen/arch/x86/hpet.c | 6 +++--- xen/arch/x86/msi.c | 4 ++-- xen/arch/x86/x86_emulate/x86_emulate.c | 8 ++++---- xen/drivers/passthrough/amd/iommu_init.c | 4 ++-- xen/drivers/passthrough/vtd/iommu.c | 4 ++-- xen/drivers/passthrough/vtd/quirks.c | 2 +- 6 files changed, 14 insertions(+), 14 deletions(-)