Re: RFC: Use error codes from errno.h

Andre Guedes <andre.guedes@...>

Hi all,

Quoting Andre Guedes (2016-03-03 16:43:24)
Quoting Jesus Sanchez-Palencia (2016-03-02 16:03:22)
The initial discussion was about using errno.h codes at the driver's layer
but I think we can expand it to the whole system. Actually, errno.h codes
are already used in net/bluetooth and net/ip.
+1 ! But I would propose that we first get this right for the device driver APIs.
Yes, this is the idea.
Do we have a consensus about this?

After the "errno-drivers" patchset, DEV_* codes will be used only at 'board'
and 'arch' layers. Actually, all occurrences of DEV_* codes in board/ are
from pinmux drivers. These drivers are going to be landed in drivers/ soon
(patches are under review on gerrit) so they will already be replaced by -E*
codes. This means that only a few files from arch/ will be using DEV_* codes.

If we have a consensus, the next steps are:
1) Replace DEV_* occurrences in arch/ (and boards/ if applicable);
2) Deprecate DEV_* (just add a comment in device.h saying: DEV_* are deprecate,
use errno.h codes instead.
3) Remove DEV_* codes.

Since 3) might break external applications, we should apply it during a major
release I guess.



Join to automatically receive all group messages.