diff mbox series

[XEN,6/6] xen/pci: address violations of MISRA C:2012 Rule 8.2

Message ID f84479a28a7f9d6e44829259229460dcf7c497c4.1701764980.git.federico.serafini@bugseng.com (mailing list archive)
State Superseded
Headers show
Series xen: address violations of MISRA C:2012 Rule 8.2 | expand

Commit Message

Federico Serafini Dec. 5, 2023, 11:55 a.m. UTC
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 <federico.serafini@bugseng.com>
---
 xen/drivers/passthrough/pci.c | 8 ++++----
 xen/include/xen/pci.h         | 3 ++-
 2 files changed, 6 insertions(+), 5 deletions(-)

Comments

Stefano Stabellini Dec. 6, 2023, 3:20 a.m. UTC | #1
On Tue, 5 Dec 2023, Federico Serafini wrote:
> 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 <federico.serafini@bugseng.com>

Reviewed-by: Stefano Stabellini <sstabellini@kernel.org>
Jan Beulich Dec. 6, 2023, 8:57 a.m. UTC | #2
On 06.12.2023 04:20, Stefano Stabellini wrote:
> On Tue, 5 Dec 2023, Federico Serafini wrote:
>> 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 <federico.serafini@bugseng.com>
> 
> Reviewed-by: Stefano Stabellini <sstabellini@kernel.org>

Acked-by: Jan Beulich <jbeulich@suse.com>
diff mbox series

Patch

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);