All of lore.kernel.org
 help / color / mirror / Atom feed
From: Samuel Ortiz <sameo@linux.intel.com>
To: "Dan Carpenter" <error27@gmail.com>,
	"Mauro Carvalho Chehab" <mchehab@redhat.com>,
	"Richard Röjfors" <richard.rojfors@pelagicore.com>,
	linux-kernel@vger.kernel.org, kernel-janitors@vger.kernel.org
Subject: Re: [patch] mfd: off by one calculating size
Date: Thu, 25 Mar 2010 11:24:38 +0000	[thread overview]
Message-ID: <20100325112437.GB3720@sortiz.org> (raw)
In-Reply-To: <20100322121242.GL21571@bicker>

Hi Dan,

On Mon, Mar 22, 2010 at 03:12:42PM +0300, Dan Carpenter wrote:
> I'm pretty sure that it should be + 1 here.  It's an off by one, because
> we start counting at zero.
Thanks Dan, patch applied to my for-next branch.

Cheers,
Samuel.


> Signed-off-by: Dan Carpenter <error27@gmail.com>
> ---
> Found by a static checker and untested.  Please review carefully.
> 
> diff --git a/drivers/mfd/timberdale.h b/drivers/mfd/timberdale.h
> index 8d27ffa..902c451 100644
> --- a/drivers/mfd/timberdale.h
> +++ b/drivers/mfd/timberdale.h
> @@ -66,7 +66,7 @@
>  
>  #define CHIPCTLOFFSET	0x800
>  #define CHIPCTLEND	0x8ff
> -#define CHIPCTLSIZE	(CHIPCTLEND - CHIPCTLOFFSET)
> +#define CHIPCTLSIZE	(CHIPCTLEND - CHIPCTLOFFSET + 1)
>  
>  #define INTCOFFSET	0xc00
>  #define INTCEND		0xfff

-- 
Intel Open Source Technology Centre
http://oss.intel.com/

WARNING: multiple messages have this Message-ID (diff)
From: Samuel Ortiz <sameo@linux.intel.com>
To: "Dan Carpenter" <error27@gmail.com>,
	"Mauro Carvalho Chehab" <mchehab@redhat.com>,
	"Richard Röjfors" <richard.rojfors@pelagicore.com>,
	linux-kernel@vger.kernel.org, kernel-janitors@vger.kernel.org
Subject: Re: [patch] mfd: off by one calculating size
Date: Thu, 25 Mar 2010 12:24:38 +0100	[thread overview]
Message-ID: <20100325112437.GB3720@sortiz.org> (raw)
In-Reply-To: <20100322121242.GL21571@bicker>

Hi Dan,

On Mon, Mar 22, 2010 at 03:12:42PM +0300, Dan Carpenter wrote:
> I'm pretty sure that it should be + 1 here.  It's an off by one, because
> we start counting at zero.
Thanks Dan, patch applied to my for-next branch.

Cheers,
Samuel.


> Signed-off-by: Dan Carpenter <error27@gmail.com>
> ---
> Found by a static checker and untested.  Please review carefully.
> 
> diff --git a/drivers/mfd/timberdale.h b/drivers/mfd/timberdale.h
> index 8d27ffa..902c451 100644
> --- a/drivers/mfd/timberdale.h
> +++ b/drivers/mfd/timberdale.h
> @@ -66,7 +66,7 @@
>  
>  #define CHIPCTLOFFSET	0x800
>  #define CHIPCTLEND	0x8ff
> -#define CHIPCTLSIZE	(CHIPCTLEND - CHIPCTLOFFSET)
> +#define CHIPCTLSIZE	(CHIPCTLEND - CHIPCTLOFFSET + 1)
>  
>  #define INTCOFFSET	0xc00
>  #define INTCEND		0xfff

-- 
Intel Open Source Technology Centre
http://oss.intel.com/

  parent reply	other threads:[~2010-03-25 11:24 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-03-22 12:12 [patch] mfd: off by one calculating size Dan Carpenter
2010-03-22 12:12 ` Dan Carpenter
2010-03-22 12:37 ` Richard Röjfors
2010-03-22 12:37   ` Richard Röjfors
2010-03-25 11:24 ` Samuel Ortiz [this message]
2010-03-25 11:24   ` Samuel Ortiz

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=20100325112437.GB3720@sortiz.org \
    --to=sameo@linux.intel.com \
    --cc=error27@gmail.com \
    --cc=kernel-janitors@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mchehab@redhat.com \
    --cc=richard.rojfors@pelagicore.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.