public inbox for linux-i2c@vger.kernel.org
 help / color / mirror / Atom feed
From: Jean Delvare <khali-PUYAD+kWke1g9hUCZPvPmw@public.gmane.org>
To: Ben Dooks <ben-linux-elnMNo+KYs3YtjvyW6yDsg@public.gmane.org>,
	Marc St-Jean
	<Marc_St-Jean-4W7cOCfLBmzY0TyS/+Ba5Q@public.gmane.org>
Cc: akpm-de/tnXTf+JLsfHDXvbKv3WD2FQJk+8+b@public.gmane.org,
	Linux I2C <linux-i2c-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>,
	harvey.harrison-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org
Subject: Re: [patch 1/2] i2c: misannotation in i2c-pmcmsp.c
Date: Fri, 5 Dec 2008 14:44:08 +0100	[thread overview]
Message-ID: <20081205144408.74de2806@hyperion.delvare> (raw)
In-Reply-To: <200812012217.mB1MHccm011065-AB4EexQrvXRQetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org>

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

           reply	other threads:[~2008-12-05 13:44 UTC|newest]

Thread overview: expand[flat|nested]  mbox.gz  Atom feed
 [parent not found: <200812012217.mB1MHccm011065-AB4EexQrvXRQetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org>]

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=20081205144408.74de2806@hyperion.delvare \
    --to=khali-puyad+kwke1g9huczpvpmw@public.gmane.org \
    --cc=Marc_St-Jean-4W7cOCfLBmzY0TyS/+Ba5Q@public.gmane.org \
    --cc=akpm-de/tnXTf+JLsfHDXvbKv3WD2FQJk+8+b@public.gmane.org \
    --cc=ben-linux-elnMNo+KYs3YtjvyW6yDsg@public.gmane.org \
    --cc=harvey.harrison-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org \
    --cc=linux-i2c-u79uwXL29TY76Z2rM5mHXA@public.gmane.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