tech-kern archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: Changing the return value of xxx_attach() from void to int.
On Thu, Jun 23, 2016 at 08:17:34PM +0800, Paul Goyette wrote:
> On Thu, Jun 23, 2016 at 07:40:14PM +0900, Masanobu SAITOH wrote:
> > As you know, the return value of device driver's attach function is void.
> > I've thought that we should change it to int for many years. I believe I'm
> > not the only person.
>
> I have always been surprised to see that we don't already have a return
> value. I really think that a meaningful code, more than success/fail, is
> useful.
What for? ENXIO vs EINVAL vs ESUPERMOON doesn't have any meaning for the
autoconf framework. It just cares about success or not. At the same
time, the errno code is practically useless for humans as well. If you
want to provide a helpful information, print a meaningful error message.
Joerg
Home |
Main Index |
Thread Index |
Old Index