From patchwork Fri Nov 24 14:03:22 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Federico Serafini X-Patchwork-Id: 13467701 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 6FE09C61D97 for ; Fri, 24 Nov 2023 14:05:13 +0000 (UTC) Received: from list by lists.xenproject.org with outflank-mailman.640738.999434 (Exim 4.92) (envelope-from ) id 1r6WnZ-00071b-G5; Fri, 24 Nov 2023 14:04:49 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 640738.999434; Fri, 24 Nov 2023 14:04:49 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1r6WnZ-0006zl-4u; Fri, 24 Nov 2023 14:04:49 +0000 Received: by outflank-mailman (input) for mailman id 640738; Fri, 24 Nov 2023 14:04:48 +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 1r6WnX-0005N1-S4 for xen-devel@lists.xenproject.org; Fri, 24 Nov 2023 14:04:47 +0000 Received: from support.bugseng.com (mail.bugseng.com [162.55.131.47]) by se1-gles-flk1.inumbo.com (Halon) with ESMTPS id 6c72c5f2-8ad2-11ee-9b0e-b553b5be7939; Fri, 24 Nov 2023 15:04:46 +0100 (CET) Received: from Dell.bugseng.com (unknown [37.161.237.167]) by support.bugseng.com (Postfix) with ESMTPSA id 87C9C4EE0C92; Fri, 24 Nov 2023 15:04:45 +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: 6c72c5f2-8ad2-11ee-9b0e-b553b5be7939 From: Federico Serafini To: xen-devel@lists.xenproject.org Cc: consulting@bugseng.com, Federico Serafini , Jan Beulich , Paul Durrant , =?utf-8?q?Rog?= =?utf-8?q?er_Pau_Monn=C3=A9?= Subject: [XEN PATCH 07/11] xen/iommu: address violations of MISRA C:2012 Rule 8.2 Date: Fri, 24 Nov 2023 15:03:22 +0100 Message-Id: <85581b19ffe10276639683aff56d04f3f74abd6f.1700832962.git.federico.serafini@bugseng.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: References: MIME-Version: 1.0 Add missing parameter names to address violations of MISRA C:2012 Rule 8.2 and remove uses of u{8,16,32} in favor of C standard types. No functional change. Signed-off-by: Federico Serafini Acked-by: Jan Beulich --- xen/include/xen/iommu.h | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/xen/include/xen/iommu.h b/xen/include/xen/iommu.h index d5c2577091..69d572543c 100644 --- a/xen/include/xen/iommu.h +++ b/xen/include/xen/iommu.h @@ -262,14 +262,15 @@ struct iommu_ops { int (*init)(struct domain *d); void (*hwdom_init)(struct domain *d); int (*quarantine_init)(device_t *dev, bool scratch_page); - int (*add_device)(u8 devfn, device_t *dev); + int (*add_device)(uint8_t devfn, device_t *dev); int (*enable_device)(device_t *dev); - int (*remove_device)(u8 devfn, device_t *dev); - int (*assign_device)(struct domain *, u8 devfn, device_t *dev, u32 flag); + int (*remove_device)(uint8_t devfn, device_t *dev); + int (*assign_device)(struct domain *d, uint8_t devfn, device_t *dev, + uint32_t flag); int (*reassign_device)(struct domain *s, struct domain *t, - u8 devfn, device_t *dev); + uint8_t devfn, device_t *dev); #ifdef CONFIG_HAS_PCI - int (*get_device_group_id)(u16 seg, u8 bus, u8 devfn); + int (*get_device_group_id)(uint16_t seg, uint8_t bus, uint8_t devfn); #endif /* HAS_PCI */ void (*teardown)(struct domain *d); @@ -308,7 +309,7 @@ struct iommu_ops { int __must_check (*iotlb_flush)(struct domain *d, dfn_t dfn, unsigned long page_count, unsigned int flush_flags); - int (*get_reserved_device_memory)(iommu_grdm_t *, void *); + int (*get_reserved_device_memory)(iommu_grdm_t *func, void *ctxt); void (*dump_page_tables)(struct domain *d); #ifdef CONFIG_HAS_DEVICE_TREE