From: Richard Röjfors on 22 Mar 2010 08:40 On 03/22/2010 01:12 PM, 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. You are completely right, fortunately we don't access the last register. > Signed-off-by: Dan Carpenter<error27(a)gmail.com> Acked-by: Richard R�jfors <richard.rojfors(a)pelagicore.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 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo(a)vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
From: Samuel Ortiz on 25 Mar 2010 07:30 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(a)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/ -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo(a)vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
|
Pages: 1 Prev: pxa168fb: use resource_size() Next: [PATCH] AFS: Potential null dereference |