public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Roel Kluin <roel.kluin@gmail.com>
To: Marc Zyngier <maz@misterjones.org>
Cc: "David S. Miller" <davem@davemloft.net>,
	sparclinux@vger.kernel.org,
	Andrew Morton <akpm@linux-foundation.org>,
	LKML <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] sparc: leds_resource.end assigned to itself in clock_board_probe()
Date: Thu, 14 Jan 2010 20:53:14 +0100	[thread overview]
Message-ID: <4B4F762A.20605@gmail.com> (raw)
In-Reply-To: <20100114183054.0b53c351@taxman.wild-wind.fr.eu.org>

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";

  reply	other threads:[~2010-01-14 19:48 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 [this message]
2010-01-15  9:28     ` David Miller
2010-01-15  0:58 ` David Miller

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4B4F762A.20605@gmail.com \
    --to=roel.kluin@gmail.com \
    --cc=akpm@linux-foundation.org \
    --cc=davem@davemloft.net \
    --cc=linux-kernel@vger.kernel.org \
    --cc=maz@misterjones.org \
    --cc=sparclinux@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox