From patchwork Mon Sep 11 08:15:35 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Federico Serafini X-Patchwork-Id: 13379000 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 380F5EE7FF4 for ; Mon, 11 Sep 2023 08:16:07 +0000 (UTC) Received: from list by lists.xenproject.org with outflank-mailman.599120.934388 (Exim 4.92) (envelope-from ) id 1qfc5J-0002aK-HW; Mon, 11 Sep 2023 08:15:53 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 599120.934388; Mon, 11 Sep 2023 08:15:53 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1qfc5J-0002aD-Eh; Mon, 11 Sep 2023 08:15:53 +0000 Received: by outflank-mailman (input) for mailman id 599120; Mon, 11 Sep 2023 08:15:52 +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 1qfc5I-0002a7-O7 for xen-devel@lists.xenproject.org; Mon, 11 Sep 2023 08:15:52 +0000 Received: from support.bugseng.com (mail.bugseng.com [162.55.131.47]) by se1-gles-sth1.inumbo.com (Halon) with ESMTPS id 6bb45f02-507b-11ee-8784-cb3800f73035; Mon, 11 Sep 2023 10:15:51 +0200 (CEST) Received: from Dell.homenet.telecomitalia.it (host-87-19-206-190.retail.telecomitalia.it [87.19.206.190]) by support.bugseng.com (Postfix) with ESMTPSA id B6D2C4EE0741; Mon, 11 Sep 2023 10:15:50 +0200 (CEST) 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: 6bb45f02-507b-11ee-8784-cb3800f73035 From: Federico Serafini To: xen-devel@lists.xenproject.org Cc: consulting@bugseng.com, Federico Serafini , Andrew Cooper , George Dunlap , Jan Beulich , Julien Grall , Stefano Stabellini , Wei Liu Subject: [XEN PATCH] xen/PCI: address violations of MISRA C:2012 Rules 8.2 and 8.3 Date: Mon, 11 Sep 2023 10:15:35 +0200 Message-Id: X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 Add missing parameter names and make function declarations and definitions consistent. No functional change. Signed-off-by: Federico Serafini Acked-by: Jan Beulich --- xen/include/xen/pci.h | 23 ++++++++++++----------- 1 file changed, 12 insertions(+), 11 deletions(-) diff --git a/xen/include/xen/pci.h b/xen/include/xen/pci.h index 7d8a7cd213..3ed79d15cd 100644 --- a/xen/include/xen/pci.h +++ b/xen/include/xen/pci.h @@ -166,14 +166,14 @@ int scan_pci_devices(void); 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 *, - int (*)(u8 devfn, struct pci_dev *)); +void setup_hwdom_pci_devices(struct domain *d, + int (*handler)(u8 devfn, struct pci_dev *pdev)); int pci_release_devices(struct domain *d); void pci_segments_init(void); int pci_add_segment(u16 seg); const unsigned long *pci_get_ro_map(u16 seg); int pci_add_device(u16 seg, u8 bus, u8 devfn, - const struct pci_dev_info *, nodeid_t node); + const struct pci_dev_info *info, nodeid_t node); int pci_remove_device(u16 seg, u8 bus, u8 devfn); int pci_ro_device(int seg, int bus, int devfn); int pci_hide_device(unsigned int seg, unsigned int bus, unsigned int devfn); @@ -198,10 +198,11 @@ int pci_find_next_cap(u16 seg, u8 bus, unsigned int devfn, u8 pos, int cap); int pci_find_ext_capability(int seg, int bus, int devfn, int cap); int pci_find_next_ext_capability(int seg, int bus, int devfn, int start, int cap); -const char *parse_pci(const char *, unsigned int *seg, unsigned int *bus, - unsigned int *dev, unsigned int *func); -const char *parse_pci_seg(const char *, unsigned int *seg, unsigned int *bus, - unsigned int *dev, unsigned int *func, bool *def_seg); +const char *parse_pci(const char *s, unsigned int *seg_p, unsigned int *bus_p, + unsigned int *dev_p, unsigned int *func_p); +const char *parse_pci_seg(const char *s, unsigned int *seg_p, + unsigned int *bus_p, unsigned int *dev_p, + unsigned int *func_p, bool *def_seg); #define PCI_BAR_VF (1u << 0) #define PCI_BAR_LAST (1u << 1) @@ -210,12 +211,12 @@ unsigned int pci_size_mem_bar(pci_sbdf_t sbdf, unsigned int pos, uint64_t *paddr, uint64_t *psize, unsigned int flags); -void pci_intx(const struct pci_dev *, bool enable); -bool pcie_aer_get_firmware_first(const struct pci_dev *); +void pci_intx(const struct pci_dev *pdev, bool enable); +bool pcie_aer_get_firmware_first(const struct pci_dev *pdev); struct pirq; -int msixtbl_pt_register(struct domain *, struct pirq *, uint64_t gtable); -void msixtbl_pt_unregister(struct domain *, struct pirq *); +int msixtbl_pt_register(struct domain *d, struct pirq *pirq, uint64_t gtable); +void msixtbl_pt_unregister(struct domain *d, struct pirq *pirq); void msixtbl_pt_cleanup(struct domain *d); #ifdef CONFIG_HVM