RFC: return type of functions passed to DEVICE_INIT()


Benjamin Walsh <benjamin.walsh@...>
 

Folks,

For some reason, the signature of functions passed to the DEVICE_INIT()
<init_fn> parameter has a return type of 'int', but the return value is
never checked within _sys_device_do_config_level(). Some init functions
do return an error code, such as the ARC init code and the bluetooth
init routines, but that just gets ignored.

Question: should we have init functions of return type 'void' then ?
That would shave a few bytes in every init function if we don't have to
return a value.

Cheers,
Ben

--
Benjamin Walsh, SMTS
Wind River Rocket
Zephyr kernel maintainer
www.windriver.com

Join devel@lists.zephyrproject.org to automatically receive all group messages.