Re: [PATCH] Fix up return value from dio_find() (fixing a FIXME)

From: Jesper Juhl
Date: Sun Aug 01 2004 - 08:53:48 EST


On Sun, 1 Aug 2004, Geert Uytterhoeven wrote:

> On Sun, 1 Aug 2004, Jesper Juhl wrote:
> > On Sun, 1 Aug 2004, Geert Uytterhoeven wrote:
> > > On Sat, 31 Jul 2004, Jesper Juhl wrote:
> > > > Here's a patch to fix up this FIXME in drivers/dio/dio.c:dio_find() :
> > > >
> > > > * Aargh: we use 0 for an error return code, but select code 0 exists!
> > > > * FIXME (trivial, use -1, but requires changes to all the drivers :-< )
> > > > */
> > > >
> > > > I've changed the return value to -1 as suggested by the comment, and then
> > > > went looking for the drivers that needed to be changed (as the comment
> > > > mentions). I only found two users of dio_find() and I've fixed those up to
> > > > not treat 0 as an error, but only values <0.
> > > > The FIXME implies (to me at least) that there are many drivers that would
> > > > need to be changed, but I could only find two - did I miss anything?
> > > > Also, I don't have the hardware to test the drivers I've changed, so I've
> > > > done compile testing only - could someone please review my changes and
> > > > confirm if they are correct?
> > >
> > > I guess most of these are already covered by Kars' patch at the URL below?
> > >
> > > http://linux-m68k-cvs.ubb.ca/~geert/linux-m68k-2.6.x-merging/474-dio.diff
> > >
> > It certainly looks that way from reading the patch. I was unaware of this
> > patch (which looks a lot more thorough than mine). Thank you for the
> > link.
> > His patch makes the change to dio_find() , but I don't see any changes to
> > drivers/net/hplance.c or drivers/video/hpfb.c - are the changes I made
> > there not needed? those two treat a return value of 0 from dio_find() as
> > an error as far as I can tell...
>
> These are in patches 475 and 476 next to 474 in the same dir.
>
Ahh yes, so I see. Now why didn't I think to look there...
And once again his patches look way better than mine. :)

Ok, everyone just ignore my patch.


/Jesper

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