linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [RFC] Patch series to remove devfs [00/22]
@ 2005-06-11  7:43 Greg KH
  2005-06-11 10:21 ` Adrian Bunk
                   ` (2 more replies)
  0 siblings, 3 replies; 12+ messages in thread
From: Greg KH @ 2005-06-11  7:43 UTC (permalink / raw)
  To: linux-kernel

As everyone knows[1], devfs is going to be removed from the kernel soon.
To accomplish this, here is a series of patches (22 in all) that do just
that.  Surprisingly enough, devfs was almost everywhere in the kernel,
that's why it takes so many patches :)

Anyway, here's the whole series against 2.6.12-rc6-git4.  If some of
them don't make it through to lkml (due to size restrictions, or just
failing on a "taste" filter), you can find them all at:
	http://www.kernel.org/pub/linux/kernel/people/gregkh/gregkh-2.6/gregkh-05-devfs/
along with a quilt series file to apply them with.

Andrew, please do not pick these up for your -mm tree.  Odds are it will
just cause too many conflicts to make it worth your while :)

Comments welcome.

Oh, and the best part?  Here's the summary of the diffstat:

  222 files changed, 112 insertions(+), 8545 deletions(-)

It's nice to remove code from the kernel for a change...

thanks,

greg k-h

[1] What?  You don't know this?  Didn't you get the memo[2]?  Did you
    miss the huge flame war almost a year ago[3]?  Are you living under
    a rock[4]?
[2] http://lxr.linux.no/source/Documentation/feature-removal-schedule.txt
[3] http://thread.gmane.org/gmane.linux.kernel/219278
[4] http://www.balloonplanet.com/shop/images/products/product_1788_small.jpg

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [RFC] Patch series to remove devfs [00/22]
  2005-06-11  7:43 [RFC] Patch series to remove devfs [00/22] Greg KH
@ 2005-06-11 10:21 ` Adrian Bunk
  2005-06-11 14:39   ` Greg KH
  2005-06-11 20:14 ` [2.6 patch] fix compile errors and warning after devfs removal patches Adrian Bunk
  2005-06-12 22:44 ` [RFC] Patch series to remove devfs [00/22] J.A. Magallon
  2 siblings, 1 reply; 12+ messages in thread
From: Adrian Bunk @ 2005-06-11 10:21 UTC (permalink / raw)
  To: Greg KH; +Cc: linux-kernel

On Sat, Jun 11, 2005 at 12:43:27AM -0700, Greg KH wrote:
>...
> Comments welcome.
>...

Please don't remove the !CONFIG_DEVFS_FS dummies from devfs_fs_kernel.h.

I'm sure some driver maintainers will want to keep the functions in 
their code because they share their drivers between 2.4 and 2.6 .

Keeping a devfs_fs_kernel.h with dummy functions doesn't hurt, but it 
prevents version #ifdef's in drivers and/or the same dummy functions in 
some subsystem specific headers.

> thanks,
> 
> greg k-h
>...

cu
Adrian

-- 

       "Is there not promise of rain?" Ling Tan asked suddenly out
        of the darkness. There had been need of rain for many days.
       "Only a promise," Lao Er said.
                                       Pearl S. Buck - Dragon Seed


^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [RFC] Patch series to remove devfs [00/22]
  2005-06-11 10:21 ` Adrian Bunk
@ 2005-06-11 14:39   ` Greg KH
  2005-06-11 15:36     ` Adrian Bunk
  0 siblings, 1 reply; 12+ messages in thread
From: Greg KH @ 2005-06-11 14:39 UTC (permalink / raw)
  To: Adrian Bunk; +Cc: linux-kernel

On Sat, Jun 11, 2005 at 12:21:34PM +0200, Adrian Bunk wrote:
> On Sat, Jun 11, 2005 at 12:43:27AM -0700, Greg KH wrote:
> >...
> > Comments welcome.
> >...
> 
> Please don't remove the !CONFIG_DEVFS_FS dummies from devfs_fs_kernel.h.
> 
> I'm sure some driver maintainers will want to keep the functions in 
> their code because they share their drivers between 2.4 and 2.6 .

All drivers should be in the mainline kernel tree, so why would they
need this?  Remember, out-of-the-tree drivers are on their own...

thanks,

greg k-h

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [RFC] Patch series to remove devfs [00/22]
  2005-06-11 14:39   ` Greg KH
