All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] xen: remove incorrect forward declaration
@ 2016-05-11 13:07 Arnd Bergmann
  2016-05-11 14:05 ` Juergen Gross
                   ` (5 more replies)
  0 siblings, 6 replies; 16+ messages in thread
From: Arnd Bergmann @ 2016-05-11 13:07 UTC (permalink / raw)
  To: David Vrabel
  Cc: Ross Lagerwall, Arnd Bergmann, stable, Boris Ostrovsky,
	Juergen Gross, Daniel Kiper, Julien Grall, Stefano Stabellini,
	Andrew Morton, Vitaly Kuznetsov, Paul Gortmaker, xen-devel,
	linux-kernel

A bugfix patch for the xen balloon driver introduced a forward
declaration for a static function that is conditionally compiled,
causing a warning if only the declaration but not the definition
are there:

drivers/xen/balloon.c:154:13: error: 'release_memory_resource' declared 'static' but never defined [-Werror=unused-function]
 static void release_memory_resource(struct resource *resource);

This removes the declaration again and instead moves the function
definition to the right place, before its first caller and inside
of the #ifdef protecting both.

The patch that introduced the warning is marked for stable
backports, so if that gets applied to 4.4, so should this one.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Fixes: dfd74a1edfab ("xen/balloon: Fix crash when ballooning on x86 32 bit PAE")
Cc: stable@vger.kernel.org
---
 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 d46839f51e73..e4db19e88ab1 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;
-- 
2.7.0

^ permalink raw reply related	[flat|nested] 16+ messages in thread

* Re: [PATCH] xen: remove incorrect forward declaration
  2016-05-11 13:07 [PATCH] xen: remove incorrect forward declaration Arnd Bergmann
  2016-05-11 14:05 ` Juergen Gross
@ 2016-05-11 14:05 ` Juergen Gross
  2016-05-11 15:19   ` Ross Lagerwall
  2016-05-11 15:19   ` Ross Lagerwall
  2016-05-16 11:11 ` Stefano Stabellini
                   ` (3 subsequent siblings)
  5 siblings, 2 replies; 16+ messages in thread
From: Juergen Gross @ 2016-05-11 14:05 UTC (permalink / raw)
  To: Arnd Bergmann, David Vrabel
  Cc: Ross Lagerwall, stable, Boris Ostrovsky, Daniel Kiper,
	Julien Grall, Stefano Stabellini, Andrew Morton,
	Vitaly Kuznetsov, Paul Gortmaker, xen-devel, linux-kernel

On 11/05/16 15:07, Arnd Bergmann wrote:
> A bugfix patch for the xen balloon driver introduced a forward
> declaration for a static function that is conditionally compiled,
> causing a warning if only the declaration but not the definition
> are there:
> 
> drivers/xen/balloon.c:154:13: error: 'release_memory_resource' declared 'static' but never defined [-Werror=unused-function]
>  static void release_memory_resource(struct resource *resource);
> 
> This removes the declaration again and instead moves the function
> definition to the right place, before its first caller and inside
> of the #ifdef protecting both.
> 
> The patch that introduced the warning is marked for stable
> backports, so if that gets applied to 4.4, so should this one.
> 
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
> Fixes: dfd74a1edfab ("xen/balloon: Fix crash when ballooning on x86 32 bit PAE")
> Cc: stable@vger.kernel.org

So you've CC'ed Ross, who sent the very same patch just yesterday, but
without the backport request.

Confused,

Juergen

> ---
>  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 d46839f51e73..e4db19e88ab1 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;
> 

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [PATCH] xen: remove incorrect forward declaration
  2016-05-11 13:07 [PATCH] xen: remove incorrect forward declaration Arnd Bergmann
