* [PATCH] sparc: leds_resource.end assigned to itself in clock_board_probe()
@ 2010-01-14 16:55 Roel Kluin
2010-01-14 17:30 ` Marc Zyngier
2010-01-15 0:58 ` David Miller
0 siblings, 2 replies; 5+ messages in thread
From: Roel Kluin @ 2010-01-14 16:55 UTC (permalink / raw)
To: David S. Miller, sparclinux, Andrew Morton, LKML
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;
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";
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH] sparc: leds_resource.end assigned to itself in clock_board_probe()
2010-01-14 16:55 [PATCH] sparc: leds_resource.end assigned to itself in clock_board_probe() Roel Kluin
@ 2010-01-14 17:30 ` Marc Zyngier
2010-01-14 19:53 ` Roel Kluin
2010-01-15 0:58 ` David Miller
1 sibling, 1 reply; 5+ messages in thread
From: Marc Zyngier @ 2010-01-14 17:30 UTC (permalink / raw)
To: Roel Kluin; +Cc: David S. Miller, sparclinux, Andrew Morton, LKML
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.
--
I'm the slime oozin' out from your TV set...
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] sparc: leds_resource.end assigned to itself in clock_board_probe()
2010-01-14 17:30 ` Marc Zyngier
@ 2010-01-14 19:53 ` Roel Kluin
2010-01-15 9:28 ` David Miller
0 siblings, 1 reply; 5+ messages in thread
From: Roel Kluin @ 2010-01-14 19:53 UTC (permalink / raw)
To: Marc Zyngier; +Cc: David S. Miller, sparclinux, Andrew Morton, LKML
It should be a 1 byte region.
Signed-off-by: Roel Kluin <roel.kluin@gmail.com>
---
>> Is there any reason to assign this to itself?
>> @@ -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.
diff --git a/arch/sparc/kernel/central.c b/arch/sparc/kernel/central.c
index f3b5466..4589ca3 100644
--- a/arch/sparc/kernel/central.c
+++ b/arch/sparc/kernel/central.c
@@ -99,7 +99,7 @@ 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.end = p->leds_resource.start;
p->leds_resource.name = "leds";
p->leds_pdev.name = "sunfire-clockboard-leds";
@@ -194,7 +194,7 @@ 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.end = p->leds_resource.start;
p->leds_resource.name = "leds";
p->leds_pdev.name = "sunfire-fhc-leds";
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH] sparc: leds_resource.end assigned to itself in clock_board_probe()
2010-01-14 16:55 [PATCH] sparc: leds_resource.end assigned to itself in clock_board_probe() Roel Kluin
2010-01-14 17:30 ` Marc Zyngier
@ 2010-01-15 0:58 ` David Miller
1 sibling, 0 replies; 5+ messages in thread
From: David Miller @ 2010-01-15 0:58 UTC (permalink / raw)
To: roel.kluin; +Cc: sparclinux, akpm, linux-kernel
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.
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] sparc: leds_resource.end assigned to itself in clock_board_probe()
2010-01-14 19:53 ` Roel Kluin
@ 2010-01-15 9:28 ` David Miller
0 siblings, 0 replies; 5+ messages in thread
From: David Miller @ 2010-01-15 9:28 UTC (permalink / raw)
To: roel.kluin; +Cc: maz, sparclinux, akpm, linux-kernel
From: Roel Kluin <roel.kluin@gmail.com>
Date: Thu, 14 Jan 2010 20:53:14 +0100
> It should be a 1 byte region.
>
> Signed-off-by: Roel Kluin <roel.kluin@gmail.com>
Yes, that was the intention.
Applied, thanks Roel!
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2010-01-15 9:27 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-01-14 16:55 [PATCH] sparc: leds_resource.end assigned to itself in clock_board_probe() Roel Kluin
2010-01-14 17:30 ` Marc Zyngier
2010-01-14 19:53 ` Roel Kluin
2010-01-15 9:28 ` David Miller
2010-01-15 0:58 ` David Miller
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox