mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "Tian, Kevin" <kevin.tian@intel.com>
To: "Maciej Zenczykowski" <maze@cela.pl>
Cc: "Andries Brouwer" <aebr@win.tue.nl>,
	"Andrew Morton" <akpm@osdl.org>,
	"Sharma, Arun" <arun.sharma@intel.com>,
	<linux-kernel@vger.kernel.org>,
	"Matthew Wilcox" <willy@debian.org>
Subject: RE: [PATCH] incorrect use of sizeof() in ioctl definitions
Date: Wed, 8 Oct 2003 19:42:23 +0800	[thread overview]
Message-ID: <571ACEFD467F7749BC50E0A98C17CDD8F3283D@pdsmsx403.ccr.corp.intel.com> (raw)

> Wrote from Maciej Zenczykowski [mailto:maze@cela.pl]
> 
> So as not to break userspace we must still support old values, at the
same
> time we want new programs to start using the new correct values -
hence
> the introduction of _backward compatibility_ values.

Thanks. :) Now I see... but are there any rules to decide which part
should be upgraded even breaking the backward compatibility? You know,
the latest 2.6 kernel will request many modules recompiled to run on it.
IMO, most ioctls defined in this bad manner seems to be not-widely used
ones, and... maybe it's worthy of some sacrifice on temporary
compatibility, thus to keep a clean and consistent environment. 

> the old was bad since it was sizeof(sizeof(...)) - it so happens that
by
> def sizeof(anything) is a size_t - thus replacing sizeof(sizeof(..))
with
> sizeof(size_t) changes nothing - just shortens the code...
> Of course what we probably should really have is the above (now) code
> defined as "BAD" and the previous (old) define without the sizeof as
the
> current (no BAD prefix).

Reasonable!

> Yap, both violate.  It is a mess and there is no easy fix due to the
need
> to retain the old invalid ioctl's as well... 

If without such need... :(

Thanks,
Kevin


             reply	other threads:[~2003-10-08 11:42 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-10-08 11:42 Tian, Kevin [this message]
2003-10-08 13:33 ` Matthew Wilcox
  -- strict thread matches above, loose matches on Subject: below --
2003-10-08  9:58 Tian, Kevin
2003-10-08 13:30 ` Matthew Wilcox
2003-10-08  8:40 Tian, Kevin
2003-10-08 10:01 ` Maciej Zenczykowski
2003-09-30 20:53 Arun Sharma
2003-09-30 21:08 ` Andrew Morton
2003-09-30 21:35   ` Russell King
2003-09-30 21:43     ` Andrew Morton
2003-09-30 22:27     ` Maciej Zenczykowski
2003-09-30 22:25   ` Matthew Wilcox
2003-10-01  0:32     ` Andries Brouwer

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=571ACEFD467F7749BC50E0A98C17CDD8F3283D@pdsmsx403.ccr.corp.intel.com \
    --to=kevin.tian@intel.com \
    --cc=aebr@win.tue.nl \
    --cc=akpm@osdl.org \
    --cc=arun.sharma@intel.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=maze@cela.pl \
    --cc=willy@debian.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

all inboxes | Powered by JetHome®