@ 2016-05-11 14:05 ` Juergen Gross
  2016-05-11 14:05 ` Juergen Gross
                   ` (4 subsequent siblings)
  5 siblings, 0 replies; 16+ messages in thread
From: Juergen Gross @ 2016-05-11 14:05 UTC (permalink / raw)
  To: Arnd Bergmann, David Vrabel
  Cc: Stefano Stabellini, Daniel Kiper, Paul Gortmaker, linux-kernel,
	stable, Vitaly Kuznetsov, Julien Grall, Ross Lagerwall,
	xen-devel, Boris Ostrovsky, Andrew Morton

On 11/05/16 15:07, Arnd Bergmann wrote:
> A bugfix patch for the xen balloon driver introduced a forward
> declaration for a static function that is conditionally compiled,
> causing a warning if only the declaration but not the definition
> are there:
> 
> drivers/xen/balloon.c:154:13: error: 'release_memory_resource' declared 'static' but never defined [-Werror=unused-function]
>  static void release_memory_resource(struct resource *resource);
> 
> This removes the declaration again and instead moves the function
> definition to the right place, before its first caller and inside
> of the #ifdef protecting both.
> 
> The patch that introduced the warning is marked for stable
> backports, so if that gets applied to 4.4, so should this one.
> 
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
> Fixes: dfd74a1edfab ("xen/balloon: Fix crash when ballooning on x86 32 bit PAE")
> Cc: stable@vger.kernel.org

So you've CC'ed Ross, who sent the very same patch just yesterday, but
without the backport request.

Confused,

Juergen

> ---
>  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 d46839f51e73..e4db19e88ab1 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;
> 


_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
http://lists.xen.org/xen-devel

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [PATCH] xen: remove incorrect forward declaration
  2016-05-11 14:05 ` Juergen Gross
@ 2016-05-11 15:19   ` Ross Lagerwall
  2016-05-11 15:19   ` Ross Lagerwall
  1 sibling, 0 replies; 16+ messages in thread
From: Ross Lagerwall @ 2016-05-11 15:19 UTC (permalink / raw)
  To: Juergen Gross, Arnd Bergmann, David Vrabel
  Cc: stable, Boris Ostrovsky, Daniel Kiper, Julien Grall,
	Stefano Stabellini, Andrew Morton, Vitaly Kuznetsov,
	Paul Gortmaker, xen-devel, linux-kernel

On 05/11/2016 03:05 PM, Juergen Gross wrote:
> On 11/05/16 15:07, Arnd Bergmann wrote:
>> A bugfix patch for the xen balloon driver introduced a forward
>> declaration for a static function that is conditionally compiled,
>> causing a warning if only the declaration but not the definition
>> are there:
>>
>> drivers/xen/balloon.c:154:13: error: 'release_memory_resource' declared 'static' but never defined [-Werror=unused-function]
>>   static void release_memory_resource(struct resource *resource);
>>
>> This removes the declaration again and instead moves the function
>> definition to the right place, before its first caller and inside
>> of the #ifdef protecting both.
>>
>> The patch that introduced the warning is marked for stable
>> backports, so if that gets applied to 4.4, so should this one.
>>
>> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
>> Fixes: dfd74a1edfab ("xen/balloon: Fix crash when ballooning on x86 32 bit PAE")
>> Cc: stable@vger.kernel.org
>
> So you've CC'ed Ross, who sent the very same patch just yesterday, but
> without the backport request.
>

Well it wasn't clear to me whether it should be the maintainer or the 
patch submitter who should request the backport and 
Documentation/SubmittingPatches is not clear about it. Regardless, the 
build fix should be backported to 4.4.

-- 
Ross Lagerwall

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [PATCH] xen: remove incorrect forward declaration
  2016-05-11 14:05 ` Juergen Gross
  2016-05-11 15:19   ` Ross Lagerwall
