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

[PATCH v2 3/4] xen/pci-swiotlb: reduce visibility of symbols


  • To: Juergen Gross <jgross@xxxxxxxx>, Boris Ostrovsky <boris.ostrovsky@xxxxxxxxxx>
  • From: Jan Beulich <jbeulich@xxxxxxxx>
  • Date: Fri, 17 Sep 2021 12:49:04 +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=kndVqjY9sCpaHVWNklWOKb8oFcdnKBVKLygRhlHka6U=; b=QoLU57JC/x81rEFxjlfeX6kCbuxpTWzm8rUaFZ/IWYGStvQlfH2VnwEh0Q+oXre8WysIiQN9pIpiUSiPcT0lE1xyY5+EqRF7Ux1eU9hV1yVQ86NAIYGlDw2OfpqIg4hdZ4xv6JFx8qrm9oswts//eKLJ1cMUoltg+/gxiNiDbQJbEAHFnbi/oqXfxi9GzEghmLU8umfsu2GqBLZ1xSetSdyBU4EC9v7FpR95tOfwzR5CRhqRCVPcA1fFbAYZs6Pe8eZZED4UhoD4As7FrF+i9vvKQanCOfOSB3EmJJI/v1GEc4rbwx5JnU/EKbvJx8FzikvOVgDFKwzfDaN9F/mblA==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=KmFMBGQFtMAd5FDk1XbObktPuQyY9PE29Vh1aztnY4BW2K8F3rL3Qt7cpX3iN8hKygHqsKIzGnRBP+QrxMLyEivpMih4CTbVQaj3oTzcSQ/+/9RArJPzdHz+35PspHpCEJOEn8v106F4WVG3l3b/64uW4Tn/gbReK++FEINH6P0aMCxqhx206x2BCBN+qONLjN9eCVFJ0A0qO/Wu5cl9MsvoUF5c73ao2IPIsFiC+vz4v6o80E0t2Vcd94k5VYJ0IUMAAGS/n9uFzaWLCBsP4c6cDSicJmi0xLNmXKujz58wz8ygb2r3f3RCzwaOnadNHUjXWsHgR5al5/zn6VDSdw==
  • Authentication-results: lists.linux-foundation.org; dkim=none (message not signed) header.d=none;lists.linux-foundation.org; dmarc=none action=none header.from=suse.com;
  • Cc: Stefano Stabellini <sstabellini@xxxxxxxxxx>, lkml <linux-kernel@xxxxxxxxxxxxxxx>, "xen-devel@xxxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxxx>, "hch@xxxxxx" <hch@xxxxxx>, Konrad Wilk <konrad.wilk@xxxxxxxxxx>, "iommu@xxxxxxxxxxxxxxxxxxxxxxxxxx" <iommu@xxxxxxxxxxxxxxxxxxxxxxxxxx>
  • Delivery-date: Fri, 17 Sep 2021 10:49:15 +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>
Reviewed-by: Christoph Hellwig <hch@xxxxxx>

--- 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®.