lkml.org 
[lkml]   [2009]   [Feb]   [6]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
SubjectRe: [git pull -tip] headers_check fixes for other architectures
From
Date
On Fri, 2009-02-06 at 18:24 +0100, Sam Ravnborg wrote:
> >
> > Is this safe OR we can make it more safer:
> >
> > Subject: [PATCH] make linux/types.h as assembly safe
> >
> > Signed-off-by: Jaswinder Singh Rajput <jaswinderrajput@gmail.com>
> > ---
> > include/linux/types.h | 3 ++-
> > 1 files changed, 2 insertions(+), 1 deletions(-)
> >
> > diff --git a/include/linux/types.h b/include/linux/types.h
> > index 712ca53..c30973a 100644
> > --- a/include/linux/types.h
> > +++ b/include/linux/types.h
> > @@ -1,6 +1,7 @@
> > #ifndef _LINUX_TYPES_H
> > #define _LINUX_TYPES_H
> >
> > +#ifndef __ASSEMBLY__
> > #ifdef __KERNEL__
> >
> > #define DECLARE_BITMAP(name,bits) \
> > @@ -212,5 +213,5 @@ struct ustat {
> > };
> >
> > #endif /* __KERNEL__ */
> > -
> > +#endif /* __ASSEMBLY__ */
> > #endif /* _LINUX_TYPES_H */
>
> This is wrong...
> We should include the assumed assembly safe asm/types.h
> outside the __ASEMBLY__ ifdef.
>

Subject: [PATCH] make linux/types.h as assembly safe

Signed-off-by: Jaswinder Singh Rajput <jaswinderrajput@gmail.com>
---
include/linux/types.h | 6 +++++-
1 files changed, 5 insertions(+), 1 deletions(-)

diff --git a/include/linux/types.h b/include/linux/types.h
index 712ca53..e1322a7 100644
--- a/include/linux/types.h
+++ b/include/linux/types.h
@@ -1,6 +1,10 @@
#ifndef _LINUX_TYPES_H
#define _LINUX_TYPES_H

+#ifdef __ASSEMBLY__
+# include <asm/types.h>
+#else /* __ASSEMBLY__ */
+
#ifdef __KERNEL__

#define DECLARE_BITMAP(name,bits) \
@@ -212,5 +216,5 @@ struct ustat {
};

#endif /* __KERNEL__ */
-
+#endif /* __ASSEMBLY__ */
#endif /* _LINUX_TYPES_H */
--
1.6.0.6




\
 
 \ /
  Last update: 2009-02-06 19:15    [W:0.245 / U:0.204 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site