Re: [patch] Space.c and -fwritable-strings

From: Andrew Morton (andrewm@uow.edu.au)
Date: Wed Apr 05 2000 - 19:31:04 EST


Nick Holloway wrote:
>
> torvalds@transmeta.com (Linus Torvalds) writes:
> > Ok, I have an alternative approach that I think should be a lot cleaner
> > and that looks obviously correct. How about this one-liner patch instead:
> >
> > include/linux/netdevice.h:
> >
> > struct net_device {
> > ...
> > - char *name;
> > + char name[16];
> > ...
>
> Less obviously correct are the modifications to the network drivers :-)
>
> I did start this (just to see how bad it really was), and I have 46
> modified source files. This is only looking at "drivers/net/*.c".

pwold011:/usr/src/linux-2.3.99-pre3/drivers/net> grep -rl '[-]>name = ' . | wc -l
     66

> I have checked it compiles with all network drivers as modules, but that
> is all. I may have goofed in moving from 2.3.99-pre2 to 2.3.99-pre3
> (no compilation test performed).
>
> If you want to have a look, point an HTTP client at:
>
> http://www.alfie.demon.co.uk/dev_name-2.3.99-pre3.diff.gz
>
> My own feeling is that this is rather a large upheaval close to 2.4.
> Then again, it isn't my call. In addition, many of the modified drivers
> should be using init_etherdev anyway.
>

There are a number of drivers which privately allocate their
struct net_device.

There are a number of drivers which allocate eight bytes for their net_device.name.

There is the inconsistent naming passed to request_region,
identified by David Hinds (http://www.uwsg.indiana.edu/hypermail/linux/kernel/0003.3/1573.html).
Alan says the drivers should use the "ethN" name.

There is consensus that Space.c should be removed altogether:

**Donald:
> We can now get rid of Space.c, since no current documentation advises people
> to modify it. But it can and should be done in a way that does not break
> LILO-passed parameters, which are still required for some configurations.

**Alexey:
  I tried to kill it while 2.1 and failed miserably by the same reason. 8)
  Too much of hacks... It was difficult to clean this without harm.

  The attempt made recently (seems, by Alan) is great step,
  but it is incomplete again. Yes, Space.c must die.

(http://www.wcug.wwu.edu/lists/netdev/200003/msg00068.html)

I suggest that this is simply too much stuff for now. We are better
off spending our time hunting down SMP/IRQ races, staring glumly at bug
reports and backpatching changes from Donald's drivers. Unless
someone can suggest a suitable part-way stopping point we should
solemnly promise to fix the interface uglies in 2.5.

-- 
-akpm-

- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.rutgers.edu Please read the FAQ at http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Fri Apr 07 2000 - 21:00:15 EST