Re: [PATCH] readX_relaxed interface

From: Linus Torvalds <torvalds_at_osdl.org>
Date: 2004-01-16 16:00:10
On Thu, 15 Jan 2004, Greg KH wrote:
> 
> It looks ok, but it would really be good if we could indicate if the
> read actually was successful.  Right now some platforms can detect
> faults and do not have a way to get that error back to the driver in a
> sane manner.  If we were to change the read* functions to look something
> like:
> 	int readb(void *addr, u8 *data);
> it would be a world easier.

NOOOO!

Please don't. 99.99% of all uses don't care one whit, and an interface 
like the above ends up being total cr*p to use.

If you care about machine check errors, use a special interface for that. 
A _really_ special one. Especially as on many systems you'll likely have 
to read status registers etc (and clear them before doing the IO) to see 
the errors.

So that way you can get errors working, AND it won't actually make normal 
code any uglier.

		Linus
-
To unsubscribe from this list: send the line "unsubscribe linux-ia64" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Received on Fri Jan 16 00:28:31 2004

This archive was generated by hypermail 2.1.8 : 2005-08-02 09:20:21 EST