@ 2016-05-11 15:19   ` Ross Lagerwall
  1 sibling, 0 replies; 16+ messages in thread
From: Ross Lagerwall @ 2016-05-11 15:19 UTC (permalink / raw)
  To: Juergen Gross, Arnd Bergmann, David Vrabel
  Cc: Stefano Stabellini, Daniel Kiper, Paul Gortmaker, linux-kernel,
	stable, Julien Grall, Vitaly Kuznetsov, xen-devel, Andrew Morton,
	Boris Ostrovsky

On 05/11/2016 03:05 PM, Juergen Gross wrote:
> On 11/05/16 15:07, Arnd Bergmann wrote:
>> A bugfix patch for the xen balloon driver introduced a forward
>> declaration for a static function that is conditionally compiled,
>> causing a warning if only the declaration but not the definition
>> are there:
>>
>> drivers/xen/balloon.c:154:13: error: 'release_memory_resource' declared 'static' but never defined [-Werror=unused-function]
>>   static void release_memory_resource(struct resource *resource);
>>
>> This removes the declaration again and instead moves the function
>> definition to the right place, before its first caller and inside
>> of the #ifdef protecting both.
>>
>> The patch that introduced the warning is marked for stable
>> backports, so if that gets applied to 4.4, so should this one.
>>
>> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
>> Fixes: dfd74a1edfab ("xen/balloon: Fix crash when ballooning on x86 32 bit PAE")
>> Cc: stable@vger.kernel.org
>
> So you've CC'ed Ross, who sent the very same patch just yesterday, but
> without the backport request.
>

Well it wasn't clear to me whether it should be the maintainer or the 
patch submitter who should request the backport and 
Documentation/SubmittingPatches is not clear about it. Regardless, the 
build fix should be backported to 4.4.

-- 
Ross Lagerwall

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
http://lists.xen.org/xen-devel

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [PATCH] xen: remove incorrect forward declaration
  2016-05-11 13:07 [PATCH] xen: remove incorrect forward declaration Arnd Bergmann
  2016-05-11 14:05 ` Juergen Gross
  2016-05-11 14:05 ` Juergen Gross
@ 2016-05-16 11:11 ` Stefano Stabellini
  2016-05-26 10:14   ` [Xen-devel] " Julien Grall
  2016-05-26 10:14   ` Julien Grall
  2016-05-16 11:11 ` Stefano Stabellini
                   ` (2 subsequent siblings)
  5 siblings, 2 replies; 16+ messages in thread
From: Stefano Stabellini @ 2016-05-16 11:11 UTC (permalink / raw)
  To: Arnd Bergmann
  Cc: David Vrabel, Ross Lagerwall, stable, Boris Ostrovsky,
	Juergen Gross, Daniel Kiper, Julien Grall, Stefano Stabellini,
	Andrew Morton, Vitaly Kuznetsov, Paul Gortmaker, xen-devel,
	linux-kernel

On Wed, 11 May 2016, Arnd Bergmann wrote:
> A bugfix patch for the xen balloon driver introduced a forward
> declaration for a static function that is conditionally compiled,
> causing a warning if only the declaration but not the definition
> are there:
> 
> drivers/xen/balloon.c:154:13: error: 'release_memory_resource' declared 'static' but never defined [-Werror=unused-function]
>  static void release_memory_resource(struct resource *resource);
> 
> This removes the declaration again and instead moves the function
> definition to the right place, before its first caller and inside
> of the #ifdef protecting both.
> 
> The patch that introduced the warning is marked for stable
> backports, so if that gets applied to 4.4, so should this one.
> 
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
> Fixes: dfd74a1edfab ("xen/balloon: Fix crash when ballooning on x86 32 bit PAE")
> Cc: stable@vger.kernel.org

Reviewed-by: Stefano Stabellini <sstabellini@kernel.org>


>  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 d46839f51e73..e4db19e88ab1 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;
> -- 
> 2.7.0
> 

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [PATCH] xen: remove incorrect forward declaration
  2016-05-11 13:07 [PATCH] xen: remove incorrect forward declaration Arnd Bergmann
                   ` (2 preceding siblings ...)
  2016-05-16 11:11 ` Stefano Stabellini
