From: Jan Beulich via iommu <iommu@lists.linux-foundation.org>
To: Juergen Gross <jgross@suse.com>,
Boris Ostrovsky <boris.ostrovsky@oracle.com>
Cc: Stefano Stabellini <sstabellini@kernel.org>,
Konrad Wilk <konrad.wilk@oracle.com>,
lkml <linux-kernel@vger.kernel.org>,
"iommu@lists.linux-foundation.org"
<iommu@lists.linux-foundation.org>,
"xen-devel@lists.xenproject.org" <xen-devel@lists.xenproject.org>,
"hch@lst.de" <hch@lst.de>
Subject: [PATCH v2 3/4] xen/pci-swiotlb: reduce visibility of symbols
Date: Fri, 17 Sep 2021 12:49:04 +0200 [thread overview]
Message-ID: <aef5fc33-9c02-4df0-906a-5c813142e13c@suse.com> (raw)
In-Reply-To: <164e58ff-2edd-2c99-ac3d-e18eb06ff731@suse.com>
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@suse.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
--- 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();
_______________________________________________
iommu mailing list
iommu@lists.linux-foundation.org
https://lists.linuxfoundation.org/mailman/listinfo/iommu
next prev parent reply other threads:[~2021-09-17 10:51 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-09-17 10:43 [PATCH v2 0/4] swiotlb-xen: remaining fixes and adjustments Jan Beulich via iommu
2021-09-17 10:45 ` [PATCH v2 1/4] swiotlb-xen: ensure to issue well-formed XENMEM_exchange requests Jan Beulich via iommu
2021-09-17 20:04 ` Stefano Stabellini
2021-09-17 10:48 ` [PATCH v2 2/4] PCI: only build xen-pcifront in PV-enabled environments Jan Beulich via iommu
2021-09-17 16:28 ` Bjorn Helgaas
2021-09-17 10:49 ` Jan Beulich via iommu [this message]
2021-09-17 10:50 ` [PATCH v2 4/4] swiotlb-xen: this is PV-only on x86 Jan Beulich via iommu
2021-09-20 15:19 ` [PATCH v2 0/4] swiotlb-xen: remaining fixes and adjustments Juergen Gross via iommu
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=aef5fc33-9c02-4df0-906a-5c813142e13c@suse.com \
--to=iommu@lists.linux-foundation.org \
--cc=boris.ostrovsky@oracle.com \
--cc=hch@lst.de \
--cc=jbeulich@suse.com \
--cc=jgross@suse.com \
--cc=konrad.wilk@oracle.com \
--cc=linux-kernel@vger.kernel.org \
--cc=sstabellini@kernel.org \
--cc=xen-devel@lists.xenproject.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox