mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Joe Perches <joe@perches.com>
To: H Hartley Sweeten <hartleys@visionengravers.com>
Cc: kernel list <linux-kernel@vger.kernel.org>,
	linux-arm-kernel <linux-arm-kernel@lists.infradead.org>,
	linux-i2c@vger.kernel.org, khali@linux-fr.org,
	Ben Dooks <ben-linux@fluff.org>,
	Lennert Buytenhek <buytenh@wantstofly.org>,
	dan.j.williams@intel.com
Subject: Re: [PATCH] i2c-iop3xx.c: fix memory resource
Date: Fri, 11 Dec 2009 10:40:42 -0800	[thread overview]
Message-ID: <1260556842.18299.34.camel@Joe-Laptop.home> (raw)
In-Reply-To: <BD79186B4FD85F4B8E60E381CAEE190901FB1063@mi8nycmail19.Mi8.com>

On Fri, 2009-12-11 at 13:32 -0500, H Hartley Sweeten wrote:
> The i2c-iop3xx driver requires a resource region of 0x18 bytes and
> currently uses the magic number IOP3XX_I2C_IO_SIZE (defined in
> i2c-iop3xx.h) to indicate this.  All of the users of this driver
> have a platform memory resource so use resource_size() instead of
> the magic number.  This requires fixing a couple of the memory
> resources since they were either off by 1 or just wrong.
[]
>  static struct resource iop13xx_i2c_0_resources[] = {
>  	[0] = {
>  		.start = IOP13XX_I2C0_PHYS,
> -		.end = IOP13XX_I2C0_PHYS + 0x18,
> +		.end = IOP13XX_I2C0_PHYS + 0x17,

etc.

> -#define	IOP3XX_I2C_IO_SIZE	0x18

Maybe it's clearer to keep the IO_SIZE define
and let the compiler do the adding.

.start = FOO;
.end = FOO + IOP3XX_I2C_IO_SIZE - 1;


  reply	other threads:[~2009-12-11 18:40 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-12-11 18:32 H Hartley Sweeten
2009-12-11 18:40 ` Joe Perches [this message]
2009-12-11 18:51   ` H Hartley Sweeten

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=1260556842.18299.34.camel@Joe-Laptop.home \
    --to=joe@perches.com \
    --cc=ben-linux@fluff.org \
    --cc=buytenh@wantstofly.org \
    --cc=dan.j.williams@intel.com \
    --cc=hartleys@visionengravers.com \
    --cc=khali@linux-fr.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-i2c@vger.kernel.org \
    --cc=linux-kernel@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

all inboxes | Powered by JetHome®