* [PATCH] linux/atm_tcp.h: cleanup for userspace
@ 2008-04-20 3:22 Mike Frysinger
2008-04-24 2:24 ` David Miller
0 siblings, 1 reply; 6+ messages in thread
From: Mike Frysinger @ 2008-04-20 3:22 UTC (permalink / raw)
To: linux-kernel, akpm
The atm_tcp.h uses types from linux/atm.h, but does not include it. It
should also use the standard __u## types from linux/types.h rather than the
uint##_t types since the former can be found with the kernel already.
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
---
include/linux/atm_tcp.h | 10 ++++------
1 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/include/linux/atm_tcp.h b/include/linux/atm_tcp.h
index 18787f9..f05014e 100644
--- a/include/linux/atm_tcp.h
+++ b/include/linux/atm_tcp.h
@@ -8,10 +8,8 @@
#define LINUX_ATM_TCP_H
#include <linux/atmapi.h>
-
-#ifdef __KERNEL__
#include <linux/types.h>
-#endif
+#include <linux/atm.h>
#include <linux/atmioc.h>
@@ -20,9 +18,9 @@
*/
struct atmtcp_hdr {
- uint16_t vpi;
- uint16_t vci;
- uint32_t length; /* ... of data part */
+ __u16 vpi;
+ __u16 vci;
+ __u32 length; /* ... of data part */
};
/*
--
1.5.5
^ permalink raw reply [flat|nested] 6+ messages in thread* Re: [PATCH] linux/atm_tcp.h: cleanup for userspace
2008-04-20 3:22 [PATCH] linux/atm_tcp.h: cleanup for userspace Mike Frysinger
@ 2008-04-24 2:24 ` David Miller
2008-04-24 3:03 ` Mike Frysinger
0 siblings, 1 reply; 6+ messages in thread
From: David Miller @ 2008-04-24 2:24 UTC (permalink / raw)
To: vapier; +Cc: linux-kernel, akpm
From: Mike Frysinger <vapier@gentoo.org>
Date: Sat, 19 Apr 2008 23:22:34 -0400
> The atm_tcp.h uses types from linux/atm.h, but does not include it. It
> should also use the standard __u## types from linux/types.h rather than the
> uint##_t types since the former can be found with the kernel already.
>
> Signed-off-by: Mike Frysinger <vapier@gentoo.org>
I don't think this is a sufficient patch to solve these problems.
> @@ -8,10 +8,8 @@
> #define LINUX_ATM_TCP_H
>
> #include <linux/atmapi.h>
> -
> -#ifdef __KERNEL__
> #include <linux/types.h>
> -#endif
> +#include <linux/atm.h>
> #include <linux/atmioc.h>
>
>
So you're adding linux/atm.h as an include for non-kernel, fine,
but:
> @@ -20,9 +18,9 @@
> */
>
> struct atmtcp_hdr {
> - uint16_t vpi;
> - uint16_t vci;
> - uint32_t length; /* ... of data part */
> + __u16 vpi;
> + __u16 vci;
> + __u32 length; /* ... of data part */
> };
>
> /*
Well, linux/atm.h, which we'll now get, has the same exact problem,
it uses "uint16_t" and related types.
Futehermore, nothing in the include chain will get linux/types.h
include, which we'll need. linux/atm.h protects the inclusion
of linux/types.h with __KERNEL__.
^ permalink raw reply [flat|nested] 6+ messages in thread* Re: [PATCH] linux/atm_tcp.h: cleanup for userspace
2008-04-24 2:24 ` David Miller
@ 2008-04-24 3:03 ` Mike Frysinger
2008-04-24 3:18 ` David Miller
0 siblings, 1 reply; 6+ messages in thread
From: Mike Frysinger @ 2008-04-24 3:03 UTC (permalink / raw)
To: David Miller; +Cc: linux-kernel, akpm
[-- Attachment #1: Type: text/plain, Size: 677 bytes --]
On Wednesday 23 April 2008, David Miller wrote:
> From: Mike Frysinger <vapier@gentoo.org>
> > The atm_tcp.h uses types from linux/atm.h, but does not include it. It
> > should also use the standard __u## types from linux/types.h rather than
> > the uint##_t types since the former can be found with the kernel already.
> >
> > Signed-off-by: Mike Frysinger <vapier@gentoo.org>
>
> I don't think this is a sufficient patch to solve these problems.
it is sufficient for atm_tcp.h only. many of the network headers are broken
for userspace inclusion, so i've just been posting them one at a time as last
time i posted a large patch, no one picked it up.
-mike
[-- Attachment #2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 827 bytes --]
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] linux/atm_tcp.h: cleanup for userspace
2008-04-24 3:03 ` Mike Frysinger
@ 2008-04-24 3:18 ` David Miller
2008-04-24 3:33 ` Mike Frysinger
0 siblings, 1 reply; 6+ messages in thread
From: David Miller @ 2008-04-24 3:18 UTC (permalink / raw)
To: vapier; +Cc: linux-kernel, akpm
From: Mike Frysinger <vapier@gentoo.org>
Date: Wed, 23 Apr 2008 23:03:51 -0400
> On Wednesday 23 April 2008, David Miller wrote:
> > From: Mike Frysinger <vapier@gentoo.org>
> > > The atm_tcp.h uses types from linux/atm.h, but does not include it. It
> > > should also use the standard __u## types from linux/types.h rather than
> > > the uint##_t types since the former can be found with the kernel already.
> > >
> > > Signed-off-by: Mike Frysinger <vapier@gentoo.org>
> >
> > I don't think this is a sufficient patch to solve these problems.
>
> it is sufficient for atm_tcp.h only. many of the network headers are broken
> for userspace inclusion, so i've just been posting them one at a time as last
> time i posted a large patch, no one picked it up.
But you're adding an include of another file that has the problem
you're supposedly fixing.
If using uintN_t types is the problem, you're adding a new one for
applications that include linux/atm_tcp.h, because now they'll
get linux/atm.h as a side effect which does it too.
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] linux/atm_tcp.h: cleanup for userspace
2008-04-24 3:18 ` David Miller
@ 2008-04-24 3:33 ` Mike Frysinger
2008-04-24 4:23 ` David Miller
0 siblings, 1 reply; 6+ messages in thread
From: Mike Frysinger @ 2008-04-24 3:33 UTC (permalink / raw)
To: David Miller; +Cc: linux-kernel, akpm
[-- Attachment #1: Type: text/plain, Size: 1331 bytes --]
On Wednesday 23 April 2008, David Miller wrote:
> From: Mike Frysinger <vapier@gentoo.org>
> > On Wednesday 23 April 2008, David Miller wrote:
> > > From: Mike Frysinger <vapier@gentoo.org>
> > > > The atm_tcp.h uses types from linux/atm.h, but does not include it.
> > > > It should also use the standard __u## types from linux/types.h rather
> > > > than the uint##_t types since the former can be found with the kernel
> > > > already.
> > >
> > > I don't think this is a sufficient patch to solve these problems.
> >
> > it is sufficient for atm_tcp.h only. many of the network headers are
> > broken for userspace inclusion, so i've just been posting them one at a
> > time as last time i posted a large patch, no one picked it up.
>
> But you're adding an include of another file that has the problem
> you're supposedly fixing.
and i'll send out fixes for that file in time.
> If using uintN_t types is the problem, you're adding a new one for
> applications that include linux/atm_tcp.h, because now they'll
> get linux/atm.h as a side effect which does it too.
any applications that use linux/atm_tcp.h are already including linux/atm.h,
and already including stdint.h (or whatever indirectly to get uintN_t types).
nothing new is broken, but eventually things will be all fixed.
-mike
[-- Attachment #2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 827 bytes --]
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] linux/atm_tcp.h: cleanup for userspace
2008-04-24 3:33 ` Mike Frysinger
@ 2008-04-24 4:23 ` David Miller
0 siblings, 0 replies; 6+ messages in thread
From: David Miller @ 2008-04-24 4:23 UTC (permalink / raw)
To: vapier; +Cc: linux-kernel, akpm
From: Mike Frysinger <vapier@gentoo.org>
Date: Wed, 23 Apr 2008 23:33:10 -0400
> On Wednesday 23 April 2008, David Miller wrote:
> > But you're adding an include of another file that has the problem
> > you're supposedly fixing.
>
> and i'll send out fixes for that file in time.
Please combine the two changes, so that we actually fix the
problem.
Thank you.
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2008-04-24 4:23 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-04-20 3:22 [PATCH] linux/atm_tcp.h: cleanup for userspace Mike Frysinger
2008-04-24 2:24 ` David Miller
2008-04-24 3:03 ` Mike Frysinger
2008-04-24 3:18 ` David Miller
2008-04-24 3:33 ` Mike Frysinger
2008-04-24 4:23 ` David Miller
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®