@ 2005-06-11 15:36     ` Adrian Bunk
  2005-06-11 15:41       ` Christoph Hellwig
  2005-06-11 15:44       ` Kay Sievers
  0 siblings, 2 replies; 12+ messages in thread
From: Adrian Bunk @ 2005-06-11 15:36 UTC (permalink / raw)
  To: Greg KH; +Cc: linux-kernel

On Sat, Jun 11, 2005 at 07:39:04AM -0700, Greg KH wrote:
> On Sat, Jun 11, 2005 at 12:21:34PM +0200, Adrian Bunk wrote:
> > On Sat, Jun 11, 2005 at 12:43:27AM -0700, Greg KH wrote:
> > >...
> > > Comments welcome.
> > >...
> > 
> > Please don't remove the !CONFIG_DEVFS_FS dummies from devfs_fs_kernel.h.
> > 
> > I'm sure some driver maintainers will want to keep the functions in 
> > their code because they share their drivers between 2.4 and 2.6 .
> 
> All drivers should be in the mainline kernel tree, so why would they
> need this?  Remember, out-of-the-tree drivers are on their own...

I'm talking about drivers in the mainline kernel tree.

In some cases the driver author supports both 2.4 and 2.6 and prefers to 
support them in one file. Sometimes he submits the latest version of his 
driver to Marcelo or Linus.

If you remove the global function dummies, you force every driver 
maintainer who works this way to add the function dummies to their 
drivers.

Yes, there are many places where 2.4 and 2.6 are not source compatible 
for good reasons. But if the effort for maintaining compatibility 
between 2.4 and 2.6 in one area is as easy as keeping a header file with 
some dummy funtions it's worth considering.

And keeping the compatibility stuff in one file instead of spreaded 
through the kernel sources makes the cleanup to remove the last 
occurences a few years from now easier.

> thanks,
> 
> greg k-h

cu
Adrian

-- 

       "Is there not promise of rain?" Ling Tan asked suddenly out
        of the darkness. There had been need of rain for many days.
       "Only a promise," Lao Er said.
                                       Pearl S. Buck - Dragon Seed


^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [RFC] Patch series to remove devfs [00/22]
  2005-06-11 15:36     ` Adrian Bunk
@ 2005-06-11 15:41       ` Christoph Hellwig
  2005-06-11 15:59         ` Adrian Bunk
  2005-06-11 15:44       ` Kay Sievers
  1 sibling, 1 reply; 12+ messages in thread
From: Christoph Hellwig @ 2005-06-11 15:41 UTC (permalink / raw)
  To: Adrian Bunk; +Cc: Greg KH, linux-kernel

On Sat, Jun 11, 2005 at 05:36:56PM +0200, Adrian Bunk wrote:
> Yes, there are many places where 2.4 and 2.6 are not source compatible 
> for good reasons. But if the effort for maintaining compatibility 
> between 2.4 and 2.6 in one area is as easy as keeping a header file with 
> some dummy funtions it's worth considering.

The devfs calls for 2.4 and 2.6 are totally incompatible.  And there's
a trivial way to support both 2.4 and 2.6 in this area:  don't support
devfs at all, it always was marked either experimental or deprecated
anyway.


^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [RFC] Patch series to remove devfs [00/22]
  2005-06-11 15:36     ` Adrian Bunk
  2005-06-11 15:41       ` Christoph Hellwig
@ 2005-06-11 15:44       ` Kay Sievers
  1 sibling, 0 replies; 12+ messages in thread
From: Kay Sievers @ 2005-06-11 15:44 UTC (permalink / raw)
  To: Adrian Bunk; +Cc: Greg KH, linux-kernel

On Sat, Jun 11, 2005 at 05:36:56PM +0200, Adrian Bunk wrote:
> On Sat, Jun 11, 2005 at 07:39:04AM -0700, Greg KH wrote:
> > On Sat, Jun 11, 2005 at 12:21:34PM +0200, Adrian Bunk wrote:
> > > On Sat, Jun 11, 2005 at 12:43:27AM -0700, Greg KH wrote:
> > > >...
> > > > Comments welcome.
> > > >...
> > > 
> > > Please don't remove the !CONFIG_DEVFS_FS dummies from devfs_fs_kernel.h.
> > > 
> > > I'm sure some driver maintainers will want to keep the functions in 
> > > their code because they share their drivers between 2.4 and 2.6 .
> > 
> > All drivers should be in the mainline kernel tree, so why would they
> > need this?  Remember, out-of-the-tree drivers are on their own...
> 
> I'm talking about drivers in the mainline kernel tree.
> 
> In some cases the driver author supports both 2.4 and 2.6 and prefers to 
> support them in one file. Sometimes he submits the latest version of his 
> driver to Marcelo or Linus.
> 
> If you remove the global function dummies, you force every driver 
> maintainer who works this way to add the function dummies to their 
> drivers.
> 
> Yes, there are many places where 2.4 and 2.6 are not source compatible 
> for good reasons. But if the effort for maintaining compatibility 
> between 2.4 and 2.6 in one area is as easy as keeping a header file with 
> some dummy funtions it's worth considering.
> 
> And keeping the compatibility stuff in one file instead of spreaded 
> through the kernel sources makes the cleanup to remove the last 
> occurences a few years from now easier.

