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

I'd also want to make sure that the change "plays nicely" with drivers for pseudo-devices as well as devices. I'd also want to see that the change doesn't break any modular drivers; especially for pseudo-devs which have a some interesting attach() issues when built as modules.


+------------------+--------------------------+------------------------+
| Paul Goyette     | PGP Key fingerprint:     | E-mail addresses:      |
| (Retired)        | FA29 0E3B 35AF E8AE 6651 | paul at whooppee.com   |
| Kernel Developer | 0786 F758 55DE 53BA 7731 | pgoyette at netbsd.org |
+------------------+--------------------------+------------------------+


Home | Main Index | Thread Index | Old Index