@ 2016-05-16 11:11 ` Stefano Stabellini
  2016-05-26 10:32 ` [Xen-devel] " David Vrabel
  2016-05-26 10:32 ` David Vrabel
  5 siblings, 0 replies; 16+ messages in thread
From: Stefano Stabellini @ 2016-05-16 11:11 UTC (permalink / raw)
  To: Arnd Bergmann
  Cc: Juergen Gross, Stefano Stabellini, Daniel Kiper, Paul Gortmaker,
	linux-kernel, stable, Vitaly Kuznetsov, Julien Grall,
	Ross Lagerwall, David Vrabel, xen-devel, Boris Ostrovsky,
	Andrew Morton

On Wed, 11 May 2016, Arnd Bergmann wrote:
> A bugfix patch for the xen balloon driver introduced a forward
> declaration for a static function that is conditionally compiled,
> causing a warning if only the declaration but not the definition
> are there:
> 
> drivers/xen/balloon.c:154:13: error: 'release_memory_resource' declared 'static' but never defined [-Werror=unused-function]
>  static void release_memory_resource(struct resource *resource);
> 
> This removes the declaration again and instead moves the function
> definition to the right place, before its first caller and inside
> of the #ifdef protecting both.
> 
> The patch that introduced the warning is marked for stable
> backports, so if that gets applied to 4.4, so should this one.
> 
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
> Fixes: dfd74a1edfab ("xen/balloon: Fix crash when ballooning on x86 32 bit PAE")
> Cc: stable@vger.kernel.org

Reviewed-by: Stefano Stabellini <sstabellini@kernel.org>


>  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 d46839f51e73..e4db19e88ab1 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;
> -- 
> 2.7.0
> 

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
http://lists.xen.org/xen-devel

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [Xen-devel] [PATCH] xen: remove incorrect forward declaration
  2016-05-16 11:11 ` Stefano Stabellini
@ 2016-05-26 10:14   ` Julien Grall
  2016-05-26 10:18     ` Stefano Stabellini
  2016-05-26 10:18     ` [Xen-devel] " Stefano Stabellini
  2016-05-26 10:14   ` Julien Grall
  1 sibling, 2 replies; 16+ messages in thread
From: Julien Grall @ 2016-05-26 10:14 UTC (permalink / raw)
  To: Stefano Stabellini, Arnd Bergmann
  Cc: Juergen Gross, Stefano Stabellini, Daniel Kiper, Paul Gortmaker,
	linux-kernel, stable, Vitaly Kuznetsov, Julien Grall,
	Ross Lagerwall, David Vrabel, xen-devel, Boris Ostrovsky,
	Andrew Morton

Hi Stefano,

On 16/05/2016 12:11, Stefano Stabellini wrote:
> On Wed, 11 May 2016, Arnd Bergmann wrote:
>> A bugfix patch for the xen balloon driver introduced a forward
>> declaration for a static function that is conditionally compiled,
>> causing a warning if only the declaration but not the definition
>> are there:
>>
>> drivers/xen/balloon.c:154:13: error: 'release_memory_resource' declared 'static' but never defined [-Werror=unused-function]
>>  static void release_memory_resource(struct resource *resource);
>>
>> This removes the declaration again and instead moves the function
>> definition to the right place, before its first caller and inside
>> of the #ifdef protecting both.
>>
>> The patch that introduced the warning is marked for stable
>> backports, so if that gets applied to 4.4, so should this one.
>>
>> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
>> Fixes: dfd74a1edfab ("xen/balloon: Fix crash when ballooning on x86 32 bit PAE")
>> Cc: stable@vger.kernel.org
>
> Reviewed-by: Stefano Stabellini <sstabellini@kernel.org>

You have applied this patch to the branch for-linus-4.8 but not 
for-linus-4.7. Is it intentional?

Regards,

-- 
Julien Grall

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [PATCH] xen: remove incorrect forward declaration
  2016-05-16 11:11 ` Stefano Stabellini
  2016-05-26 10:14   ` [Xen-devel] " Julien Grall
