Skip to contentSkip to conversation

xen/balloon: Fix declared-but-not-defined warning

PATCH In review Ross Lagerwall 2 participants 3 messages May 9, 2016 Xen hypervisor interface

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 xen/balloon: Fix declared-but-not-defined warning

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").

---
 drivers/xen/balloon.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/xen/balloon.c +2 -2
index d46839f..0e57906 100644
@@ -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,8 @@ static enum bp_state update_schedule(enum bp_state state)
 }
 
 #ifdef CONFIG_XEN_BALLOON_MEMORY_HOTPLUG
+static void release_memory_resource(struct resource *resource);
+
 static struct resource *additional_memory_resource(phys_addr_t size)
 {
 	struct resource *res;
Signature · 1 line
2.4.3
maintainer
#1 lore raw
Quoted 24 lines · Ross Lagerwall

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").

---
 drivers/xen/balloon.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/xen/balloon.c +0 -2
index d46839f..0e57906 100644
@@ -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 \

drivers/xen/balloon.c static enum bp_state update_schedule(enum bp_state state) · line 250

Quoted 5 lines
drivers/xen/balloon.c +2 -0
@@ -248,6 +246,8 @@ static enum bp_state update_schedule(enum bp_state state)
 }
 
 #ifdef CONFIG_XEN_BALLOON_MEMORY_HOTPLUG
+static void release_memory_resource(struct resource *resource);
+

I'd rather move release_memory_resource() here instead of adding the prototype.

Juergen

drivers/xen/balloon.c static enum bp_state update_schedule(enum bp_state state) · line 253

Quoted 4 lines
drivers/xen/balloon.c +0 -0
 static struct resource *additional_memory_resource(phys_addr_t size)
 {
 	struct resource *res;

_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xen.org/xen-devel

maintainer
#2 lore raw
In reply to Ross Lagerwall
Quoted 24 lines · Ross Lagerwall

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").

---
 drivers/xen/balloon.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/xen/balloon.c +0 -2
index d46839f..0e57906 100644
@@ -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 \

drivers/xen/balloon.c static enum bp_state update_schedule(enum bp_state state) · line 250

Quoted 5 lines
drivers/xen/balloon.c +2 -0
@@ -248,6 +246,8 @@ static enum bp_state update_schedule(enum bp_state state)
 }
 
 #ifdef CONFIG_XEN_BALLOON_MEMORY_HOTPLUG
+static void release_memory_resource(struct resource *resource);
+

I'd rather move release_memory_resource() here instead of adding the prototype.

Juergen

Quoted 4 lines
drivers/xen/balloon.c +0 -0
 static struct resource *additional_memory_resource(phys_addr_t size)
 {
 	struct resource *res;