Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1703374 > unrolled thread

[PATCH 4/4] axonram: Delete an unnecessary variable initialisation in axon_ram_probe()

Started bySF Markus Elfring <elfring@users.sourceforge.net>
First post2017-08-03 21:20 +0200
Last post2017-08-04 19:00 +0200
Articles 2 — 2 participants

Back to article view | Back to linux.kernel

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  [PATCH 4/4] axonram: Delete an unnecessary variable initialisation in  axon_ram_probe() SF Markus Elfring <elfring@users.sourceforge.net> - 2017-08-03 21:20 +0200
    Re: [PATCH 4/4] axonram: Delete an unnecessary variable  initialisation in axon_ram_probe() Tyrel Datwyler <tyreld@linux.vnet.ibm.com> - 2017-08-04 19:00 +0200

#1703374 — [PATCH 4/4] axonram: Delete an unnecessary variable initialisation in axon_ram_probe()

FromSF Markus Elfring <elfring@users.sourceforge.net>
Date2017-08-03 21:20 +0200
Subject[PATCH 4/4] axonram: Delete an unnecessary variable initialisation in axon_ram_probe()
Message-ID<uatP4-4ko-33@gated-at.bofh.it>
From: Markus Elfring <elfring@users.sourceforge.net>
Date: Thu, 3 Aug 2017 20:34:00 +0200

The local variable "rc" will eventually be set only to an error code.
Thus omit the explicit initialisation at the beginning.

Signed-off-by: Markus Elfring <elfring@users.sourceforge.net>
---
 arch/powerpc/sysdev/axonram.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/arch/powerpc/sysdev/axonram.c b/arch/powerpc/sysdev/axonram.c
index 93cc902350db..5677f3371e30 100644
--- a/arch/powerpc/sysdev/axonram.c
+++ b/arch/powerpc/sysdev/axonram.c
@@ -184,7 +184,6 @@ static int axon_ram_probe(struct platform_device *device)
 	static int axon_ram_bank_id = -1;
 	struct axon_ram_bank *bank;
 	struct resource resource;
-	int rc = 0;
 
 	axon_ram_bank_id++;
 
-- 
2.13.4

[toc] | [next] | [standalone]


#1704107 — Re: [PATCH 4/4] axonram: Delete an unnecessary variable initialisation in axon_ram_probe()

FromTyrel Datwyler <tyreld@linux.vnet.ibm.com>
Date2017-08-04 19:00 +0200
SubjectRe: [PATCH 4/4] axonram: Delete an unnecessary variable initialisation in axon_ram_probe()
Message-ID<uaO77-15B-13@gated-at.bofh.it>
In reply to#1703374
On 08/03/2017 12:17 PM, SF Markus Elfring wrote:
> From: Markus Elfring <elfring@users.sourceforge.net>
> Date: Thu, 3 Aug 2017 20:34:00 +0200
> 
> The local variable "rc" will eventually be set only to an error code.
> Thus omit the explicit initialisation at the beginning.
> 
> Signed-off-by: Markus Elfring <elfring@users.sourceforge.net>
> ---
>  arch/powerpc/sysdev/axonram.c | 1 -
>  1 file changed, 1 deletion(-)
> 
> diff --git a/arch/powerpc/sysdev/axonram.c b/arch/powerpc/sysdev/axonram.c
> index 93cc902350db..5677f3371e30 100644
> --- a/arch/powerpc/sysdev/axonram.c
> +++ b/arch/powerpc/sysdev/axonram.c
> @@ -184,7 +184,6 @@ static int axon_ram_probe(struct platform_device *device)
>  	static int axon_ram_bank_id = -1;
>  	struct axon_ram_bank *bank;
>  	struct resource resource;
> -	int rc = 0;

You've completely removed the decleration of "rc" instead of removing the "= 0"
initialization. I would expect a compilation test to have turned up an undeclared use
error for "rc".

-Tyrel

> 
>  	axon_ram_bank_id++;
> 

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web