LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
* [PATCH] Drop an empty byteorder/generic.h from being exported to userspace.
@ 2008-04-02 1:38 Robert P. J. Day
2008-04-02 10:20 ` Jiri Slaby
0 siblings, 1 reply; 5+ messages in thread
From: Robert P. J. Day @ 2008-04-02 1:38 UTC (permalink / raw)
To: Linux Kernel Mailing List; +Cc: Andrew Morton
Since the entire meaningful contents of generic.h is wrapped by the
__KERNEL__ test, drop it from being passed to userspace, and remove
the now superfluous __KERNEL__ test.
Signed-off-by: Robert P. J. Day <rpjday@crashcourse.ca>
---
is there some value in allowing an effectively empty header file to
be exported to userspace?
include/linux/byteorder/Kbuild | 1 -
include/linux/byteorder/generic.h | 8 --------
2 files changed, 9 deletions(-)
diff --git a/include/linux/byteorder/Kbuild b/include/linux/byteorder/Kbuild
index 79beddd..a50614c 100644
--- a/include/linux/byteorder/Kbuild
+++ b/include/linux/byteorder/Kbuild
@@ -1,5 +1,4 @@
header-y += big_endian.h
header-y += little_endian.h
-unifdef-y += generic.h
unifdef-y += swab.h
diff --git a/include/linux/byteorder/generic.h b/include/linux/byteorder/generic.h
index d377155..0846e6b 100644
--- a/include/linux/byteorder/generic.h
+++ b/include/linux/byteorder/generic.h
@@ -82,12 +82,6 @@
*
*/
-
-#if defined(__KERNEL__)
-/*
- * inside the kernel, we can use nicknames;
- * outside of it, we must avoid POSIX namespace pollution...
- */
#define cpu_to_le64 __cpu_to_le64
#define le64_to_cpu __le64_to_cpu
#define cpu_to_le32 __cpu_to_le32
@@ -176,6 +170,4 @@ static inline void be64_add_cpu(__be64 *var, u64 val)
*var = cpu_to_be64(be64_to_cpu(*var) + val);
}
-#endif /* KERNEL */
-
#endif /* _LINUX_BYTEORDER_GENERIC_H */
========================================================================
Robert P. J. Day
Linux Consulting, Training and Annoying Kernel Pedantry:
Have classroom, will lecture.
http://crashcourse.ca Waterloo, Ontario, CANADA
========================================================================
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH] Drop an empty byteorder/generic.h from being exported to userspace.
2008-04-02 1:38 [PATCH] Drop an empty byteorder/generic.h from being exported to userspace Robert P. J. Day
@ 2008-04-02 10:20 ` Jiri Slaby
2008-04-02 11:00 ` Robert P. J. Day
0 siblings, 1 reply; 5+ messages in thread
From: Jiri Slaby @ 2008-04-02 10:20 UTC (permalink / raw)
To: Robert P. J. Day; +Cc: Linux Kernel Mailing List, Andrew Morton
On 04/02/2008 03:38 AM, Robert P. J. Day wrote:
> Since the entire meaningful contents of generic.h is wrapped by the
> __KERNEL__ test, drop it from being passed to userspace, and remove
> the now superfluous __KERNEL__ test.
>
> Signed-off-by: Robert P. J. Day <rpjday@crashcourse.ca>
>
> ---
>
> is there some value in allowing an effectively empty header file to
> be exported to userspace?
Not breaking the userspace? The file is included in non-__KERNEL__ sections from
byteorder/*_endian.h.
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] Drop an empty byteorder/generic.h from being exported to userspace.
2008-04-02 10:20 ` Jiri Slaby
@ 2008-04-02 11:00 ` Robert P. J. Day
2008-04-02 11:01 ` Jiri Slaby
0 siblings, 1 reply; 5+ messages in thread
From: Robert P. J. Day @ 2008-04-02 11:00 UTC (permalink / raw)
To: Jiri Slaby; +Cc: Linux Kernel Mailing List, Andrew Morton
On Wed, 2 Apr 2008, Jiri Slaby wrote:
> On 04/02/2008 03:38 AM, Robert P. J. Day wrote:
> > Since the entire meaningful contents of generic.h is wrapped by the
> > __KERNEL__ test, drop it from being passed to userspace, and remove
> > the now superfluous __KERNEL__ test.
> >
> > Signed-off-by: Robert P. J. Day <rpjday@crashcourse.ca>
> >
> > ---
> >
> > is there some value in allowing an effectively empty header file to
> > be exported to userspace?
>
> Not breaking the userspace? The file is included in non-__KERNEL__
> sections from byteorder/*_endian.h.
ok ... and the value of including a completely empty header file is
... ?
rday
--
========================================================================
Robert P. J. Day
Linux Consulting, Training and Annoying Kernel Pedantry:
Have classroom, will lecture.
http://crashcourse.ca Waterloo, Ontario, CANADA
========================================================================
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] Drop an empty byteorder/generic.h from being exported to userspace.
2008-04-02 11:00 ` Robert P. J. Day
@ 2008-04-02 11:01 ` Jiri Slaby
2008-04-02 11:02 ` Robert P. J. Day
0 siblings, 1 reply; 5+ messages in thread
From: Jiri Slaby @ 2008-04-02 11:01 UTC (permalink / raw)
To: Robert P. J. Day; +Cc: Linux Kernel Mailing List, Andrew Morton
On 04/02/2008 01:00 PM, Robert P. J. Day wrote:
> On Wed, 2 Apr 2008, Jiri Slaby wrote:
>
>> On 04/02/2008 03:38 AM, Robert P. J. Day wrote:
>>> Since the entire meaningful contents of generic.h is wrapped by the
>>> __KERNEL__ test, drop it from being passed to userspace, and remove
>>> the now superfluous __KERNEL__ test.
>>>
>>> Signed-off-by: Robert P. J. Day <rpjday@crashcourse.ca>
>>>
>>> ---
>>>
>>> is there some value in allowing an effectively empty header file to
>>> be exported to userspace?
>> Not breaking the userspace? The file is included in non-__KERNEL__
>> sections from byteorder/*_endian.h.
>
> ok ... and the value of including a completely empty header file is
> ... ?
No value, you should just move those includes into the __KERNEL__ part.
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] Drop an empty byteorder/generic.h from being exported to userspace.
2008-04-02 11:01 ` Jiri Slaby
@ 2008-04-02 11:02 ` Robert P. J. Day
0 siblings, 0 replies; 5+ messages in thread
From: Robert P. J. Day @ 2008-04-02 11:02 UTC (permalink / raw)
To: Jiri Slaby; +Cc: Linux Kernel Mailing List, Andrew Morton
On Wed, 2 Apr 2008, Jiri Slaby wrote:
> On 04/02/2008 01:00 PM, Robert P. J. Day wrote:
> > On Wed, 2 Apr 2008, Jiri Slaby wrote:
> >
> > > On 04/02/2008 03:38 AM, Robert P. J. Day wrote:
> > > > Since the entire meaningful contents of generic.h is wrapped by the
> > > > __KERNEL__ test, drop it from being passed to userspace, and remove
> > > > the now superfluous __KERNEL__ test.
> > > >
> > > > Signed-off-by: Robert P. J. Day <rpjday@crashcourse.ca>
> > > >
> > > > ---
> > > >
> > > > is there some value in allowing an effectively empty header file to
> > > > be exported to userspace?
> > > Not breaking the userspace? The file is included in non-__KERNEL__
> > > sections from byteorder/*_endian.h.
> >
> > ok ... and the value of including a completely empty header file is
> > ... ?
>
> No value, you should just move those includes into the __KERNEL__ part.
gotcha, that's what i'd concluded after your earlier post, i just
wasn't sure if there was something more subtle happening here.
revised patch coming soon. thanks.
rday
--
========================================================================
Robert P. J. Day
Linux Consulting, Training and Annoying Kernel Pedantry:
Have classroom, will lecture.
http://crashcourse.ca Waterloo, Ontario, CANADA
========================================================================
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2008-04-02 11:03 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-04-02 1:38 [PATCH] Drop an empty byteorder/generic.h from being exported to userspace Robert P. J. Day
2008-04-02 10:20 ` Jiri Slaby
2008-04-02 11:00 ` Robert P. J. Day
2008-04-02 11:01 ` Jiri Slaby
2008-04-02 11:02 ` Robert P. J. Day
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).