Skip to content

Commit 8e1034a

Browse files
jbeulichjgross1
authored andcommitted
xen/pci-swiotlb: reduce visibility of symbols
xen_swiotlb and pci_xen_swiotlb_init() are only used within the file defining them, so make them static and remove the stubs. Otoh pci_xen_swiotlb_detect() has a use (as function pointer) from the main pci-swiotlb.c file - convert its stub to a #define to NULL. Signed-off-by: Jan Beulich <[email protected]> Reviewed-by: Christoph Hellwig <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Juergen Gross <[email protected]>
1 parent e243ae9 commit 8e1034a

File tree

2 files changed

+3
-7
lines changed

2 files changed

+3
-7
lines changed

arch/x86/include/asm/xen/swiotlb-xen.h

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,14 +3,10 @@
33
#define _ASM_X86_SWIOTLB_XEN_H
44

55
#ifdef CONFIG_SWIOTLB_XEN
6-
extern int xen_swiotlb;
76
extern int __init pci_xen_swiotlb_detect(void);
8-
extern void __init pci_xen_swiotlb_init(void);
97
extern int pci_xen_swiotlb_init_late(void);
108
#else
11-
#define xen_swiotlb (0)
12-
static inline int __init pci_xen_swiotlb_detect(void) { return 0; }
13-
static inline void __init pci_xen_swiotlb_init(void) { }
9+
#define pci_xen_swiotlb_detect NULL
1410
static inline int pci_xen_swiotlb_init_late(void) { return -ENXIO; }
1511
#endif
1612

arch/x86/xen/pci-swiotlb-xen.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
#endif
1919
#include <linux/export.h>
2020

21-
int xen_swiotlb __read_mostly;
21+
static int xen_swiotlb __read_mostly;
2222

2323
/*
2424
* pci_xen_swiotlb_detect - set xen_swiotlb to 1 if necessary
@@ -56,7 +56,7 @@ int __init pci_xen_swiotlb_detect(void)
5656
return xen_swiotlb;
5757
}
5858

59-
void __init pci_xen_swiotlb_init(void)
59+
static void __init pci_xen_swiotlb_init(void)
6060
{
6161
if (xen_swiotlb) {
6262
xen_swiotlb_init_early();

0 commit comments

Comments
 (0)