public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Marcin Dalecki <dalecki@evision.ag>
To: Richard Gooch <rgooch@ras.ucalgary.ca>
Cc: martin@dalecki.de, Linus Torvalds <torvalds@transmeta.com>,
	Kernel Mailing List <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] 2.5.27 devfs
Date: Mon, 22 Jul 2002 20:03:01 +0200	[thread overview]
Message-ID: <3D3C48D5.6080500@evision.ag> (raw)
In-Reply-To: 200207221728.g6MHSkY15219@vindaloo.ras.ucalgary.ca

Richard Gooch wrote:
> Marcin Dalecki writes:
> 
>>Kill two inlines which are notwhere used and which don't make sense
>>in the case someone is not compiling devfs at all.
> 
> 
> Rejected. Linus, please don't apply this bogus patch. External patches
> and drivers rely on the inline stubs so that #ifdef CONFIG_DEVFS_FS
> isn't needed.

Dare to actually *name* one of them?

> Martin, why are you bothering with this kind of false cleanup? These
> inline stubs don't take up any space in the object files, so why
> bother? Also, given that the stubs were carefully added in the first
> place, it suggests that there is a good reason for their presence.

They where not "carefully added".

The interface you are exposing is bogous.
Look in md.c for one example why.

Last time I counted you provide at least three different ways of object 
allocations which play nasty games with major minor numbers in repeating
code in drivers all scattered over the kernel.
cd-roms are treated special md.c is doing. And you are doing the
whole object management in a side step instead of embarcing the
normal structures holding already device information so you get
of course memmory management problems...

> Why didn't you stop and think it through before firing off a patch, or
> at least ask me if you couldn't see why? This "patch first, think/ask
> questions later" approach is disturbing.

You didn't think doing devfs_fs_kernel.h. One simple sample from there:

devfs_get_maj_min(devfs_get_handle_from_inode((inode))

If I look at md.c which is using it... well better don't tell.

And the above of of course inside ({ })...

Everybody would expect the following to be only a single function:

extern devfs_handle_t devfs_get_handle (devfs_handle_t dir, const char
extern devfs_handle_t devfs_find_handle (devfs_handle_t dir, const char

And it was of course too hard to unify ops and handle:

extern void *devfs_get_ops (devfs_handle_t de);
extern void devfs_put_ops (devfs_handle_t de);

You couldn't resist adding the redundant devfs_ prefix overall in the 
kernel:

extern devfs_register_chrdev (unsigned int major, const char *name,
                                   struct file_operations *fops);
extern int devfs_register_blkdev (unsigned int major, const char *name,
                                   struct block_device_operations *bdops);
extern int devfs_unregister_chrdev (unsigned int major, const char *name);
extern int devfs_unregister_blkdev (unsigned int major, const char *name);

Three different allocators and deallocators for one single subsystem,
preserving the illusion that there is in linux a real difference between 
major and minor numbers...

extern int devfs_alloc_major (char type);
extern void devfs_dealloc_major (char type, int major);
extern kdev_t devfs_alloc_devnum (char type);
extern void devfs_dealloc_devnum (char type, kdev_t devnum);
extern int devfs_alloc_unique_number (struct unique_numspace *space);
extern void devfs_dealloc_unique_number (struct unique_numspace *space,
                                          int number);

If flags are invalid -> add an invalid flag! instead of value return 
through pointer.

static inline int devfs_get_flags (devfs_handle_t de, unsigned int *flags)
{
     return 0;
}

And so on and so on.... Viro is simple right.


  reply	other threads:[~2002-07-22 18:05 UTC|newest]

Thread overview: 41+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-07-20 19:22 Linux-2.5.27 Linus Torvalds
2002-07-22 10:42 ` [PATCH] 2.5.27 sysctl Marcin Dalecki
2002-07-22 10:53   ` Christoph Hellwig
2002-07-22 10:56     ` Marcin Dalecki
2002-07-22 11:02       ` Christoph Hellwig
2002-07-22 11:03         ` Marcin Dalecki
2002-07-22 12:51           ` Alexander Viro
2002-07-22 13:02             ` Marcin Dalecki
2002-07-22 11:13       ` Christoph Hellwig
2002-07-22 11:19       ` Dave Jones
2002-07-22 11:19       ` bart
2002-07-22 11:21       ` BALBIR SINGH
2002-07-22 12:30       ` Alan Cox
2002-07-22 11:21         ` Marcin Dalecki
2002-07-22 15:57   ` Daniel Egger
2002-07-22 10:43 ` [PATCH] 2.5.27 devfs Marcin Dalecki
2002-07-22 17:28   ` Richard Gooch
2002-07-22 18:03     ` Marcin Dalecki [this message]
2002-07-22 18:19       ` Alexander Viro
2002-07-22 18:46         ` Marcin Dalecki
2002-07-23  5:04       ` Richard Gooch
2002-07-22 10:45 ` [PATCH] 2.5.27 sched Marcin Dalecki
2002-07-22 10:47 ` [PATCH] 2.5.27 smbiod Marcin Dalecki
2002-07-22 22:29   ` Albert D. Cahalan
2002-07-22 10:50 ` [PATCH] 2.5.27 spinlock Marcin Dalecki
2002-07-24  4:40   ` Rusty Russell
2002-07-22 10:51 ` [PATCH] 2.5.27 wait Marcin Dalecki
2002-07-22 10:53 ` [PATCH] 2.5.27 enum Marcin Dalecki
2002-07-22 20:01   ` Benjamin LaHaise
2002-07-23  2:11     ` David S. Miller
2002-07-23  2:55       ` Alexander Viro
2002-07-24  6:44       ` James H. Cloos Jr.
2002-07-23 12:27     ` Dave Jones
2002-07-23 12:41       ` Marcin Dalecki
2002-07-23 13:05       ` Bartlomiej Zolnierkiewicz
2002-07-24  4:49       ` Rusty Russell
2002-07-24  9:47         ` Dave Jones
2002-07-22 14:08 ` [PATCH] 2.5.27 read_write Marcin Dalecki
2002-07-22 16:55   ` Alan Cox
2002-07-22 16:15     ` [PATCH] 2.5.27 read_write - take 2 Marcin Dalecki
2002-07-22 17:04   ` [PATCH] 2.5.27 read_write Alan Cox

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=3D3C48D5.6080500@evision.ag \
    --to=dalecki@evision.ag \
    --cc=linux-kernel@vger.kernel.org \
    --cc=martin@dalecki.de \
    --cc=rgooch@ras.ucalgary.ca \
    --cc=torvalds@transmeta.com \
    /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