From patchwork Mon Feb 22 00:06:05 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Paul Gortmaker X-Patchwork-Id: 8369801 Return-Path: X-Original-To: patchwork-xen-devel@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id B1F459F52D for ; Mon, 22 Feb 2016 00:09:51 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id C6EF5203B1 for ; Mon, 22 Feb 2016 00:09:50 +0000 (UTC) Received: from lists.xen.org (lists.xenproject.org [50.57.142.19]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 21715203B0 for ; Mon, 22 Feb 2016 00:09:49 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=lists.xen.org) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1aXe1Z-0002RM-0r; Mon, 22 Feb 2016 00:06:49 +0000 Received: from mail6.bemta3.messagelabs.com ([195.245.230.39]) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1aXe1X-0002R3-VD for xen-devel@lists.xenproject.org; Mon, 22 Feb 2016 00:06:48 +0000 Received: from [85.158.137.68] by server-13.bemta-3.messagelabs.com id DC/AB-03443-7115AC65; Mon, 22 Feb 2016 00:06:47 +0000 X-Env-Sender: Paul.Gortmaker@windriver.com X-Msg-Ref: server-11.tower-31.messagelabs.com!1456099604!23388023!1 X-Originating-IP: [147.11.1.11] X-SpamReason: No, hits=0.0 required=7.0 tests= X-StarScan-Received: X-StarScan-Version: 7.35.1; banners=-,-,- X-VirusChecked: Checked Received: (qmail 37849 invoked from network); 22 Feb 2016 00:06:46 -0000 Received: from mail.windriver.com (HELO mail.windriver.com) (147.11.1.11) by server-11.tower-31.messagelabs.com with DHE-RSA-AES256-SHA encrypted SMTP; 22 Feb 2016 00:06:46 -0000 Received: from ALA-HCA.corp.ad.wrs.com (ala-hca.corp.ad.wrs.com [147.11.189.40]) by mail.windriver.com (8.15.2/8.15.1) with ESMTPS id u1M06bAf012938 (version=TLSv1 cipher=AES128-SHA bits=128 verify=FAIL); Sun, 21 Feb 2016 16:06:37 -0800 (PST) Received: from yow-lpgnfs-02.corp.ad.wrs.com (128.224.149.8) by ALA-HCA.corp.ad.wrs.com (147.11.189.40) with Microsoft SMTP Server id 14.3.248.2; Sun, 21 Feb 2016 16:06:37 -0800 From: Paul Gortmaker To: Date: Sun, 21 Feb 2016 19:06:05 -0500 Message-ID: <1456099568-5154-3-git-send-email-paul.gortmaker@windriver.com> X-Mailer: git-send-email 2.6.1 In-Reply-To: <1456099568-5154-1-git-send-email-paul.gortmaker@windriver.com> References: <1456099568-5154-1-git-send-email-paul.gortmaker@windriver.com> MIME-Version: 1.0 Cc: Stefano Stabellini , Paul Gortmaker , David Vrabel , xen-devel@lists.xenproject.org, Boris Ostrovsky Subject: [Xen-devel] [PATCH v2 2/5] drivers/xen: make [xen-]ballon explicitly non-modular X-BeenThere: xen-devel@lists.xen.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org X-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_MED, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP 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. Cc: Konrad Rzeszutek Wilk Cc: Boris Ostrovsky Cc: David Vrabel Cc: Stefano Stabellini Reviewed-by: Stefano Stabellini Cc: xen-devel@lists.xenproject.org Signed-off-by: Paul Gortmaker --- drivers/xen/balloon.c | 4 ---- drivers/xen/xen-balloon.c | 14 +++----------- 2 files changed, 3 insertions(+), 15 deletions(-) diff --git a/drivers/xen/balloon.c b/drivers/xen/balloon.c index 7c8a2cf16f58..9781e0dd59d6 100644 --- a/drivers/xen/balloon.c +++ b/drivers/xen/balloon.c @@ -42,7 +42,6 @@ #include #include #include -#include #include #include #include @@ -760,7 +759,4 @@ static int __init balloon_init(void) return 0; } - subsys_initcall(balloon_init); - -MODULE_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 @@ #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt #include -#include +#include +#include +#include #include #include @@ -109,14 +111,6 @@ static int __init balloon_init(void) } subsys_initcall(balloon_init); -static void balloon_exit(void) -{ - /* XXX - release balloon here */ - return; -} - -module_exit(balloon_exit); - #define BALLOON_SHOW(name, format, args...) \ static ssize_t show_##name(struct device *dev, \ struct device_attribute *attr, \ @@ -250,5 +244,3 @@ static int register_balloon(struct device *dev) return 0; } - -MODULE_LICENSE("GPL");