From: Harvey Harrison <harvey.harrison@gmail.com>
To: Al Viro <viro@ftp.linux.org.uk>
Cc: mchehab@infradead.org, linux-kernel@vger.kernel.org,
torvalds@linux-foundation.org
Subject: Re: [PATCH] bt8xx: unaligned access
Date: Tue, 20 May 2008 17:38:43 -0700 [thread overview]
Message-ID: <1211330323.5915.226.camel@brick> (raw)
In-Reply-To: <E1JycFh-0004sc-Re@ZenIV.linux.org.uk>
On Wed, 2008-05-21 at 01:32 +0100, Al Viro wrote:
> Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
> ---
> drivers/media/video/bt8xx/bttv-cards.c | 5 +++--
> 1 files changed, 3 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/media/video/bt8xx/bttv-cards.c b/drivers/media/video/bt8xx/bttv-cards.c
> index f20a01c..8ef0424 100644
> --- a/drivers/media/video/bt8xx/bttv-cards.c
> +++ b/drivers/media/video/bt8xx/bttv-cards.c
> @@ -34,6 +34,7 @@
> #include <linux/firmware.h>
> #include <net/checksum.h>
>
> +#include <asm/unaligned.h>
> #include <asm/io.h>
>
> #include "bttvp.h"
> @@ -3858,7 +3859,7 @@ static void __devinit osprey_eeprom(struct bttv *btv, const u8 ee[256])
> ee += i;
>
> /* found a valid descriptor */
> - type = be16_to_cpup((u16*)(ee+4));
> + type = get_unaligned_be16((__be16 *)(ee+4));
The casts aren't strictly necessary here. Any reason to keep it?
>
> switch(type) {
> /* 848 based */
> @@ -3918,7 +3919,7 @@ static void __devinit osprey_eeprom(struct bttv *btv, const u8 ee[256])
> btv->c.nr, type);
> break;
> }
> - serial = be32_to_cpup((u32*)(ee+6));
> + serial = get_unaligned_be32((__be32 *)(ee+6));
Ditto.
Cheers,
Harvey
next prev parent reply other threads:[~2008-05-21 0:38 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-05-21 0:32 [PATCH] bt8xx: unaligned access Al Viro
2008-05-21 0:38 ` Harvey Harrison [this message]
2008-05-21 0:43 ` Al Viro
2008-05-21 0:45 ` Harvey Harrison
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=1211330323.5915.226.camel@brick \
--to=harvey.harrison@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mchehab@infradead.org \
--cc=torvalds@linux-foundation.org \
--cc=viro@ftp.linux.org.uk \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.