devicetree: remove DT_HAS_NODE_STATUS_OKAY

Several reviewers agreed that DT_HAS_NODE_STATUS_OKAY(...) was an
undesirable API for the following reasons:

- it's inconsistent with the rest of the DT_NODE_HAS_FOO names
- DT_NODE_HAS_FOO_BAR_BAZ(node) was agreed upon as a shorthand
  for macros which are equivalent to
  DT_NODE_HAS_FOO(node) && DT_NODE_HAS_BAR(node) &&
- DT_NODE_HAS_BAZ(node), and DT_HAS_NODE_STATUS_OKAY is an odd duck
- DT_NODE_HAS_STATUS(..., okay) was viewed as more readable anyway
- it is seen as a somewhat aesthetically challenged name

Replace all users with DT_NODE_HAS_STATUS(..., okay), which is
semantically equivalent.

This is mostly done with sed, but a few remaining cases were done by
hand, along with whitespace, docs, and comment changes. These special
cases include the Nordic SOC static assert files.

Signed-off-by: Martí Bolívar <marti.bolivar@nordicsemi.no>
This commit is contained in:
Martí Bolívar 2020-05-11 11:56:08 -07:00 committed by Carles Cufí
commit 6e8775ff84
184 changed files with 968 additions and 1010 deletions

View file

@ -24,13 +24,13 @@
#include <sys/util.h>
#include <offsets.h>
/* We need to dummy out DT_HAS_NODE_STATUS_OKAY when building the unittests
* since including devicetree.h would require generating dummy header files
* to match what the generate creates, so its easier to just dummy out
* DT_HAS_NODE_STATUS_OKAY.
/* We need to dummy out DT_NODE_HAS_STATUS when building the unittests.
* Including devicetree.h would require generating dummy header files
* to match what gen_defines creates, so it's easier to just dummy out
* DT_NODE_HAS_STATUS.
*/
#ifdef ZTEST_UNITTEST
#define DT_HAS_NODE_STATUS_OKAY(x) 0
#define DT_NODE_HAS_STATUS(node, status) 0
#else
#include <devicetree.h>
#endif
@ -232,7 +232,7 @@ extern char __gcov_bss_size[];
/* end address of image, used by newlib for the heap */
extern char _end[];
#if DT_HAS_NODE_STATUS_OKAY(DT_CHOSEN(zephyr_ccm))
#if DT_NODE_HAS_STATUS(DT_CHOSEN(zephyr_ccm), okay)
extern char __ccm_data_rom_start[];
extern char __ccm_start[];
extern char __ccm_data_start[];
@ -244,7 +244,7 @@ extern char __ccm_noinit_end[];
extern char __ccm_end[];
#endif
#if DT_HAS_NODE_STATUS_OKAY(DT_CHOSEN(zephyr_dtcm))
#if DT_NODE_HAS_STATUS(DT_CHOSEN(zephyr_dtcm), okay)
extern char __dtcm_data_start[];
extern char __dtcm_data_end[];
extern char __dtcm_bss_start[];