From patchwork Tue Dec 5 11:55:55 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Federico Serafini X-Patchwork-Id: 13480113 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 E7AFDC4167B for ; Tue, 5 Dec 2023 11:57:04 +0000 (UTC) Received: from list by lists.xenproject.org with outflank-mailman.647704.1011289 (Exim 4.92) (envelope-from ) id 1rAU27-0001PY-1Q; Tue, 05 Dec 2023 11:56:11 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 647704.1011289; Tue, 05 Dec 2023 11:56:10 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1rAU26-0001NY-QH; Tue, 05 Dec 2023 11:56:10 +0000 Received: by outflank-mailman (input) for mailman id 647704; Tue, 05 Dec 2023 11:56:09 +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 1rAU25-0008Co-A4 for xen-devel@lists.xenproject.org; Tue, 05 Dec 2023 11:56:09 +0000 Received: from support.bugseng.com (mail.bugseng.com [162.55.131.47]) by se1-gles-sth1.inumbo.com (Halon) with ESMTPS id 44f7385f-9365-11ee-98e5-6d05b1d4d9a1; Tue, 05 Dec 2023 12:56:05 +0100 (CET) Received: from Dell.homenet.telecomitalia.it (host-79-46-48-173.retail.telecomitalia.it [79.46.48.173]) by support.bugseng.com (Postfix) with ESMTPSA id CC5C64EE074D; Tue, 5 Dec 2023 12:56:04 +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: 44f7385f-9365-11ee-98e5-6d05b1d4d9a1 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?= , Andrew Cooper , George Dunlap , Julien Grall , Stefano Stabellini , Wei Liu Subject: [XEN PATCH 6/6] xen/pci: address violations of MISRA C:2012 Rule 8.2 Date: Tue, 5 Dec 2023 12:55:55 +0100 Message-Id: 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. Furthermore, use C standard types to comply with XEN coding style. No functional change. Signed-off-by: Federico Serafini Reviewed-by: Stefano Stabellini Acked-by: Jan Beulich --- xen/drivers/passthrough/pci.c | 8 ++++---- xen/include/xen/pci.h | 3 ++- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/xen/drivers/passthrough/pci.c b/xen/drivers/passthrough/pci.c index 04d00c7c37..28ed8ea817 100644 --- a/xen/drivers/passthrough/pci.c +++ b/xen/drivers/passthrough/pci.c @@ -104,9 +104,9 @@ static struct pci_seg *alloc_pseg(u16 seg) } static int pci_segments_iterate( - int (*handler)(struct pci_seg *, void *), void *arg) + int (*handler)(struct pci_seg *pseg, void *arg), void *arg) { - u16 seg = 0; + uint16_t seg = 0; int rc = 0; do { @@ -1077,7 +1077,7 @@ int __init scan_pci_devices(void) struct setup_hwdom { struct domain *d; - int (*handler)(u8 devfn, struct pci_dev *); + int (*handler)(uint8_t devfn, struct pci_dev *pdev); }; static void __hwdom_init setup_one_hwdom_device(const struct setup_hwdom *ctxt, @@ -1157,7 +1157,7 @@ static int __hwdom_init cf_check _setup_hwdom_pci_devices( } void __hwdom_init setup_hwdom_pci_devices( - struct domain *d, int (*handler)(u8 devfn, struct pci_dev *)) + struct domain *d, int (*handler)(uint8_t devfn, struct pci_dev *pdev)) { struct setup_hwdom ctxt = { .d = d, .handler = handler }; diff --git a/xen/include/xen/pci.h b/xen/include/xen/pci.h index 50d7dfb2a2..a3b7434818 100644 --- a/xen/include/xen/pci.h +++ b/xen/include/xen/pci.h @@ -178,7 +178,8 @@ enum pdev_type pdev_type(u16 seg, u8 bus, u8 devfn); int find_upstream_bridge(u16 seg, u8 *bus, u8 *devfn, u8 *secbus); void setup_hwdom_pci_devices(struct domain *d, - int (*handler)(u8 devfn, struct pci_dev *pdev)); + int (*handler)(uint8_t devfn, + struct pci_dev *pdev)); int pci_release_devices(struct domain *d); void pci_segments_init(void); int pci_add_segment(u16 seg);