[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <1211330323.5915.226.camel@brick>
Date: Tue, 20 May 2008 17:38:43 -0700
From: Harvey Harrison <harvey.harrison@...il.com>
To: Al Viro <viro@....linux.org.uk>
Cc: mchehab@...radead.org, linux-kernel@...r.kernel.org,
torvalds@...ux-foundation.org
Subject: Re: [PATCH] bt8xx: unaligned access
On Wed, 2008-05-21 at 01:32 +0100, Al Viro wrote:
> Signed-off-by: Al Viro <viro@...iv.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
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists