Re: Fwd: struct inode size reduction.

Andries Brouwer
2003-03-09T22:57:56Z

On Sun, Mar 09, 2003 at 11:18:24PM +0100, Roman Zippel wrote:
> On Sun, 9 Mar 2003, Andries Brouwer wrote:
>
> > [I already submitted the patch throwing it out, but someone,
> > maybe it was Roman Zippel, complained that that was going
> > in the wrong direction. In the very long run that may be true
> > (or not), but for 2.6 I do not see the point of this dead code.]
>
> My main question here is whether that code hurts in any way? Does it
> prevent other cleanups? Sure this code needs more work to be really
> useful, but as long as it only wastes a bit of space, I'd prefer to keep
> it.

Yes, dead code always hurts.
In a global change - should this dead code also be updated?
To do what?

Andries

=====
if (driver->flags & TTY_DRIVER_INSTALLED)
return 0;

- error = register_chrdev(driver->major, driver->name, &tty_fops);
+ error = register_chrdev_region(driver->major, driver->minor_start,
+ driver->num, driver->name, &tty_fops);
if (error < 0)
return error;
else if(driver->major == 0)
=====
+int register_chrdev(unsigned int major, const char *name,
+ struct file_operations *fops)
+{
+ return register_chrdev_region(major, 0, 256, name, fops);
+}
=====