From: Jean Delvare <khali-PUYAD+kWke1g9hUCZPvPmw@public.gmane.org>
To: Ben Dooks <ben-linux-elnMNo+KYs3YtjvyW6yDsg@public.gmane.org>,
Paul Mundt <lethal-M7jkjyW5wf5g9hUCZPvPmw@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 2/2] i2c: trivial endian casting fixes in i2c-highlander.c
Date: Fri, 5 Dec 2008 14:46:05 +0100 [thread overview]
Message-ID: <20081205144605.755f2445@hyperion.delvare> (raw)
In-Reply-To: <200812012217.mB1MHeUA011076-AB4EexQrvXRQetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org>
On Mon, 01 Dec 2008 14:17:40 -0800, akpm-de/tnXTf+JLsfHDXvbKv3WD2FQJk+8+b@public.gmane.org wrote:
> From: Harvey Harrison <harvey.harrison-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
>
> 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-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
> Signed-off-by: Andrew Morton <akpm-de/tnXTf+JLsfHDXvbKv3WD2FQJk+8+b@public.gmane.org>
> ---
>
> 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?
--
Jean Delvare
next parent reply other threads:[~2008-12-05 13:46 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <200812012217.mB1MHeUA011076@imap1.linux-foundation.org>
[not found] ` <200812012217.mB1MHeUA011076-AB4EexQrvXRQetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org>
2008-12-05 13:46 ` Jean Delvare [this message]
[not found] ` <20081205144605.755f2445-ig7AzVSIIG7kN2dkZ6Wm7A@public.gmane.org>
2008-12-08 3:07 ` [patch 2/2] i2c: trivial endian casting fixes in i2c-highlander.c Paul Mundt
[not found] ` <20081208030757.GC8860-M7jkjyW5wf5g9hUCZPvPmw@public.gmane.org>
2008-12-08 8:21 ` Jean Delvare
[not found] ` <20081208092115.15e15131-ig7AzVSIIG7kN2dkZ6Wm7A@public.gmane.org>
2008-12-08 8:26 ` Paul Mundt
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=20081205144605.755f2445@hyperion.delvare \
--to=khali-puyad+kwke1g9huczpvpmw@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=lethal-M7jkjyW5wf5g9hUCZPvPmw@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