From nobody Sun May 19 07:11:57 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) client-ip=192.237.175.120; envelope-from=xen-devel-bounces@lists.xenproject.org; helo=lists.xenproject.org; Authentication-Results: mx.zohomail.com; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org Return-Path: Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) by mx.zohomail.com with SMTPS id 1694420178123220.75147472157448; Mon, 11 Sep 2023 01:16:18 -0700 (PDT) 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 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-Outflank-Mailman: Message body and most headers restored to incoming version 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 Content-Transfer-Encoding: quoted-printable X-ZM-MESSAGEID: 1694420180109100001 Content-Type: text/plain; charset="utf-8" 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); =20 -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 d= evfn, 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 *b= us, - unsigned int *dev, unsigned int *func, bool *def= _seg); +const char *parse_pci(const char *s, unsigned int *seg_p, unsigned int *bu= s_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); =20 #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, unsign= ed int pos, uint64_t *paddr, uint64_t *psize, unsigned int flags); =20 -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); =20 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 gtab= le); +void msixtbl_pt_unregister(struct domain *d, struct pirq *pirq); void msixtbl_pt_cleanup(struct domain *d); =20 #ifdef CONFIG_HVM --=20 2.34.1