Re: RFC: Use error codes from errno.h


Andre Guedes <andre.guedes@...>
 

Hi Daniel, thanks for your feedback!

See some comments inline:

Quoting Dan Kalowsky (2016-03-21 14:10:43)
Hi, trying the webmail reply for a first time. Be gentle.

Hi all,

Quoting Andre Guedes (2016-03-03 16:43:24)

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);
+1
Patch sent to gerrit.


2) Deprecate DEV_* (just add a comment in device.h saying: DEV_* are deprecate,
use errno.h codes instead.
+1 I would argue this should step 1. This can be and should be merged in before the close of the release window this week. So get this done ASAP.
Fine by me. Patch sent to gerrit. There is no dependency so it can be merged
before any other patch.


3) Remove DEV_* codes.

Since 3) might break external applications, we should apply it during a major
release I guess.
I'd wait until the start of the next release cycle to make this change. It will give a long window of opportunity to update.
Fine by me too. I also sent a patch removing the DEV_* codes to gerrit, but
we can wait until the next merge window is open to apply it.

BTW, while we don't remove DEV_* codes, we have to be extra careful to avoid
new code is merged using DEV_* instead of -E*. I just noticed this occurred
with aon counters and gpio_stm32 drivers. Patches fixing this on gerrit.

Regards,

Andre

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