]> xenbits.xensource.com Git - xen.git/commitdiff
vpci/msix: make 'get_slot' static
authorNicola Vetrini <nicola.vetrini@bugseng.com>
Thu, 17 Aug 2023 12:39:27 +0000 (14:39 +0200)
committerAndrew Cooper <andrew.cooper3@citrix.com>
Wed, 23 Aug 2023 18:07:21 +0000 (19:07 +0100)
The function can become static since it's used only within this file.
This also resolves a violation of MISRA C:2012 Rule 8.4 due to the absence
of a declaration before the function definition.

Fixes: b177892d2d0e ("vpci/msix: handle accesses adjacent to the MSI-X table")
Signed-off-by: Nicola Vetrini <nicola.vetrini@bugseng.com>
Reviewed-by: Stefano Stabellini <sstabellini@kernel.org>
Reviewed-by: Roger Pau Monné <roger.pau@citrix.com>
xen/drivers/vpci/msix.c

index 25bde77586a47fdf747148409b7f193241e9e881..f9df506f29bf92f1cfee79aa376f08290ab8bcd6 100644 (file)
@@ -223,7 +223,7 @@ static void __iomem *get_table(const struct vpci *vpci, unsigned int slot)
     return msix->table[slot];
 }
 
-unsigned int get_slot(const struct vpci *vpci, unsigned long addr)
+static unsigned int get_slot(const struct vpci *vpci, unsigned long addr)
 {
     unsigned long pfn = PFN_DOWN(addr);