Re: [PATCH] 2.4.19-pre10 s/Efoo/-Efoo/ drivers/char/rio/*.c

Anthony J. Breeds-Taurima (tony@cantech.net.au)
Tue, 4 Jun 2002 18:32:45 +0800 (WST)


On Tue, 4 Jun 2002, Rasmus Andersen wrote:

> On Tue, Jun 04, 2002 at 04:48:58PM +0800, Anthony J. Breeds-Taurima wrote:
> > Hello All,
> > This is another cleanup patch changing positive return values into
> > negative's.
> >
> >
> > Yours Tony
> >
> > Jan 22-26 2003 Linux.Conf.AU http://conf.linux.org.au/
> > The Australian Linux Technical Conference!
> >
> > --------------------------------------------------------------------------------
> > diff -X dontdiff -urN linux-2.4.19-pre10.clean/drivers/char/rio/rio_linux.c linux-2.4.19-pre10/drivers/char/rio/rio_linux.c
> > --- linux-2.4.19-pre10.clean/drivers/char/rio/rio_linux.c Tue Apr 30 13:22:07 2002
> > +++ linux-2.4.19-pre10/drivers/char/rio/rio_linux.c Tue Jun 4 16:27:36 2002
> > @@ -702,7 +702,7 @@
> > func_enter();
> >
> > /* The "dev" argument isn't used. */
> > - rc = -riocontrol (p, 0, cmd, (void *)arg, suser ());
> > + rc = riocontrol (p, 0, cmd, (void *)arg, suser ());
>
> I'm sorry but since this code indeed changes the positive return
> codes into negatives, what is the purpose of your patch? Have you
> talked to the maintainer (R.E.Wolff)?

Yes I have spoken to Rogier about this before I posted it to LKML.
riocontol calls several functions like RIONewTable. Which in the past
had returned ENXIO etc etc. These positive returns where then had thier
sign switched in the riocontrol line above. This patch was supposed to do
2 things 1) make the rio drivers conform to the more general "negative on
error" convention for most functions and 2) bring the code more inline with
the version in 2.5

Howver looking closer, which I should have done BEFORE I posetd here
shows that this patch doesn't fix all places so the patch above is bad indeed.

I'll spend some time reauditing the code and fixing trhe places I missed and
then retrans.

Yours Tony

Jan 22-26 2003 Linux.Conf.AU http://conf.linux.org.au/
The Australian Linux Technical Conference!

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