lkml.org 
[lkml]   [2010]   [Aug]   [30]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 1/9] of: move phandle/ihandle into types.h
On Sun, Aug 29, 2010 at 11:53:52PM -0400, Andres Salomon wrote:
>
> We need phandle for some exported sparc headers; of.h isn't an
> exported header, and it would be silly to export it when all we
> really need is one or two types from it. So, move the phandle/ihandle
> definitions into types.h.
>
> diff --git a/include/linux/types.h b/include/linux/types.h
> index 01a082f..26526ea 100644
> --- a/include/linux/types.h
> +++ b/include/linux/types.h
> @@ -219,6 +219,10 @@ struct ustat {
> char f_fpack[6];
> };
>
> +/* Basic openboot/openfirmware types */
> +typedef u32 phandle;
> +typedef u32 ihandle;
> +
> #endif /* __KERNEL__ */

The above is inside #ifdef __KERNEL__ / #endif
so it is not exported as we drop code protected
by __KERNEL__ when we prepare for export.

Id addition "phandle" and "ihandle" needs to have
two underscores apended as we cannot just add the above
to the userspace namespace and expect it to be OK.

We do this for many other typers already, see __u32 for example.

Sam


\
 
 \ /
  Last update: 2010-08-30 07:09    [W:0.171 / U:0.108 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site