@ 2016-05-26 10:14   ` Julien Grall
  1 sibling, 0 replies; 16+ messages in thread
From: Julien Grall @ 2016-05-26 10:14 UTC (permalink / raw)
  To: Stefano Stabellini, Arnd Bergmann
  Cc: Juergen Gross, Andrew Morton, Stefano Stabellini, Daniel Kiper,
	Ross Lagerwall, linux-kernel, stable, Julien Grall,
	Paul Gortmaker, David Vrabel, xen-devel, Vitaly Kuznetsov,
	Boris Ostrovsky

Hi Stefano,

On 16/05/2016 12:11, Stefano Stabellini wrote:
> On Wed, 11 May 2016, Arnd Bergmann wrote:
>> A bugfix patch for the xen balloon driver introduced a forward
>> declaration for a static function that is conditionally compiled,
>> causing a warning if only the declaration but not the definition
>> are there:
>>
>> drivers/xen/balloon.c:154:13: error: 'release_memory_resource' declared 'static' but never defined [-Werror=unused-function]
>>  static void release_memory_resource(struct resource *resource);
>>
>> This removes the declaration again and instead moves the function
>> definition to the right place, before its first caller and inside
>> of the #ifdef protecting both.
>>
>> The patch that introduced the warning is marked for stable
>> backports, so if that gets applied to 4.4, so should this one.
>>
>> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
>> Fixes: dfd74a1edfab ("xen/balloon: Fix crash when ballooning on x86 32 bit PAE")
>> Cc: stable@vger.kernel.org
>
> Reviewed-by: Stefano Stabellini <sstabellini@kernel.org>

You have applied this patch to the branch for-linus-4.8 but not 
for-linus-4.7. Is it intentional?

Regards,

-- 
Julien Grall

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
http://lists.xen.org/xen-devel

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [Xen-devel] [PATCH] xen: remove incorrect forward declaration
  2016-05-26 10:14   ` [Xen-devel] " Julien Grall
  2016-05-26 10:18     ` Stefano Stabellini
@ 2016-05-26 10:18     ` Stefano Stabellini
  1 sibling, 0 replies; 16+ messages in thread
From: Stefano Stabellini @ 2016-05-26 10:18 UTC (permalink / raw)
  To: Julien Grall
  Cc: Stefano Stabellini, Arnd Bergmann, Juergen Gross,
	Stefano Stabellini, Daniel Kiper, Paul Gortmaker, linux-kernel,
	stable, Vitaly Kuznetsov, Julien Grall, Ross Lagerwall,
	David Vrabel, xen-devel, Boris Ostrovsky, Andrew Morton

