public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] x86, numa_64: remove unused variable
@ 2011-04-03 15:13 Florian Mickler
  2011-04-03 15:25 ` Cyrill Gorcunov
                   ` (2 more replies)
  0 siblings, 3 replies; 5+ messages in thread
From: Florian Mickler @ 2011-04-03 15:13 UTC (permalink / raw)
  To: x86; +Cc: Florian Mickler, linux-kernel

In case !CONFIG_ACPI_NUMA and !CONFIG_AMD_NUMA gcc emits a warning about
the unused variable ret.

As that variable is in fact not needed I choose to remove it.

Signed-off-by: Florian Mickler <florian@mickler.org>
---
 arch/x86/mm/numa_64.c |    8 ++------
 1 files changed, 2 insertions(+), 6 deletions(-)

diff --git a/arch/x86/mm/numa_64.c b/arch/x86/mm/numa_64.c
index e8c00cc..0916976 100644
--- a/arch/x86/mm/numa_64.c
+++ b/arch/x86/mm/numa_64.c
@@ -626,17 +626,13 @@ static int __init numa_init(int (*init_func)(void))
 
 void __init initmem_init(void)
 {
-	int ret;
-
 	if (!numa_off) {
 #ifdef CONFIG_ACPI_NUMA
-		ret = numa_init(x86_acpi_numa_init);
-		if (!ret)
+		if (!numa_init(x86_acpi_numa_init))
 			return;
 #endif
 #ifdef CONFIG_AMD_NUMA
-		ret = numa_init(amd_numa_init);
-		if (!ret)
+		if (!numa_init(amd_numa_init))
 			return;
 #endif
 	}
-- 
1.7.4.1


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

* Re: [PATCH] x86, numa_64: remove unused variable
  2011-04-03 15:13 [PATCH] x86, numa_64: remove unused variable Florian Mickler
@ 2011-04-03 15:25 ` Cyrill Gorcunov
  2011-04-03 23:20   ` Tejun Heo
  2011-04-04 15:00 ` [tip:x86/mm] x86-64, NUMA: Remove " tip-bot for Florian Mickler
  2011-04-05  3:29 ` [PATCH] x86, numa_64: remove " David Rientjes
  2 siblings, 1 reply; 5+ messages in thread
From: Cyrill Gorcunov @ 2011-04-03 15:25 UTC (permalink / raw)
  To: Florian Mickler; +Cc: x86, linux-kernel, David Rientjes, Tejun Heo

On 04/03/2011 07:13 PM, Florian Mickler wrote:
> In case !CONFIG_ACPI_NUMA and !CONFIG_AMD_NUMA gcc emits a warning about
> the unused variable ret.
> 
> As that variable is in fact not needed I choose to remove it.
> 
> Signed-off-by: Florian Mickler <florian@mickler.org>
> ---
>  arch/x86/mm/numa_64.c |    8 ++------
>  1 files changed, 2 insertions(+), 6 deletions(-)
> 

As far as I remember David prefer to have 'ret' in place but since it causes
such a warn we better to drop it.

-- 
    Cyrill

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

* Re: [PATCH] x86, numa_64: remove unused variable
  2011-04-03 15:25 ` Cyrill Gorcunov
@ 2011-04-03 23:20   ` Tejun Heo
  0 siblings, 0 replies; 5+ messages in thread
From: Tejun Heo @ 2011-04-03 23:20 UTC (permalink / raw)
  To: Cyrill Gorcunov; +Cc: Florian Mickler, x86, linux-kernel, David Rientjes

On Sun, Apr 03, 2011 at 07:25:41PM +0400, Cyrill Gorcunov wrote:
> On 04/03/2011 07:13 PM, Florian Mickler wrote:
> > In case !CONFIG_ACPI_NUMA and !CONFIG_AMD_NUMA gcc emits a warning about
> > the unused variable ret.
> > 
> > As that variable is in fact not needed I choose to remove it.
> > 
> > Signed-off-by: Florian Mickler <florian@mickler.org>
> > ---
> >  arch/x86/mm/numa_64.c |    8 ++------
> >  1 files changed, 2 insertions(+), 6 deletions(-)
> > 
> 
> As far as I remember David prefer to have 'ret' in place but since it causes
> such a warn we better to drop it.

Applied to x86-mm.  Thanks for the cc Cyrill.

-- 
tejun

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

* [tip:x86/mm] x86-64, NUMA: Remove unused variable
  2011-04-03 15:13 [PATCH] x86, numa_64: remove unused variable Florian Mickler
  2011-04-03 15:25 ` Cyrill Gorcunov
@ 2011-04-04 15:00 ` tip-bot for Florian Mickler
  2011-04-05  3:29 ` [PATCH] x86, numa_64: remove " David Rientjes
  2 siblings, 0 replies; 5+ messages in thread
From: tip-bot for Florian Mickler @ 2011-04-04 15:00 UTC (permalink / raw)
  To: linux-tip-commits; +Cc: linux-kernel, hpa, mingo, florian, tj, tglx

Commit-ID:  711b8c87a5fe6de78e90411cb67b506babfef74a
Gitweb:     http://git.kernel.org/tip/711b8c87a5fe6de78e90411cb67b506babfef74a
Author:     Florian Mickler <florian@mickler.org>
AuthorDate: Mon, 4 Apr 2011 01:17:40 +0200
Committer:  Tejun Heo <tj@kernel.org>
CommitDate: Mon, 4 Apr 2011 01:21:00 +0200

x86-64, NUMA: Remove unused variable

In case !CONFIG_ACPI_NUMA and !CONFIG_AMD_NUMA gcc emits a warning
about the unused variable ret.

As that variable is in fact not needed I choose to remove it.

Signed-off-by: Florian Mickler <florian@mickler.org>
LKML-Reference: <1301843624-22364-1-git-send-email-florian@mickler.org>
Signed-off-by: Tejun Heo <tj@kernel.org>
---
 arch/x86/mm/numa_64.c |    8 ++------
 1 files changed, 2 insertions(+), 6 deletions(-)

diff --git a/arch/x86/mm/numa_64.c b/arch/x86/mm/numa_64.c
index 3951ee6..13f5b06 100644
--- a/arch/x86/mm/numa_64.c
+++ b/arch/x86/mm/numa_64.c
@@ -505,17 +505,13 @@ static int __init numa_init(int (*init_func)(void))
 
 void __init initmem_init(void)
 {
-	int ret;
-
 	if (!numa_off) {
 #ifdef CONFIG_ACPI_NUMA
-		ret = numa_init(x86_acpi_numa_init);
-		if (!ret)
+		if (!numa_init(x86_acpi_numa_init))
 			return;
 #endif
 #ifdef CONFIG_AMD_NUMA
-		ret = numa_init(amd_numa_init);
-		if (!ret)
+		if (!numa_init(amd_numa_init))
 			return;
 #endif
 	}

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

* Re: [PATCH] x86, numa_64: remove unused variable
  2011-04-03 15:13 [PATCH] x86, numa_64: remove unused variable Florian Mickler
  2011-04-03 15:25 ` Cyrill Gorcunov
  2011-04-04 15:00 ` [tip:x86/mm] x86-64, NUMA: Remove " tip-bot for Florian Mickler
@ 2011-04-05  3:29 ` David Rientjes
  2 siblings, 0 replies; 5+ messages in thread
From: David Rientjes @ 2011-04-05  3:29 UTC (permalink / raw)
  To: Florian Mickler; +Cc: x86, linux-kernel

On Sun, 3 Apr 2011, Florian Mickler wrote:

> In case !CONFIG_ACPI_NUMA and !CONFIG_AMD_NUMA gcc emits a warning about
> the unused variable ret.
> 
> As that variable is in fact not needed I choose to remove it.
> 
> Signed-off-by: Florian Mickler <florian@mickler.org>

Acked-by: David Rientjes <rientjes@google.com>

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

end of thread, other threads:[~2011-04-05  3:29 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-04-03 15:13 [PATCH] x86, numa_64: remove unused variable Florian Mickler
2011-04-03 15:25 ` Cyrill Gorcunov
2011-04-03 23:20   ` Tejun Heo
2011-04-04 15:00 ` [tip:x86/mm] x86-64, NUMA: Remove " tip-bot for Florian Mickler
2011-04-05  3:29 ` [PATCH] x86, numa_64: remove " David Rientjes

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox