From patchwork Tue May 10 09:27:54 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ross Lagerwall X-Patchwork-Id: 9055811 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 A34F89F30C for ; Tue, 10 May 2016 09:30:36 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id CA0FF200E3 for ; Tue, 10 May 2016 09:30:35 +0000 (UTC) Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) (using TLSv1.2 with cipher AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id AFA102010E for ; Tue, 10 May 2016 09:30:34 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.84_2) (envelope-from ) id 1b03xv-0002Ng-Cp; Tue, 10 May 2016 09:28:31 +0000 Received: from mail6.bemta6.messagelabs.com ([85.158.143.247]) by lists.xenproject.org with esmtp (Exim 4.84_2) (envelope-from ) id 1b03xt-0002NZ-BV for xen-devel@lists.xenproject.org; Tue, 10 May 2016 09:28:29 +0000 Received: from [85.158.143.35] by server-3.bemta-6.messagelabs.com id 7A/A1-07120-CB9A1375; Tue, 10 May 2016 09:28:28 +0000 X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFvrKLMWRWlGSWpSXmKPExsXitHSDve6elYb hBod28Vh83zKZyYHR4/CHKywBjFGsmXlJ+RUJrBkXLyxiKljCX7Hn4WGWBsZm3i5GTg4JAX+J 6wuWM4PYbAIGErcufQeyOThEBFQkbu816GLk4mAW+MYosaTtBjtIjbCAq8SB1TMYQWwWAVWJy T3XWUHqeQU8JXq6U0FMCQF5iWe360EqhATUJN4uP8MCYvMKCEqcnPkEzGYWkJA4+OIFM0Q5t8 TfbvsJjDyzkFTNQlK1gJFpFaN6cWpRWWqRrrFeUlFmekZJbmJmjq6hgZlebmpxcWJ6ak5iUrF ecn7uJkZgcDAAwQ7Gjn9OhxglOZiURHkFpxiGC/El5adUZiQWZ8QXleakFh9ilOHgUJLgvb4C KCdYlJqeWpGWmQMMU5i0BAePkgivE0iat7ggMbc4Mx0idYpRUUqcdxFIQgAkkVGaB9cGi41Lj LJSwryMQIcI8RSkFuVmlqDKv2IU52BUEuY9ATKFJzOvBG76K6DFTECL5dj0QRaXJCKkpBoYDR 8o17c2Fpfavk7anRvsUmqRMv973YWjThcf1tctEfU+Jncr6fROyYp4TiN2/kzWD98sby3WLne 6uTqjXG7huyfLU4vl9mxv8Fu6aZazqPxV6b7e/U2Bi4sm6X7+v1zjeMDLLZJ7X0ctXGAu8/rQ nsL2NycST/zJD3/RHb1TUVdZ5vOP5bPqlViKMxINtZiLihMB219MwIgCAAA= X-Env-Sender: prvs=931e4d293=ross.lagerwall@citrix.com X-Msg-Ref: server-9.tower-21.messagelabs.com!1462872506!13388937!1 X-Originating-IP: [66.165.176.63] X-SpamReason: No, hits=0.0 required=7.0 tests=sa_preprocessor: VHJ1c3RlZCBJUDogNjYuMTY1LjE3Ni42MyA9PiAzMDYwNDg=\n, received_headers: No Received headers X-StarScan-Received: X-StarScan-Version: 8.34; banners=-,-,- X-VirusChecked: Checked Received: (qmail 25285 invoked from network); 10 May 2016 09:28:27 -0000 Received: from smtp02.citrix.com (HELO SMTP02.CITRIX.COM) (66.165.176.63) by server-9.tower-21.messagelabs.com with RC4-SHA encrypted SMTP; 10 May 2016 09:28:27 -0000 X-IronPort-AV: E=Sophos;i="5.24,604,1454976000"; d="scan'208";a="359460396" From: Ross Lagerwall To: Date: Tue, 10 May 2016 10:27:54 +0100 Message-ID: <1462872474-18646-1-git-send-email-ross.lagerwall@citrix.com> X-Mailer: git-send-email 2.4.11 MIME-Version: 1.0 X-DLP: MIA1 Cc: Juergen Gross , pebolle@tiscali.nl, linux-kernel@vger.kernel.org, Ross Lagerwall , geert@linux-m68k.org, David Vrabel , Boris Ostrovsky Subject: [Xen-devel] [PATCH v2] xen/balloon: Fix declared-but-not-defined warning X-BeenThere: xen-devel@lists.xen.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xen.org Sender: "Xen-devel" 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 Fix a declared-but-not-defined warning when building with XEN_BALLOON_MEMORY_HOTPLUG=n. This fixes a regression introduced by commit dfd74a1edfab ("xen/balloon: Fix crash when ballooning on x86 32 bit PAE"). Signed-off-by: Ross Lagerwall Acked-by: Juergen Gross --- v2: Moved function instead of adding a prototype. drivers/xen/balloon.c | 28 +++++++++++++--------------- 1 file changed, 13 insertions(+), 15 deletions(-) diff --git a/drivers/xen/balloon.c b/drivers/xen/balloon.c index d46839f..e4db19e 100644 --- a/drivers/xen/balloon.c +++ b/drivers/xen/balloon.c @@ -151,8 +151,6 @@ static DECLARE_WAIT_QUEUE_HEAD(balloon_wq); static void balloon_process(struct work_struct *work); static DECLARE_DELAYED_WORK(balloon_worker, balloon_process); -static void release_memory_resource(struct resource *resource); - /* When ballooning out (allocating memory to return to Xen) we don't really want the kernel to try too hard since that can trigger the oom killer. */ #define GFP_BALLOON \ @@ -248,6 +246,19 @@ static enum bp_state update_schedule(enum bp_state state) } #ifdef CONFIG_XEN_BALLOON_MEMORY_HOTPLUG +static void release_memory_resource(struct resource *resource) +{ + if (!resource) + return; + + /* + * No need to reset region to identity mapped since we now + * know that no I/O can be in this region + */ + release_resource(resource); + kfree(resource); +} + static struct resource *additional_memory_resource(phys_addr_t size) { struct resource *res; @@ -286,19 +297,6 @@ static struct resource *additional_memory_resource(phys_addr_t size) return res; } -static void release_memory_resource(struct resource *resource) -{ - if (!resource) - return; - - /* - * No need to reset region to identity mapped since we now - * know that no I/O can be in this region - */ - release_resource(resource); - kfree(resource); -} - static enum bp_state reserve_additional_memory(void) { long credit;