[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <1206799322.12155.10.camel@vader.jdub.homelinux.org>
Date: Sat, 29 Mar 2008 09:02:02 -0500
From: Josh Boyer <jwboyer@...il.com>
To: Al Viro <viro@....linux.org.uk>
Cc: torvalds@...ux-foundation.org, wei.zhang@...escale.com,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH] fix the broken annotations in fsldma
On Sat, 2008-03-29 at 03:10 +0000, Al Viro wrote:
> a) every bitwise declaration will give a unique type; use typedefs.
> b) no need to bother with the stuff pointed to by iomem pointers, unless
> it's accessed directly. noderef will force us to use helpers anyway.
>
> Signed-off-by: Al Viro <viro@...iv.linux.org.uk>
> ---
> drivers/dma/fsldma.h | 47 +++++++++++++++++++++++++++--------------------
> 1 files changed, 27 insertions(+), 20 deletions(-)
>
> diff --git a/drivers/dma/fsldma.h b/drivers/dma/fsldma.h
> index fddd6ae..6faf07b 100644
> --- a/drivers/dma/fsldma.h
> +++ b/drivers/dma/fsldma.h
> @@ -75,12 +75,15 @@
> #define FSL_DMA_DGSR_EOSI 0x02
> #define FSL_DMA_DGSR_EOLSI 0x01
>
> +typedef u64 __bitwise v64;
> +typedef u32 __bitwise v32;
> +
> struct fsl_dma_ld_hw {
> - u64 __bitwise src_addr;
> - u64 __bitwise dst_addr;
> - u64 __bitwise next_ln_addr;
> - u32 __bitwise count;
> - u32 __bitwise reserve;
> + v64 src_addr;
> + v64 dst_addr;
> + v64 next_ln_addr;
> + v32 count;
> + v32 reserve;
> } __attribute__((aligned(32)));
>
> struct fsl_desc_sw {
> @@ -92,13 +95,13 @@ struct fsl_desc_sw {
> } __attribute__((aligned(32)));
>
> struct fsl_dma_chan_regs {
> - u32 __bitwise mr; /* 0x00 - Mode Register */
> - u32 __bitwise sr; /* 0x04 - Status Register */
> - u64 __bitwise cdar; /* 0x08 - Current descriptor address register */
> - u64 __bitwise sar; /* 0x10 - Source Address Register */
> - u64 __bitwise dar; /* 0x18 - Destination Address Register */
> - u32 __bitwise bcr; /* 0x20 - Byte Count Register */
> - u64 __bitwise ndar; /* 0x24 - Next Descriptor Address Register */
> + u32 mr; /* 0x00 - Mode Register */
> + u32 sr; /* 0x04 - Status Register */
> + u64 cdar; /* 0x08 - Current descriptor address register */
> + u64 sar; /* 0x10 - Source Address Register */
> + u64 dar; /* 0x18 - Destination Address Register */
> + u32 bcr; /* 0x20 - Byte Count Register */
> + u64 ndar; /* 0x24 - Next Descriptor Address Register */
> };
Did you forget to do the s/u{32,64}/v{32,64}/ conversion for this
struct, or am I just a moron?
josh
--
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