lkml.org 
[lkml]   [2004]   [Jan]   [16]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] readX_relaxed interface


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-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/

\
 
 \ /
  Last update: 2009-11-18 23:46    [W:0.333 / U:0.096 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site