aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorPaul Gortmaker <paul.gortmaker@windriver.com>2016-02-21 19:06:05 -0500
committerDavid Vrabel <david.vrabel@citrix.com>2016-03-21 11:13:44 -0400
commit106eaa8e6e19cbaff34c99c9996d61634fb44b0d (patch)
treea1815cfb5e97966a6b7a583f54ccda07d3200279 /drivers
parent59aa56bf2a92e1df97d218937d5cd108927a5c46 (diff)
drivers/xen: make [xen-]ballon explicitly non-modular
The Makefile / Kconfig currently controlling compilation here is: obj-y += grant-table.o features.o balloon.o manage.o preempt.o time.o [...] obj-$(CONFIG_XEN_BALLOON) += xen-balloon.o ...with: drivers/xen/Kconfig:config XEN_BALLOON drivers/xen/Kconfig: bool "Xen memory balloon driver" ...meaning that they currently are not being built as modules by anyone. Lets remove the modular code that is essentially orphaned, so that when reading the driver there is no doubt it is builtin-only. In doing so we uncover two implict includes that were obtained by module.h having such a wide include scope itself: In file included from drivers/xen/xen-balloon.c:41:0: include/xen/balloon.h:26:51: warning: ‘struct page’ declared inside parameter list [enabled by default] int alloc_xenballooned_pages(int nr_pages, struct page **pages); ^ include/xen/balloon.h: In function ‘register_xen_selfballooning’: include/xen/balloon.h:35:10: error: ‘ENOSYS’ undeclared (first use in this function) return -ENOSYS; ^ This is fixed by adding mm-types.h and errno.h to the list. We also delete the MODULE_LICENSE tags since all that information is already contained at the top of the file in the comments. Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com> Reviewed-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com> Signed-off-by: David Vrabel <david.vrabel@citrix.com>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/xen/balloon.c4
-rw-r--r--drivers/xen/xen-balloon.c14
2 files changed, 3 insertions, 15 deletions
diff --git a/drivers/xen/balloon.c b/drivers/xen/balloon.c
index 12eab503efd1..481c3f86033a 100644
--- a/drivers/xen/balloon.c
+++ b/drivers/xen/balloon.c
@@ -42,7 +42,6 @@
42#include <linux/kernel.h> 42#include <linux/kernel.h>
43#include <linux/sched.h> 43#include <linux/sched.h>
44#include <linux/errno.h> 44#include <linux/errno.h>
45#include <linux/module.h>
46#include <linux/mm.h> 45#include <linux/mm.h>
47#include <linux/bootmem.h> 46#include <linux/bootmem.h>
48#include <linux/pagemap.h> 47#include <linux/pagemap.h>
@@ -751,7 +750,4 @@ static int __init balloon_init(void)
751 750
752 return 0; 751 return 0;
753} 752}
754
755subsys_initcall(balloon_init); 753subsys_initcall(balloon_init);
756
757MODULE_LICENSE("GPL");
diff --git a/drivers/xen/xen-balloon.c b/drivers/xen/xen-balloon.c
index 39e7ef8d3957..79865b8901ba 100644
--- a/drivers/xen/xen-balloon.c
+++ b/drivers/xen/xen-balloon.c
@@ -33,7 +33,9 @@
33#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt 33#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
34 34
35#include <linux/kernel.h> 35#include <linux/kernel.h>
36#include <linux/module.h> 36#include <linux/errno.h>
37#include <linux/mm_types.h>
38#include <linux/init.h>
37#include <linux/capability.h> 39#include <linux/capability.h>
38 40
39#include <xen/xen.h> 41#include <xen/xen.h>
@@ -109,14 +111,6 @@ static int __init balloon_init(void)
109} 111}
110subsys_initcall(balloon_init); 112subsys_initcall(balloon_init);
111 113
112static void balloon_exit(void)
113{
114 /* XXX - release balloon here */
115 return;
116}
117
118module_exit(balloon_exit);
119
120#define BALLOON_SHOW(name, format, args...) \ 114#define BALLOON_SHOW(name, format, args...) \
121 static ssize_t show_##name(struct device *dev, \ 115 static ssize_t show_##name(struct device *dev, \
122 struct device_attribute *attr, \ 116 struct device_attribute *attr, \
@@ -250,5 +244,3 @@ static int register_balloon(struct device *dev)
250 244
251 return 0; 245 return 0;
252} 246}
253
254MODULE_LICENSE("GPL");