2013-04-01 18:03:10

by Paul Bolle

[permalink] [raw]
Subject: [PATCH 8/8] cris: do not export "u8" and friends to userspace

sv_addr_ag.h exports "u8" and friends to userspace. Use "__u8" and
friends instead.

Signed-off-by: Paul Bolle <[email protected]>
---
Untested.

arch/cris/include/uapi/arch-v10/arch/sv_addr_ag.h | 20 ++++++++++----------
1 file changed, 10 insertions(+), 10 deletions(-)

diff --git a/arch/cris/include/uapi/arch-v10/arch/sv_addr_ag.h b/arch/cris/include/uapi/arch-v10/arch/sv_addr_ag.h
index 5517f04..199d053 100644
--- a/arch/cris/include/uapi/arch-v10/arch/sv_addr_ag.h
+++ b/arch/cris/include/uapi/arch-v10/arch/sv_addr_ag.h
@@ -64,10 +64,10 @@
/*--- Obsolete. Kept for backw compatibility. ---*/
/* Reads (or writes) a byte/uword/udword from the specified mode
register. */
-#define IO_RD(reg) (*(volatile u32*)(reg))
-#define IO_RD_B(reg) (*(volatile u8*)(reg))
-#define IO_RD_W(reg) (*(volatile u16*)(reg))
-#define IO_RD_D(reg) (*(volatile u32*)(reg))
+#define IO_RD(reg) (*(volatile __u32*)(reg))
+#define IO_RD_B(reg) (*(volatile __u8*)(reg))
+#define IO_RD_W(reg) (*(volatile __u16*)(reg))
+#define IO_RD_D(reg) (*(volatile __u32*)(reg))

/*------------------------------------------------------------
!* Start addresses of the different memory areas.
@@ -97,12 +97,12 @@
!*-----------------------------------------------------------*/

#ifndef __ASSEMBLER__
-# define IO_TYPECAST_UDWORD (volatile u32*)
-# define IO_TYPECAST_RO_UDWORD (const volatile u32*)
-# define IO_TYPECAST_UWORD (volatile u16*)
-# define IO_TYPECAST_RO_UWORD (const volatile u16*)
-# define IO_TYPECAST_BYTE (volatile u8*)
-# define IO_TYPECAST_RO_BYTE (const volatile u8*)
+# define IO_TYPECAST_UDWORD (volatile __u32*)
+# define IO_TYPECAST_RO_UDWORD (const volatile __u32*)
+# define IO_TYPECAST_UWORD (volatile __u16*)
+# define IO_TYPECAST_RO_UWORD (const volatile __u16*)
+# define IO_TYPECAST_BYTE (volatile __u8*)
+# define IO_TYPECAST_RO_BYTE (const volatile __u8*)
#else
# define IO_TYPECAST_UDWORD
# define IO_TYPECAST_RO_UDWORD
--
1.7.11.7


2013-04-15 14:53:09

by Jesper Nilsson

[permalink] [raw]
Subject: Re: [PATCH 8/8] cris: do not export "u8" and friends to userspace

On Mon, Apr 01, 2013 at 08:03:06PM +0200, Paul Bolle wrote:
> sv_addr_ag.h exports "u8" and friends to userspace. Use "__u8" and
> friends instead.
>
> Signed-off-by: Paul Bolle <[email protected]>

Looks good,

Acked-by: Jesper Nilsson <[email protected]>

/^JN - Jesper Nilsson
--
Jesper Nilsson -- [email protected]