2002-06-20 07:09:47

by Gerald Champagne

[permalink] [raw]
Subject: [PATCH] small cleanup of ide parameter parsing

Attached is a small cleanup of the parameter parsing in the ide driver.
This patch replaces some of the string parsing code with get_options()
and it starts cleaning up the code that checks for specific chipsets.

I tried to keep the chipset error checking exactly as it was before, and
now the remaining code looks a little strange. It does something like
this:

if (parameter is a chipset name) {
if (chipset type is already defined for selected port)
goto bad_option;

if ((chipset parameter != dc4030) && (hw!=ide0) )
goto bad_channel;

if ((chipset parameter != dc4030) &&
chipset type is already defined for ide1)
goto bad_option;
}

Can some of this be removed? It would allow the remaining code to be
simplified..

Gerald









Attachments:
ide-parse.diff (8.95 kB)