All of lore.kernel.org
 help / color / mirror / Atom feed
From: Arnd Bergmann <arnd@arndb.de>
To: "Kevin P. Fleming" <kpfleming@cox.net>
Cc: Andreas Schwab <schwab@suse.de>, LKML <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] new ioctl type checking causes gcc warning
Date: Sat, 13 Sep 2003 13:05:11 +0200	[thread overview]
Message-ID: <200309131305.12161.arnd@arndb.de> (raw)
In-Reply-To: <3F626544.40000@cox.net>

On Saturday 13 September 2003 02:31, Kevin P. Fleming wrote:
> Does that mean that
> these two lines:
>
> #define BLKGETSIZE64    _IOR(0x12,114,sizeof(__uint64_t))
> #define BLKGETSIZE64    _IOR(0x12,114,__uint64_t)
>
> actually produce different ioctl numbers?

Exactly. On 32 bit systems, the former is 0x80041272, the
latter is 0x80081272. On 64 bit systems, they are both
0x80081272.

>                                            If so, then I don't
> understand how the kernel can continue to offer the old/invalid
> interface when the new _IOR macro won't accept the first version any
> longer.

Inside the kernel, the first definition has to be changed to
something like:

#define BLKGETSIZE64    _IOR(0x12,114,size_t) /* broken: actually __u64 */
or
#define BLKGETSIZE64    _IOR_BAD(0x12,114,sizeof(__uint64_t)) /* broken */

in order to get a definition that will pass the check and
generate the well-known number.

  reply	other threads:[~2003-09-13 11:05 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-09-12 19:13 [PATCH] new ioctl type checking causes gcc warning Kevin P. Fleming
2003-09-12 20:02 ` Andreas Schwab
2003-09-12 12:53   ` Arnd Bergmann
2003-09-12 23:43     ` Kevin P. Fleming
2003-09-13  0:22       ` Arnd Bergmann
2003-09-13  0:31         ` Kevin P. Fleming
2003-09-13 11:05           ` Arnd Bergmann [this message]
2003-09-13 13:17             ` Kevin P. Fleming
2003-09-13 19:10       ` Jamie Lokier

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=200309131305.12161.arnd@arndb.de \
    --to=arnd@arndb.de \
    --cc=kpfleming@cox.net \
    --cc=linux-kernel@vger.kernel.org \
    --cc=schwab@suse.de \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.