How do these 2.4+2.6 drivers integrate with sysfs? Without proper
2.6-driver-core integration they will not work anyway.

Kay

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [RFC] Patch series to remove devfs [00/22]
  2005-06-11 15:41       ` Christoph Hellwig
@ 2005-06-11 15:59         ` Adrian Bunk
  0 siblings, 0 replies; 12+ messages in thread
From: Adrian Bunk @ 2005-06-11 15:59 UTC (permalink / raw)
  To: Christoph Hellwig, Greg KH, linux-kernel

On Sat, Jun 11, 2005 at 04:41:07PM +0100, Christoph Hellwig wrote:
> On Sat, Jun 11, 2005 at 05:36:56PM +0200, Adrian Bunk wrote:
> > Yes, there are many places where 2.4 and 2.6 are not source compatible 
> > for good reasons. But if the effort for maintaining compatibility 
> > between 2.4 and 2.6 in one area is as easy as keeping a header file with 
> > some dummy funtions it's worth considering.
> 
> The devfs calls for 2.4 and 2.6 are totally incompatible.
>...

OK, it seems I've missed how much devfs changed during 2.5 times...

Simply discard my emails in this thread.

cu
Adrian

-- 

       "Is there not promise of rain?" Ling Tan asked suddenly out
        of the darkness. There had been need of rain for many days.
       "Only a promise," Lao Er said.
                                       Pearl S. Buck - Dragon Seed


^ permalink raw reply	[flat|nested] 12+ messages in thread

* [2.6 patch] fix compile errors and warning after devfs removal patches
  2005-06-11  7:43 [RFC] Patch series to remove devfs [00/22] Greg KH
  2005-06-11 10:21 ` Adrian Bunk
@ 2005-06-11 20:14 ` Adrian Bunk
  2005-06-16 21:34   ` Greg KH
  2005-06-12 22:44 ` [RFC] Patch series to remove devfs [00/22] J.A. Magallon
  2 siblings, 1 reply; 12+ messages in thread
From: Adrian Bunk @ 2005-06-11 20:14 UTC (permalink / raw)
  To: Greg KH; +Cc: linux-kernel

The patch below fixes three compile errors and one compile warning after 
applying the devfs removal patches.

Signed-off-by: Adrian Bunk <bunk@stusta.de>

---

 drivers/ide/ide-tape.c |    1 -
 drivers/md/md.c        |    1 -
 init/do_mounts_md.c    |    2 +-
 init/do_mounts_rd.c    |    4 ++--
 4 files changed, 3 insertions(+), 5 deletions(-)

--- linux-2.6.12-rc6-mm1-full/init/do_mounts_rd.c.old	2005-06-11 20:18:09.000000000 +0200
+++ linux-2.6.12-rc6-mm1-full/init/do_mounts_rd.c	2005-06-11 20:19:14.000000000 +0200
@@ -262,8 +262,8 @@
 {
 	if (rd_prompt)
 		change_floppy("root floppy disk to be loaded into RAM disk");
-	create_dev("/dev/root", ROOT_DEV, root_device_name);
-	create_dev("/dev/ram", MKDEV(RAMDISK_MAJOR, n), NULL);
+	create_dev("/dev/root", ROOT_DEV);
+	create_dev("/dev/ram", MKDEV(RAMDISK_MAJOR, n));
 	return rd_load_image("/dev/root");
 }
 
