提交 b8b0f559 编写于 作者: K Konrad Rzeszutek Wilk

xen/apic/xenbus/swiotlb/pcifront/grant/tmem: Make functions or variables static.

There is no need for those functions/variables to be visible. Make them
static and also fix the compile warnings of this sort:

drivers/xen/<some file>.c: warning: symbol '<blah>' was not declared. Should it be static?

Some of them just require including the header file that
declares the functions.
Signed-off-by: NKonrad Rzeszutek Wilk <konrad.wilk@oracle.com>
上级 4d9310e3
...@@ -6,8 +6,9 @@ ...@@ -6,8 +6,9 @@
#include <xen/xen.h> #include <xen/xen.h>
#include <xen/interface/physdev.h> #include <xen/interface/physdev.h>
#include "xen-ops.h"
unsigned int xen_io_apic_read(unsigned apic, unsigned reg) static unsigned int xen_io_apic_read(unsigned apic, unsigned reg)
{ {
struct physdev_apic apic_op; struct physdev_apic apic_op;
int ret; int ret;
......
...@@ -79,6 +79,8 @@ ...@@ -79,6 +79,8 @@
#include "smp.h" #include "smp.h"
#include "multicalls.h" #include "multicalls.h"
#include <xen/events.h>
EXPORT_SYMBOL_GPL(hypercall_page); EXPORT_SYMBOL_GPL(hypercall_page);
DEFINE_PER_CPU(struct vcpu_info *, xen_vcpu); DEFINE_PER_CPU(struct vcpu_info *, xen_vcpu);
......
...@@ -8,6 +8,7 @@ ...@@ -8,6 +8,7 @@
#include <xen/xen.h> #include <xen/xen.h>
#include <asm/iommu_table.h> #include <asm/iommu_table.h>
#include <asm/xen/swiotlb-xen.h>
int xen_swiotlb __read_mostly; int xen_swiotlb __read_mostly;
static struct dma_map_ops xen_swiotlb_dma_ops = { static struct dma_map_ops xen_swiotlb_dma_ops = {
......
...@@ -24,6 +24,7 @@ ...@@ -24,6 +24,7 @@
#include <linux/module.h> #include <linux/module.h>
#include <xen/platform_pci.h> #include <xen/platform_pci.h>
#include "xen-ops.h"
#define XEN_PLATFORM_ERR_MAGIC -1 #define XEN_PLATFORM_ERR_MAGIC -1
#define XEN_PLATFORM_ERR_PROTOCOL -2 #define XEN_PLATFORM_ERR_PROTOCOL -2
......
...@@ -236,7 +236,7 @@ static int pcifront_bus_write(struct pci_bus *bus, unsigned int devfn, ...@@ -236,7 +236,7 @@ static int pcifront_bus_write(struct pci_bus *bus, unsigned int devfn,
return errno_to_pcibios_err(do_pci_op(pdev, &op)); return errno_to_pcibios_err(do_pci_op(pdev, &op));
} }
struct pci_ops pcifront_bus_ops = { static struct pci_ops pcifront_bus_ops = {
.read = pcifront_bus_read, .read = pcifront_bus_read,
.write = pcifront_bus_write, .write = pcifront_bus_write,
}; };
......
...@@ -445,7 +445,7 @@ static void mn_release(struct mmu_notifier *mn, ...@@ -445,7 +445,7 @@ static void mn_release(struct mmu_notifier *mn,
spin_unlock(&priv->lock); spin_unlock(&priv->lock);
} }
struct mmu_notifier_ops gntdev_mmu_ops = { static struct mmu_notifier_ops gntdev_mmu_ops = {
.release = mn_release, .release = mn_release,
.invalidate_page = mn_invl_page, .invalidate_page = mn_invl_page,
.invalidate_range_start = mn_invl_range_start, .invalidate_range_start = mn_invl_range_start,
......
...@@ -286,10 +286,9 @@ int gnttab_grant_foreign_access(domid_t domid, unsigned long frame, ...@@ -286,10 +286,9 @@ int gnttab_grant_foreign_access(domid_t domid, unsigned long frame,
} }
EXPORT_SYMBOL_GPL(gnttab_grant_foreign_access); EXPORT_SYMBOL_GPL(gnttab_grant_foreign_access);
void gnttab_update_subpage_entry_v2(grant_ref_t ref, domid_t domid, static void gnttab_update_subpage_entry_v2(grant_ref_t ref, domid_t domid,
unsigned long frame, int flags, unsigned long frame, int flags,
unsigned page_off, unsigned page_off, unsigned length)
unsigned length)
{ {
gnttab_shared.v2[ref].sub_page.frame = frame; gnttab_shared.v2[ref].sub_page.frame = frame;
gnttab_shared.v2[ref].sub_page.page_off = page_off; gnttab_shared.v2[ref].sub_page.page_off = page_off;
...@@ -346,9 +345,9 @@ bool gnttab_subpage_grants_available(void) ...@@ -346,9 +345,9 @@ bool gnttab_subpage_grants_available(void)
} }
EXPORT_SYMBOL_GPL(gnttab_subpage_grants_available); EXPORT_SYMBOL_GPL(gnttab_subpage_grants_available);
void gnttab_update_trans_entry_v2(grant_ref_t ref, domid_t domid, static void gnttab_update_trans_entry_v2(grant_ref_t ref, domid_t domid,
int flags, domid_t trans_domid, int flags, domid_t trans_domid,
grant_ref_t trans_gref) grant_ref_t trans_gref)
{ {
gnttab_shared.v2[ref].transitive.trans_domid = trans_domid; gnttab_shared.v2[ref].transitive.trans_domid = trans_domid;
gnttab_shared.v2[ref].transitive.gref = trans_gref; gnttab_shared.v2[ref].transitive.gref = trans_gref;
......
...@@ -52,7 +52,7 @@ static unsigned long xen_io_tlb_nslabs; ...@@ -52,7 +52,7 @@ static unsigned long xen_io_tlb_nslabs;
* Quick lookup value of the bus address of the IOTLB. * Quick lookup value of the bus address of the IOTLB.
*/ */
u64 start_dma_addr; static u64 start_dma_addr;
static dma_addr_t xen_phys_to_bus(phys_addr_t paddr) static dma_addr_t xen_phys_to_bus(phys_addr_t paddr)
{ {
......
...@@ -21,6 +21,7 @@ ...@@ -21,6 +21,7 @@
#include <asm/xen/hypercall.h> #include <asm/xen/hypercall.h>
#include <asm/xen/page.h> #include <asm/xen/page.h>
#include <asm/xen/hypervisor.h> #include <asm/xen/hypervisor.h>
#include <xen/tmem.h>
#define TMEM_CONTROL 0 #define TMEM_CONTROL 0
#define TMEM_NEW_POOL 1 #define TMEM_NEW_POOL 1
......
...@@ -107,7 +107,7 @@ static int xenbus_backend_mmap(struct file *file, struct vm_area_struct *vma) ...@@ -107,7 +107,7 @@ static int xenbus_backend_mmap(struct file *file, struct vm_area_struct *vma)
return 0; return 0;
} }
const struct file_operations xenbus_backend_fops = { static const struct file_operations xenbus_backend_fops = {
.open = xenbus_backend_open, .open = xenbus_backend_open,
.mmap = xenbus_backend_mmap, .mmap = xenbus_backend_mmap,
.unlocked_ioctl = xenbus_backend_ioctl, .unlocked_ioctl = xenbus_backend_ioctl,
......
...@@ -324,8 +324,8 @@ static int cmp_dev(struct device *dev, void *data) ...@@ -324,8 +324,8 @@ static int cmp_dev(struct device *dev, void *data)
return 0; return 0;
} }
struct xenbus_device *xenbus_device_find(const char *nodename, static struct xenbus_device *xenbus_device_find(const char *nodename,
struct bus_type *bus) struct bus_type *bus)
{ {
struct xb_find_info info = { .dev = NULL, .nodename = nodename }; struct xb_find_info info = { .dev = NULL, .nodename = nodename };
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册