On Thu, 26 May 2016, Julien Grall wrote:
> Hi Stefano,
> 
> On 16/05/2016 12:11, Stefano Stabellini wrote:
> > On Wed, 11 May 2016, Arnd Bergmann wrote:
> > > A bugfix patch for the xen balloon driver introduced a forward
> > > declaration for a static function that is conditionally compiled,
> > > causing a warning if only the declaration but not the definition
> > > are there:
> > > 
> > > drivers/xen/balloon.c:154:13: error: 'release_memory_resource' declared
> > > 'static' but never defined [-Werror=unused-function]
> > >  static void release_memory_resource(struct resource *resource);
> > > 
> > > This removes the declaration again and instead moves the function
> > > definition to the right place, before its first caller and inside
> > > of the #ifdef protecting both.
> > > 
> > > The patch that introduced the warning is marked for stable
> > > backports, so if that gets applied to 4.4, so should this one.
> > > 
> > > Signed-off-by: Arnd Bergmann <arnd@arndb.de>
> > > Fixes: dfd74a1edfab ("xen/balloon: Fix crash when ballooning on x86 32 bit
> > > PAE")
> > > Cc: stable@vger.kernel.org
> > 
> > Reviewed-by: Stefano Stabellini <sstabellini@kernel.org>
> 
> You have applied this patch to the branch for-linus-4.8 but not for-linus-4.7.
> Is it intentional?

Yes it is. for-linus-4.7 is based on an older version of the kernel that
doesn't have dfd74a1edfab. Linus discourages rebasing the pull request
branches. That said, the patch could still go to Linus earlies in one of
the RCs.

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [PATCH] xen: remove incorrect forward declaration
  2016-05-26 10:14   ` [Xen-devel] " Julien Grall
@ 2016-05-26 10:18     ` Stefano Stabellini
  2016-05-26 10:18     ` [Xen-devel] " Stefano Stabellini
  1 sibling, 0 replies; 16+ messages in thread
From: Stefano Stabellini @ 2016-05-26 10:18 UTC (permalink / raw)
  To: Julien Grall
  Cc: Juergen Gross, Stefano Stabellini, Andrew Morton, Arnd Bergmann,
	Stefano Stabellini, Daniel Kiper, Ross Lagerwall, linux-kernel,
	stable, Julien Grall, Paul Gortmaker, David Vrabel, xen-devel,
	Vitaly Kuznetsov, Boris Ostrovsky

On Thu, 26 May 2016, Julien Grall wrote:
> Hi Stefano,
> 
> On 16/05/2016 12:11, Stefano Stabellini wrote:
> > On Wed, 11 May 2016, Arnd Bergmann wrote:
> > > A bugfix patch for the xen balloon driver introduced a forward
> > > declaration for a static function that is conditionally compiled,
> > > causing a warning if only the declaration but not the definition
> > > are there:
> > > 
> > > drivers/xen/balloon.c:154:13: error: 'release_memory_resource' declared
> > > 'static' but never defined [-Werror=unused-function]
> > >  static void release_memory_resource(struct resource *resource);
> > > 
> > > This removes the declaration again and instead moves the function
> > > definition to the right place, before its first caller and inside
> > > of the #ifdef protecting both.
> > > 
> > > The patch that introduced the warning is marked for stable
> > > backports, so if that gets applied to 4.4, so should this one.
> > > 
> > > Signed-off-by: Arnd Bergmann <arnd@arndb.de>
> > > Fixes: dfd74a1edfab ("xen/balloon: Fix crash when ballooning on x86 32 bit
> > > PAE")
> > > Cc: stable@vger.kernel.org
> > 
> > Reviewed-by: Stefano Stabellini <sstabellini@kernel.org>
> 
> You have applied this patch to the branch for-linus-4.8 but not for-linus-4.7.
> Is it intentional?

Yes it is. for-linus-4.7 is based on an older version of the kernel that
doesn't have dfd74a1edfab. Linus discourages rebasing the pull request
branches. That said, the patch could still go to Linus earlies in one of
the RCs.

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
http://lists.xen.org/xen-devel

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [Xen-devel] [PATCH] xen: remove incorrect forward declaration
  2016-05-11 13:07 [PATCH] xen: remove incorrect forward declaration Arnd Bergmann
                   ` (3 preceding siblings ...)
  2016-05-16 11:11 ` Stefano Stabellini
@ 2016-05-26 10:32 ` David Vrabel
  2016-05-27 21:55   ` Arnd Bergmann
  2016-05-27 21:55   ` [Xen-devel] " Arnd Bergmann
  2016-05-26 10:32 ` David Vrabel
  5 siblings, 2 replies; 16+ messages in thread
From: David Vrabel @ 2016-05-26 10:32 UTC (permalink / raw)
  To: Arnd Bergmann, David Vrabel
  Cc: Juergen Gross, Stefano Stabellini, Daniel Kiper, Paul Gortmaker,
	linux-kernel, stable, Vitaly Kuznetsov, Julien Grall,
	Ross Lagerwall, xen-devel, Boris Ostrovsky, Andrew Morton

On 11/05/16 14:07, Arnd Bergmann wrote:
> A bugfix patch for the xen balloon driver introduced a forward
> declaration for a static function that is conditionally compiled,
> causing a warning if only the declaration but not the definition
> are there:
> 
> drivers/xen/balloon.c:154:13: error: 'release_memory_resource' declared 'static' but never defined [-Werror=unused-function]
>  static void release_memory_resource(struct resource *resource);
> 
> This removes the declaration again and instead moves the function
> definition to the right place, before its first caller and inside
> of the #ifdef protecting both.

I've applied the equivalent patch from Ross, instead.

> The patch that introduced the warning is marked for stable
> backports, so if that gets applied to 4.4, so should this one.

Fixes for compiler warnings are not sufficiently important to be
backported to stable.

David

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [PATCH] xen: remove incorrect forward declaration
  2016-05-11 13:07 [PATCH] xen: remove incorrect forward declaration Arnd Bergmann
                   ` (4 preceding siblings ...)
  2016-05-26 10:32 ` [Xen-devel] " David Vrabel
@ 2016-05-26 10:32 ` David Vrabel
  5 siblings, 0 replies; 16+ messages in thread
From: David Vrabel @ 2016-05-26 10:32 UTC (permalink / raw)
  To: Arnd Bergmann, David Vrabel
  Cc: Juergen Gross, Andrew Morton, Stefano Stabellini, Daniel Kiper,
	Ross Lagerwall, linux-kernel, stable, Julien Grall,
	Paul Gortmaker, xen-devel, Vitaly Kuznetsov, Boris Ostrovsky

On 11/05/16 14:07, Arnd Bergmann wrote:
> A bugfix patch for the xen balloon driver introduced a forward
> declaration for a static function that is conditionally compiled,
> causing a warning if only the declaration but not the definition
> are there:
> 
> drivers/xen/balloon.c:154:13: error: 'release_memory_resource' declared 'static' but never defined [-Werror=unused-function]
>  static void release_memory_resource(struct resource *resource);
> 
> This removes the declaration again and instead moves the function
> definition to the right place, before its first caller and inside
> of the #ifdef protecting both.

I've applied the equivalent patch from Ross, instead.

> The patch that introduced the warning is marked for stable
> backports, so if that gets applied to 4.4, so should this one.

Fixes for compiler warnings are not sufficiently important to be
backported to stable.

David

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
http://lists.xen.org/xen-devel

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [Xen-devel] [PATCH] xen: remove incorrect forward declaration
  2016-05-26 10:32 ` [Xen-devel] " David Vrabel
  2016-05-27 21:55   ` Arnd Bergmann
@ 2016-05-27 21:55   ` Arnd Bergmann
  1 sibling, 0 replies; 16+ messages in thread
From: Arnd Bergmann @ 2016-05-27 21:55 UTC (permalink / raw)
  To: David Vrabel
  Cc: Juergen Gross, Stefano Stabellini, Daniel Kiper, Paul Gortmaker,
	linux-kernel, stable, Vitaly Kuznetsov, Julien Grall,
	Ross Lagerwall, xen-devel, Boris Ostrovsky, Andrew Morton

On Thursday, May 26, 2016 11:32:40 AM CEST David Vrabel wrote:
> On 11/05/16 14:07, Arnd Bergmann wrote:
> > A bugfix patch for the xen balloon driver introduced a forward
> > declaration for a static function that is conditionally compiled,
> > causing a warning if only the declaration but not the definition
> > are there:
> > 
> > drivers/xen/balloon.c:154:13: error: 'release_memory_resource' declared 'static' but never defined [-Werror=unused-function]
> >  static void release_memory_resource(struct resource *resource);
> > 
> > This removes the declaration again and instead moves the function
> > definition to the right place, before its first caller and inside
> > of the #ifdef protecting both.
> 
> I've applied the equivalent patch from Ross, instead.

Ok, thanks.

> > The patch that introduced the warning is marked for stable
> > backports, so if that gets applied to 4.4, so should this one.
> 
> Fixes for compiler warnings are not sufficiently important to be
> backported to stable.

Sure, but this is not an existing warning but one that only gets
introduced after the other patch gets backported, which I'd consider
a different category.

	Arnd

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [PATCH] xen: remove incorrect forward declaration
  2016-05-26 10:32 ` [Xen-devel] " David Vrabel
@ 2016-05-27 21:55   ` Arnd Bergmann
  2016-05-27 21:55   ` [Xen-devel] " Arnd Bergmann
  1 sibling, 0 replies; 16+ messages in thread
From: Arnd Bergmann @ 2016-05-27 21:55 UTC (permalink / raw)
  To: David Vrabel
  Cc: Juergen Gross, Andrew Morton, Stefano Stabellini, Daniel Kiper,
	Ross Lagerwall, linux-kernel, stable, Julien Grall,
	Paul Gortmaker, xen-devel, Vitaly Kuznetsov, Boris Ostrovsky

On Thursday, May 26, 2016 11:32:40 AM CEST David Vrabel wrote:
> On 11/05/16 14:07, Arnd Bergmann wrote:
> > A bugfix patch for the xen balloon driver introduced a forward
> > declaration for a static function that is conditionally compiled,
> > causing a warning if only the declaration but not the definition
> > are there:
> > 
> > drivers/xen/balloon.c:154:13: error: 'release_memory_resource' declared 'static' but never defined [-Werror=unused-function]
> >  static void release_memory_resource(struct resource *resource);
> > 
> > This removes the declaration again and instead moves the function
> > definition to the right place, before its first caller and inside
> > of the #ifdef protecting both.
> 
> I've applied the equivalent patch from Ross, instead.

Ok, thanks.

> > The patch that introduced the warning is marked for stable
> > backports, so if that gets applied to 4.4, so should this one.
> 
> Fixes for compiler warnings are not sufficiently important to be
> backported to stable.

Sure, but this is not an existing warning but one that only gets
introduced after the other patch gets backported, which I'd consider
a different category.

	Arnd

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
http://lists.xen.org/xen-devel

^ permalink raw reply	[flat|nested] 16+ messages in thread

* [PATCH] xen: remove incorrect forward declaration
@ 2016-05-11 13:07 Arnd Bergmann
  0 siblings, 0 replies; 16+ messages in thread
From: Arnd Bergmann @ 2016-05-11 13:07 UTC (permalink / raw)
  To: David Vrabel
  Cc: Juergen Gross, Arnd Bergmann, Stefano Stabellini, Daniel Kiper,
	Paul Gortmaker, linux-kernel, stable, Vitaly Kuznetsov,
	Julien Grall, Ross Lagerwall, xen-devel, Boris Ostrovsky,
	Andrew Morton

A bugfix patch for the xen balloon driver introduced a forward
declaration for a static function that is conditionally compiled,
causing a warning if only the declaration but not the definition
are there:

drivers/xen/balloon.c:154:13: error: 'release_memory_resource' declared 'static' but never defined [-Werror=unused-function]
 static void release_memory_resource(struct resource *resource);

This removes the declaration again and instead moves the function
definition to the right place, before its first caller and inside
of the #ifdef protecting both.

The patch that introduced the warning is marked for stable
backports, so if that gets applied to 4.4, so should this one.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Fixes: dfd74a1edfab ("xen/balloon: Fix crash when ballooning on x86 32 bit PAE")
Cc: stable@vger.kernel.org
---
 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 d46839f51e73..e4db19e88ab1 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;
-- 
2.7.0


_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
http://lists.xen.org/xen-devel

^ permalink raw reply related	[flat|nested] 16+ messages in thread

end of thread, other threads:[~2016-05-27 21:56 UTC | newest]

Thread overview: 16+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-05-11 13:07 [PATCH] xen: remove incorrect forward declaration Arnd Bergmann
2016-05-11 14:05 ` Juergen Gross
2016-05-11 14:05 ` Juergen Gross
2016-05-11 15:19   ` Ross Lagerwall
2016-05-11 15:19   ` Ross Lagerwall
2016-05-16 11:11 ` Stefano Stabellini
2016-05-26 10:14   ` [Xen-devel] " Julien Grall
2016-05-26 10:18     ` Stefano Stabellini
2016-05-26 10:18     ` [Xen-devel] " Stefano Stabellini
2016-05-26 10:14   ` Julien Grall
2016-05-16 11:11 ` Stefano Stabellini
2016-05-26 10:32 ` [Xen-devel] " David Vrabel
2016-05-27 21:55   ` Arnd Bergmann
2016-05-27 21:55   ` [Xen-devel] " Arnd Bergmann
2016-05-26 10:32 ` David Vrabel
  -- strict thread matches above, loose matches on Subject: below --
2016-05-11 13:07 Arnd Bergmann

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.