Re: another IDE cleanup: kill duplicated code

Martin Dalecki
2002-02-12T10:53:09Z

Pavel Machek wrote:

>Hi!
>
>This is slightly longer but also simple cleanup. It kills code
>duplication and removes unneccessary assignments/casts. Please apply,
>
>
If you are already at it, I would like to ask to you consider seriously
the removal of the
following entries in the ide drivers /proc control files:

ide_add_setting(drive, "breada_readahead", ... 1,
2, &read_ahead[major], NULL);
ide_add_setting(drive, "file_readahead", ...
&max_readahead[major][minor], NULL);

Those calls can be found in ide-cd.c, ide-disk,c and ide-floppy.c

The first does control an array of values, which doesn't make sense in
first place. I.e. changing it doesn't
change ANY behaviour of the kernel.

The second of them is trying to control a file-system level constant
inside the actual block device driver.
This is a blatant violation of the layering principle in software
design, and should go as soon as
possible.

BTW.> The wole IDE /proc stuff found there makes me vommit...
Both in terms of interface and in terms of coding style.
Apparently Andre Hendrick doesn't know what ioctrl are about and is
missing the windows
registry greatly.