--- linux-2.6.12-rc6-mm1-full/init/do_mounts_md.c.old	2005-06-11 20:20:08.000000000 +0200
+++ linux-2.6.12-rc6-mm1-full/init/do_mounts_md.c	2005-06-11 20:20:17.000000000 +0200
@@ -275,7 +275,7 @@
 
 void __init md_run_setup(void)
 {
-	create_dev("/dev/md0", MKDEV(MD_MAJOR, 0), "md/0");
+	create_dev("/dev/md0", MKDEV(MD_MAJOR, 0));
 	if (raid_noautodetect)
 		printk(KERN_INFO "md: Skipping autodetection of RAID arrays. (raid=noautodetect)\n");
 	else {
--- linux-2.6.12-rc6-mm1-full/drivers/ide/ide-tape.c.old	2005-06-11 20:41:08.000000000 +0200
+++ linux-2.6.12-rc6-mm1-full/drivers/ide/ide-tape.c	2005-06-11 20:42:00.000000000 +0200
@@ -4875,7 +4875,6 @@
 
 	idetape_setup(drive, tape, minor);
 
-	g->number = -1;
 	g->fops = &idetape_block_ops;
 	ide_register_region(g);
 
--- linux-2.6.12-rc6-mm1-full/drivers/md/md.c.old	2005-06-11 20:48:07.000000000 +0200
+++ linux-2.6.12-rc6-mm1-full/drivers/md/md.c	2005-06-11 20:49:16.000000000 +0200
@@ -3947,7 +3947,6 @@
 {
 	mddev_t *mddev;
 	struct list_head *tmp;
-	int i;
 	blk_unregister_region(MKDEV(MAJOR_NR,0), MAX_MD_DEVS);
 	blk_unregister_region(MKDEV(mdp_major,0), MAX_MD_DEVS << MdpMinorShift);
 


^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [RFC] Patch series to remove devfs [00/22]
  2005-06-11  7:43 [RFC] Patch series to remove devfs [00/22] Greg KH
  2005-06-11 10:21 ` Adrian Bunk
  2005-06-11 20:14 ` [2.6 patch] fix compile errors and warning after devfs removal patches Adrian Bunk
@ 2005-06-12 22:44 ` J.A. Magallon
  2005-06-13 17:43   ` Greg KH
  2 siblings, 1 reply; 12+ messages in thread
From: J.A. Magallon @ 2005-06-12 22:44 UTC (permalink / raw)
  To: Greg KH; +Cc: linux-kernel


On 06.11, Greg KH wrote:
> As everyone knows[1], devfs is going to be removed from the kernel soon.
> To accomplish this, here is a series of patches (22 in all) that do just
> that.  Surprisingly enough, devfs was almost everywhere in the kernel,
> that's why it takes so many patches :)
> 

You missed this for -mm, do not know if they apply to mainline:

--- linux-2.6.11-jam25/drivers/scsi/ch.c.orig	2005-06-13 00:40:58.000000000 +0200
+++ linux-2.6.11-jam25/drivers/scsi/ch.c	2005-06-13 00:41:16.000000000 +0200
@@ -20,7 +20,6 @@
 #include <linux/interrupt.h>
 #include <linux/blkdev.h>
 #include <linux/completion.h>
-#include <linux/devfs_fs_kernel.h>
 #include <linux/ioctl32.h>
 #include <linux/compat.h>
 #include <linux/chio.h>			/* here are all the ioctls */
@@ -940,8 +939,6 @@
 	if (init)
 		ch_init_elem(ch);
 
-	devfs_mk_cdev(MKDEV(SCSI_CHANGER_MAJOR,ch->minor),
-		      S_IFCHR | S_IRUGO | S_IWUGO, ch->name);
 	class_device_create(ch_sysfs_class,
 			    MKDEV(SCSI_CHANGER_MAJOR,ch->minor),
 			    dev, "s%s", ch->name);
@@ -974,7 +971,6 @@
 
 	class_device_destroy(ch_sysfs_class,
 			     MKDEV(SCSI_CHANGER_MAJOR,ch->minor));
-	devfs_remove(ch->name);
 	kfree(ch->dt);
 	kfree(ch);
 	ch_devcount--;
--- linux-2.6.11-jam25/drivers/scsi/arcmsr/arcmsr.c.orig	2005-06-13 00:40:00.000000000 +0200
+++ linux-2.6.11-jam25/drivers/scsi/arcmsr/arcmsr.c	2005-06-13 00:40:33.000000000 +0200
@@ -101,7 +101,6 @@
 #include <linux/moduleparam.h>
 #include <linux/blkdev.h>
 #include <linux/timer.h>
-#include <linux/devfs_fs_kernel.h>
 #include <linux/mc146818rtc.h>
 #include <linux/reboot.h>
 #include <linux/sched.h>
@@ -1654,7 +1653,6 @@
 **	int                     attached;		            %% # of high level drivers attached to this %%
 **	int                     access_count;	            %% Count of open channels/mounts %%
 **	void                    *hostdata;		            %% available to low-level driver %%
-**	devfs_handle_t          de;                         %% directory for the device %%
 **	char                    type;
 **	char                    scsi_level;
 **	char                    vendor[8], model[16], rev[4];


--
J.A. Magallon <jamagallon()able!es>     \               Software is like sex:
werewolf!able!es                         \         It's better when it's free
Mandriva Linux release 2006.0 (Cooker) for i586
Linux 2.6.11-jam24 (gcc 4.0.0 (4.0.0-3mdk for Mandriva Linux release 2006.0))



^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [RFC] Patch series to remove devfs [00/22]
  2005-06-12 22:44 ` [RFC] Patch series to remove devfs [00/22] J.A. Magallon
@ 2005-06-13 17:43   ` Greg KH
  2005-06-13 19:51     ` J.A. Magallon
  0 siblings, 1 reply; 12+ messages in thread
From: Greg KH @ 2005-06-13 17:43 UTC (permalink / raw)
  To: J.A. Magallon; +Cc: linux-kernel

On Sun, Jun 12, 2005 at 10:44:33PM +0000, J.A. Magallon wrote:
> 
> On 06.11, Greg KH wrote:
> > As everyone knows[1], devfs is going to be removed from the kernel soon.
> > To accomplish this, here is a series of patches (22 in all) that do just
> > that.  Surprisingly enough, devfs was almost everywhere in the kernel,
> > that's why it takes so many patches :)
> > 
> 
> You missed this for -mm, do not know if they apply to mainline:

This patch series was not for -mm, as my comments stated :)

But thanks for the patch anyway.

greg k-h

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [RFC] Patch series to remove devfs [00/22]
  2005-06-13 17:43   ` Greg KH
@ 2005-06-13 19:51     ` J.A. Magallon
  0 siblings, 0 replies; 12+ messages in thread
From: J.A. Magallon @ 2005-06-13 19:51 UTC (permalink / raw)
  To: Greg KH; +Cc: linux-kernel


On 06.13, Greg KH wrote:
> On Sun, Jun 12, 2005 at 10:44:33PM +0000, J.A. Magallon wrote:
> > 
> > On 06.11, Greg KH wrote:
> > > As everyone knows[1], devfs is going to be removed from the kernel soon.
> > > To accomplish this, here is a series of patches (22 in all) that do just
> > > that.  Surprisingly enough, devfs was almost everywhere in the kernel,
> > > that's why it takes so many patches :)
> > > 
> > 
> > You missed this for -mm, do not know if they apply to mainline:
> 
> This patch series was not for -mm, as my comments stated :)
> 

I shifted some offsets and am running it now...

--
J.A. Magallon <jamagallon()able!es>     \               Software is like sex:
werewolf!able!es                         \         It's better when it's free
Mandriva Linux release 2006.0 (Cooker) for i586
Linux 2.6.11-jam25 (gcc 4.0.0 (4.0.0-3mdk for Mandriva Linux release 2006.0))



^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [2.6 patch] fix compile errors and warning after devfs removal patches
  2005-06-11 20:14 ` [2.6 patch] fix compile errors and warning after devfs removal patches Adrian Bunk
@ 2005-06-16 21:34   ` Greg KH
  0 siblings, 0 replies; 12+ messages in thread
From: Greg KH @ 2005-06-16 21:34 UTC (permalink / raw)
  To: Adrian Bunk; +Cc: linux-kernel

On Sat, Jun 11, 2005 at 10:14:44PM +0200, Adrian Bunk wrote:
> The patch below fixes three compile errors and one compile warning after 
> applying the devfs removal patches.
> 
> Signed-off-by: Adrian Bunk <bunk@stusta.de>

Thanks a lot, I've incorporated these into my patch series.

greg k-h

^ permalink raw reply	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2005-06-16 21:34 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-06-11  7:43 [RFC] Patch series to remove devfs [00/22] Greg KH
2005-06-11 10:21 ` Adrian Bunk
2005-06-11 14:39   ` Greg KH
2005-06-11 15:36     ` Adrian Bunk
2005-06-11 15:41       ` Christoph Hellwig
2005-06-11 15:59         ` Adrian Bunk
2005-06-11 15:44       ` Kay Sievers
2005-06-11 20:14 ` [2.6 patch] fix compile errors and warning after devfs removal patches Adrian Bunk
2005-06-16 21:34   ` Greg KH
2005-06-12 22:44 ` [RFC] Patch series to remove devfs [00/22] J.A. Magallon
2005-06-13 17:43   ` Greg KH
2005-06-13 19:51     ` J.A. Magallon

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).