1) Returning 0 on success, and -errno on error is a common kernel
convention.
2) Following kernel conventions makes it easier for other programmers
to use your code.
3) You should only violate kernel conventions when there is a
compelling reason.
1a) If you're going to break a convention, do it in a way that
breaks compile, or
1b) If you can't do that, make it reliably break at runtime.
4) The single case which requires this information can be fixed by a
simple 10-line wrapper function.
I do not believe this is a compelling reason to violate kernel
convention in a way which is almost impossible to notice. I furthur
believe that it speaks very poorly about the thought put into kernel
interface design.
> All the cases I looked at where replications of existing bugs copied from
> old drivers.
Try looking at intermezzo, or the s390 and s390x ports. New code, new
coders, same trap.
Rusty.
-- Anyone who quotes me in their sig is an idiot. -- Rusty Russell. - 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/