Patchwork sparc: leds_resource.end assigned to itself in clock_board_probe()

login
register
mail settings
Submitter roel kluin
Date Jan. 14, 2010, 4:55 p.m.
Message ID <4B4F4C9B.9040202@gmail.com>
Download mbox | patch
Permalink /patch/42905/
State Superseded
Delegated to: David Miller
Headers show

Comments

roel kluin - Jan. 14, 2010, 4:55 p.m.
These statements appear redundant.

Signed-off-by: Roel Kluin <roel.kluin@gmail.com>
---
Is there any reason to assign this to itself?

--
To unsubscribe from this list: send the line "unsubscribe sparclinux" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Marc Zyngier - Jan. 14, 2010, 5:30 p.m.
On Thu, 14 Jan 2010 17:55:55 +0100
Roel Kluin <roel.kluin@gmail.com> wrote:

> These statements appear redundant.
> 
> Signed-off-by: Roel Kluin <roel.kluin@gmail.com>
> ---
> Is there any reason to assign this to itself?
> 
> diff --git a/arch/sparc/kernel/central.c b/arch/sparc/kernel/central.c
> index f3b5466..773caf4 100644
> --- a/arch/sparc/kernel/central.c
> +++ b/arch/sparc/kernel/central.c
> @@ -99,7 +99,6 @@ static int __devinit clock_board_probe(struct
> of_device *op, 
>  	p->leds_resource.start = (unsigned long)
>  		(p->clock_regs + CLOCK_CTRL);
> -	p->leds_resource.end = p->leds_resource.end;

I have the feeling that the right fix is to have:

	p->leds_resource.end = p->leds_resource.start;

hence describing a 1 byte region.

	M.
David Miller - Jan. 15, 2010, 12:58 a.m.
From: Roel Kluin <roel.kluin@gmail.com>
Date: Thu, 14 Jan 2010 17:55:55 +0100

> These statements appear redundant.
> 
> Signed-off-by: Roel Kluin <roel.kluin@gmail.com>
> ---
> Is there any reason to assign this to itself?

It's a bug, let me try and figure out what this code is trying
to do.
--
To unsubscribe from this list: send the line "unsubscribe sparclinux" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Patch

diff --git a/arch/sparc/kernel/central.c b/arch/sparc/kernel/central.c
index f3b5466..773caf4 100644
--- a/arch/sparc/kernel/central.c
+++ b/arch/sparc/kernel/central.c
@@ -99,7 +99,6 @@  static int __devinit clock_board_probe(struct of_device *op,
 
 	p->leds_resource.start = (unsigned long)
 		(p->clock_regs + CLOCK_CTRL);
-	p->leds_resource.end = p->leds_resource.end;
 	p->leds_resource.name = "leds";
 
 	p->leds_pdev.name = "sunfire-clockboard-leds";
@@ -194,7 +193,6 @@  static int __devinit fhc_probe(struct of_device *op,
 	if (!p->central) {
 		p->leds_resource.start = (unsigned long)
 			(p->pregs + FHC_PREGS_CTRL);
-		p->leds_resource.end = p->leds_resource.end;
 		p->leds_resource.name = "leds";
 
 		p->leds_pdev.name = "sunfire-fhc-leds";