* Re: [patch 1/2] i2c: misannotation in i2c-pmcmsp.c
[not found] ` <200812012217.mB1MHccm011065-AB4EexQrvXRQetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org>
@ 2008-12-05 13:44 ` Jean Delvare
0 siblings, 0 replies; only message in thread
From: Jean Delvare @ 2008-12-05 13:44 UTC (permalink / raw)
To: Ben Dooks, Marc St-Jean
Cc: akpm-de/tnXTf+JLsfHDXvbKv3WD2FQJk+8+b, Linux I2C,
harvey.harrison-Re5JQEeQqe8AvxtiuMwx3w
On Mon, 01 Dec 2008 14:17:38 -0800, akpm-de/tnXTf+JLsfHDXvbKv3WD2FQJk+8+b@public.gmane.org wrote:
> From: Harvey Harrison <harvey.harrison-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
>
> tmp is used as host-endian and is loaded from a be64, fix the cast and the
> endian accessor used.
>
> Signed-off-by: Harvey Harrison <harvey.harrison-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
> Signed-off-by: Andrew Morton <akpm-de/tnXTf+JLsfHDXvbKv3WD2FQJk+8+b@public.gmane.org>
> ---
>
> drivers/i2c/busses/i2c-pmcmsp.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff -puN drivers/i2c/busses/i2c-pmcmsp.c~i2c-misannotation-in-i2c-pmcmspc drivers/i2c/busses/i2c-pmcmsp.c
> --- a/drivers/i2c/busses/i2c-pmcmsp.c~i2c-misannotation-in-i2c-pmcmspc
> +++ a/drivers/i2c/busses/i2c-pmcmsp.c
> @@ -486,7 +486,7 @@ static enum pmcmsptwi_xfer_result pmcmsp
>
> if (cmd->type == MSP_TWI_CMD_WRITE ||
> cmd->type == MSP_TWI_CMD_WRITE_READ) {
> - __be64 tmp = cpu_to_be64p((u64 *)cmd->write_data);
> + u64 tmp = be64_to_cpup((__be64 *)cmd->write_data);
> tmp >>= (MSP_MAX_BYTES_PER_RW - cmd->write_len) * 8;
> dev_dbg(&pmcmsptwi_adapter.dev, "Writing 0x%016llx\n", tmp);
> pmcmsptwi_writel(tmp & 0x00000000ffffffffLL,
Ben, Marc, any comment on this?
--
Jean Delvare
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2008-12-05 13:44 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <200812012217.mB1MHccm011065@imap1.linux-foundation.org>
[not found] ` <200812012217.mB1MHccm011065-AB4EexQrvXRQetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org>
2008-12-05 13:44 ` [patch 1/2] i2c: misannotation in i2c-pmcmsp.c Jean Delvare
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox