Re: [patch 2/2] i2c: trivial endian casting fixes in i2c-highlander.c

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Paul,

On Mon, 8 Dec 2008 12:07:58 +0900, Paul Mundt wrote:
> On Fri, Dec 05, 2008 at 02:46:05PM +0100, Jean Delvare wrote:
> > On Mon, 01 Dec 2008 14:17:40 -0800, akpm@xxxxxxxxxxxxxxxxxxxx wrote:
> > > From: Harvey Harrison <harvey.harrison@xxxxxxxxx>
> > > 
> > > Fixes sparse warnings:
> > > drivers/i2c/busses/i2c-highlander.c:95:26: warning: incorrect type in argument 1 (different base types)
> > > drivers/i2c/busses/i2c-highlander.c:95:26:    expected restricted __be16 const [usertype] *p
> > > drivers/i2c/busses/i2c-highlander.c:95:26:    got unsigned short [usertype] *<noident>
> > > drivers/i2c/busses/i2c-highlander.c:106:15: warning: incorrect type in assignment (different base types)
> > > drivers/i2c/busses/i2c-highlander.c:106:15:    expected unsigned short [unsigned] [short] [usertype] <noident>
> > > drivers/i2c/busses/i2c-highlander.c:106:15:    got restricted __be16
> > > 
> > > Signed-off-by: Harvey Harrison <harvey.harrison@xxxxxxxxx>
> > > Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx>
> > > ---
> > > 
> > >  drivers/i2c/busses/i2c-highlander.c |    4 ++--
> > >  1 file changed, 2 insertions(+), 2 deletions(-)
> > > 
> > > diff -puN drivers/i2c/busses/i2c-highlander.c~i2c-trivial-endian-casting-fixes-in-i2c-highlanderc drivers/i2c/busses/i2c-highlander.c
> > > --- a/drivers/i2c/busses/i2c-highlander.c~i2c-trivial-endian-casting-fixes-in-i2c-highlanderc
> > > +++ a/drivers/i2c/busses/i2c-highlander.c
> > > @@ -92,7 +92,7 @@ static void highlander_i2c_setup(struct 
> > >  static void smbus_write_data(u8 *src, u16 *dst, int len)
> > >  {
> > >  	for (; len > 1; len -= 2) {
> > > -		*dst++ = be16_to_cpup((u16 *)src);
> > > +		*dst++ = be16_to_cpup((__be16 *)src);
> > >  		src += 2;
> > >  	}
> > >  
> > > @@ -103,7 +103,7 @@ static void smbus_write_data(u8 *src, u1
> > >  static void smbus_read_data(u16 *src, u8 *dst, int len)
> > >  {
> > >  	for (; len > 1; len -= 2) {
> > > -		*(u16 *)dst = cpu_to_be16p(src++);
> > > +		*(__be16 *)dst = cpu_to_be16p(src++);
> > >  		dst += 2;
> > >  	}
> > >  
> > 
> > Ben, Paul, any comment on this?
> > 
> It's fine with me, do you want to take this, or should I fold it in to my
> tree?
> 
> Acked-by: Paul Mundt <lethal@xxxxxxxxxxxx>

This patch is in my tree and will go to Linus at the end of the week,
unless you prefer to pick it.

Thanks,
-- 
Jean Delvare
--
To unsubscribe from this list: send the line "unsubscribe linux-i2c" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux GPIO]     [Linux SPI]     [Linux Hardward Monitoring]     [LM Sensors]     [Linux USB Devel]     [Linux Media]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux