public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Robert Hancock <hancockr@shaw.ca>
To: David Woodhouse <dwmw2@infradead.org>
Cc: Arnd Bergmann <arnd@arndb.de>,
	Arjan van de Ven <arjan@infradead.org>,
	Mike Frysinger <vapier@gentoo.org>,
	akpm@linux-foundation.org, linux-kernel@vger.kernel.org,
	linux-s390@vger.kernel.org, rmk@arm.linux.org.uk
Subject: Re: [patch] use __asm__ and __volatile__ in i386/arm/s390 byteorder.h
Date: Mon, 18 Jun 2007 08:27:15 -0600	[thread overview]
Message-ID: <46769643.7010106@shaw.ca> (raw)
In-Reply-To: <fa.tGqwq8EAmSwz5rSn2D2AkvD+yt0@ifi.uio.no>

David Woodhouse wrote:
> On Mon, 2007-06-18 at 01:24 +0200, Arnd Bergmann wrote:
>> On Monday 18 June 2007, Arjan van de Ven wrote:
>>> On Sun, 2007-06-17 at 18:33 -0400, Mike Frysinger wrote:
>>>> This changes asm() to __asm__() and volatile to __volatile__ so that these
>>>> headers can be used with gcc's -std=c99.
>>> hmm but the kernel doesn't use -std=c99...
>> The byteorder headers are exported to user space through
>> include/asm-generic/Kbuild.asm, and they are used by a number
>> of other exported headers, so they should work with any
>> gcc flags that a user might want to use. 
> 
> Even those headers which are exported are _still_ kernel headers¹. The
> 'caveat emptor' principle still applies to them, and we don't have to be
> _that_ anal about it. GNU extensions (and proper C types, for that
> matter) should be acceptable, surely?

If we expect userspace apps to include them, then I would vote for no, 
not for anything outside of #ifdef __KERNEL__ in exported headers. Keep 
in mind also that C++ apps may need to include these as well and those 
extensions don't always play well in C++ mode. (Last instance I ran into 
was the ioctl argument checking macros _IOR, _IOW, etc. that create 
non-compiling code if you use them in a C++ program.)

-- 
Robert Hancock      Saskatoon, SK, Canada
To email, remove "nospam" from hancockr@nospamshaw.ca
Home Page: http://www.roberthancock.com/


       reply	other threads:[~2007-06-18 14:27 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <fa.Xa4Tv0RVV3kUIdHC69Jp/LpQPcg@ifi.uio.no>
     [not found] ` <fa.D5W5QzyAnzzOD5Ln35+YDQKzWsE@ifi.uio.no>
     [not found]   ` <fa.XhJVn2uLXM0A6yjcYTr2E44DELQ@ifi.uio.no>
     [not found]     ` <fa.tGqwq8EAmSwz5rSn2D2AkvD+yt0@ifi.uio.no>
2007-06-18 14:27       ` Robert Hancock [this message]
2007-06-18 17:57         ` [patch] use __asm__ and __volatile__ in i386/arm/s390 byteorder.h H. Peter Anvin
2007-06-18 18:12         ` Christoph Hellwig
2007-06-17 22:33 Mike Frysinger
2007-06-17 22:51 ` Arjan van de Ven
2007-06-17 23:24   ` Arnd Bergmann
2007-06-17 23:55     ` Mike Frysinger
2007-06-18  8:51     ` David Woodhouse
2007-06-18 18:11     ` Christoph Hellwig
2007-06-18 18:21       ` Mike Frysinger
2007-06-18 18:34 ` Christoph Hellwig
2007-06-18 18:39   ` Christoph Hellwig
2007-06-18 19:00   ` Sam Ravnborg
2007-06-19  4:15     ` Christoph Hellwig

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=46769643.7010106@shaw.ca \
    --to=hancockr@shaw.ca \
    --cc=akpm@linux-foundation.org \
    --cc=arjan@infradead.org \
    --cc=arnd@arndb.de \
    --cc=dwmw2@infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-s390@vger.kernel.org \
    --cc=rmk@arm.linux.org.uk \
    --cc=vapier@gentoo.org \
    /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