linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Brad Hards <bhards@bigpond.net.au>
To: Linus Torvalds <torvalds@transmeta.com>, Greg KH <greg@kroah.com>
Cc: Vojtech Pavlik <vojtech@suse.cz>, <linux-kernel@vger.kernel.org>,
	<linuxconsole-dev@lists.sourceforge.net>
Subject: Re: [patch] Input cleanups for 2.5.29 [2/2]
Date: Wed, 31 Jul 2002 07:38:00 +1000	[thread overview]
Message-ID: <200207310738.00566.bhards@bigpond.net.au> (raw)
In-Reply-To: <Pine.LNX.4.33.0207301417190.2051-100000@penguin.transmeta.com>

On Wed, 31 Jul 2002 07:20, Linus Torvalds wrote:
> On Tue, 30 Jul 2002, Greg KH wrote:
> > On Tue, Jul 30, 2002 at 03:23:42PM +0200, Vojtech Pavlik wrote:
> > > -#include <asm/types.h>
> > > +#include <stdint.h>
> >
> > Why?  I thought we were not including any glibc (or any other libc)
> > header files when building the kernel?
>
> Indeed. This is unacceptable.
Its a minor thinko - <linux/types.h> is the right definition.

> Especially as the standard types are total crap, and the u8 etc are a lot
> more readable. People should realize:
>
>  - the "int" is superfluous. Of _course_ it's an integer. If it was a
>    floating point number, it would be fp16/fp32/fp64/fp80/whatever.
>  - the "_t" is there only for namespace collisions, sane people can chose
>    to ignore it.
Sure, it is a convention that only a committee could love.
But it is at least widely understood by userspace programmers.

> What do you have left after you have removed the crap? Yup. u8, u16, etc.
Fine for internal to the kernel. Absolutely. Required knowledge to play
with the kernel.

> And if you want to share with user space, there's the long-accepted
> namespace collision avoidance of prepending two underscores.
This is where we disagree. __u8 requires the (userspace) programmer
to go off, find out that __u8 is really some wierd Linux-ism that he
can safely map to uint8_t, to use with the rest of the *standard* library
routines.

> Fix it, Vojtech.
Please don't be hasty.

This isn't about the kernel representation. It is about making ABIs as
easy as possible for userspace programmers to use. If there is an
ugly but standard way, and an almost-as-ugly and non-standard way,
I don't think that the standard way is too much to ask.

Brad
-- 
http://conf.linux.org.au. 22-25Jan2003. Perth, Australia. Birds in Black.

  parent reply	other threads:[~2002-07-30 21:39 UTC|newest]

Thread overview: 37+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-07-30 10:26 [patch] Small input fixes for 2.5.29 [1/2] Vojtech Pavlik
2002-07-30 10:29 ` [patch] Small input fixes for 2.5.29 [2/2] Vojtech Pavlik
2002-07-30 13:22   ` [patch] Input cleanups for 2.5.29 [1/2] Vojtech Pavlik
2002-07-30 13:23     ` [patch] Input cleanups for 2.5.29 [2/2] Vojtech Pavlik
2002-07-30 20:17       ` [patch] Fix suspend of the kseriod thread Vojtech Pavlik
2002-07-30 20:18         ` [patch] Remove superfluous code that snuck back in PPC merge Vojtech Pavlik
2002-07-30 21:57         ` [patch] Fix suspend of the kseriod thread Russell King
2002-07-30 22:00           ` Vojtech Pavlik
2002-07-31  9:55         ` David Woodhouse
2002-07-31  9:58           ` Vojtech Pavlik
2002-07-31 10:07           ` David Woodhouse
2002-07-31 10:10             ` Vojtech Pavlik
2002-07-31 11:44             ` sleep_on() DIE DIE DIE (was Re: [patch] Fix suspend of the kseriod thread) David Woodhouse
2002-07-30 21:09       ` [patch] Input cleanups for 2.5.29 [2/2] Greg KH
2002-07-30 21:20         ` Linus Torvalds
2002-07-30 21:35           ` Vojtech Pavlik
2002-07-30 21:46             ` Linus Torvalds
2002-07-30 22:02               ` Vojtech Pavlik
2002-07-30 21:38           ` Brad Hards [this message]
2002-07-30 21:26         ` Brad Hards
2002-07-30 21:35           ` Linus Torvalds
2002-07-30 21:42             ` Alexander Viro
2002-07-30 21:47               ` Brad Hards
2002-07-30 22:02                 ` Alexander Viro
2002-07-30 22:05                   ` Alexander Viro
2002-08-01 10:49                     ` Pavel Machek
2002-08-01 12:17                       ` Sean Neakums
2002-07-30 22:04                 ` Linus Torvalds
2002-07-30 21:55               ` Ben Pfaff
2002-07-30 22:03                 ` Alexander Viro
2002-07-31 13:42                 ` Alan Cox
2002-07-31 12:57                   ` Andreas Schwab
2002-07-31 14:01                   ` extended integer types (was Re: [patch] Input cleanups for 2.5.29 [2/2]) Bill Rugolsky Jr.
2002-07-30 21:39           ` [patch] Input cleanups for 2.5.29 [2/2] Vojtech Pavlik
2002-07-30 22:46             ` Kai Henningsen
2002-07-30 21:45         ` Jeff Garzik
2002-07-30 21:59           ` Linus Torvalds

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=200207310738.00566.bhards@bigpond.net.au \
    --to=bhards@bigpond.net.au \
    --cc=greg@kroah.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linuxconsole-dev@lists.sourceforge.net \
    --cc=torvalds@transmeta.com \
    --cc=vojtech@suse.cz \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).