[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[PATCH 11/12] xen/pci-swiotlb: reduce visibility of symbols


  • To: Juergen Gross <jgross@xxxxxxxx>, Boris Ostrovsky <boris.ostrovsky@xxxxxxxxxx>
  • From: Jan Beulich <jbeulich@xxxxxxxx>
  • Date: Tue, 7 Sep 2021 14:11:14 +0200
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=suse.com; dmarc=pass action=none header.from=suse.com; dkim=pass header.d=suse.com; arc=none
  • Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=w/4sgXZWL5TyOKqIEB0uUbPnSshL/83p3qgV1ftBS1M=; b=lHmvz+NiNzSTlSrLOMxEGmfUSa6GiUMaikp6c9ZxF5uOa+1a8WReH4Xgfh1Ce8K68q4U3nLG+dQf6E9yy7lcD3D4tUMeF9bX2GN5KzgIXNyhx8kdljvnADorvItx1U/+/WxiYMrGNxsMyBVnF0YoHmsxkSlh06YnC1+m9cOmaXCFLiujSwxs7uTnhpytwdpUIHGkI4OroIlZgCq22RNf1h1kfWrF8OZbRGGo4RoTniRC7nhSOjnJfhsFp8ErY6s7Bp7Yizb45IEpc6uKGXLZ0yQOv5/fFB4ZqbY1HI0ZWXcaWBy6Kt351euSCasqdQ+Xzsjpsa9INTXZsDkhAFGSUw==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=By2MW81/o1kLuXrOUuM8q6oL3Ze9TE5xrmCWM8vczKO7aSWDhmJFL4M24jRQdjpV91rymu43Qyb6txMna7daDikJY5AKBxfzMV1G7lfA3un0sjyNuzyJLkOteTjvD9p4my5SAmsBMNJy3RTDF8Vwnv1CCAKcTd7Nxk13p/8d7sxUP8fb781Nnsuk7u3tFjAjNDv81uFKDQLy9pU3rIRAV8RfGyYO+nyjWHI0GMsEpVbvNGER4PnG6gCuM2DshNeq2+MT+eofI1D3tkdImsxMsngg8eMGasNmRC0oIK2L2t3b5fqJcl+s9fFp1rmbzxhbexhOzcvwb2I3c1y+o0BISQ==
  • Authentication-results: lists.xenproject.org; dkim=none (message not signed) header.d=none;lists.xenproject.org; dmarc=none action=none header.from=suse.com;
  • Cc: Stefano Stabellini <sstabellini@xxxxxxxxxx>, lkml <linux-kernel@xxxxxxxxxxxxxxx>, "xen-devel@xxxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxxx>
  • Delivery-date: Tue, 07 Sep 2021 12:11:22 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

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 <jbeulich@xxxxxxxx>

--- a/arch/x86/include/asm/xen/swiotlb-xen.h
+++ b/arch/x86/include/asm/xen/swiotlb-xen.h
@@ -3,14 +3,10 @@
 #define _ASM_X86_SWIOTLB_XEN_H
 
 #ifdef CONFIG_SWIOTLB_XEN
-extern int xen_swiotlb;
 extern int __init pci_xen_swiotlb_detect(void);
-extern void __init pci_xen_swiotlb_init(void);
 extern int pci_xen_swiotlb_init_late(void);
 #else
-#define xen_swiotlb (0)
-static inline int __init pci_xen_swiotlb_detect(void) { return 0; }
-static inline void __init pci_xen_swiotlb_init(void) { }
+#define pci_xen_swiotlb_detect NULL
 static inline int pci_xen_swiotlb_init_late(void) { return -ENXIO; }
 #endif
 
--- a/arch/x86/xen/pci-swiotlb-xen.c
+++ b/arch/x86/xen/pci-swiotlb-xen.c
@@ -18,7 +18,7 @@
 #endif
 #include <linux/export.h>
 
-int xen_swiotlb __read_mostly;
+static int xen_swiotlb __read_mostly;
 
 /*
  * pci_xen_swiotlb_detect - set xen_swiotlb to 1 if necessary
@@ -56,7 +56,7 @@ int __init pci_xen_swiotlb_detect(void)
        return xen_swiotlb;
 }
 
-void __init pci_xen_swiotlb_init(void)
+static void __init pci_xen_swiotlb_init(void)
 {
        if (xen_swiotlb) {
                xen_swiotlb_init_early();




 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.