treewide: Replace all uses of CONCAT with _CONCAT

One of the ARM architure files, defined since long ago
CONCAT having the exact same purpose as Zephyr's _CONCAT.
Unfortunately this header is included almost always
and the macro defined in all ARM based platforms,
which seems to have lead to many uses of this macro
instead of _CONCAT.

Fix it by using _CONCAT instead.

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
This commit is contained in:
Alberto Escolar Piedras 2023-11-06 11:42:07 +01:00 committed by Carles Cufí
parent bfff0f9f4c
commit 8b456ea2a1
4 changed files with 11 additions and 11 deletions

View file

@ -564,7 +564,7 @@ BUILD_ASSERT((CONFIG_ETH_NXP_S32_TX_RING_BUF_SIZE % FEATURE_GMAC_DATA_BUS_WIDTH_
#define ETH_NXP_S32_MAC_SPEED(n) \
COND_CODE_1(ETH_NXP_S32_IS_FIXED_LINK(n), \
(CONCAT(CONCAT(GMAC_SPEED_, ETH_NXP_S32_FIXED_LINK_SPEED(n)), M)), \
(_CONCAT(_CONCAT(GMAC_SPEED_, ETH_NXP_S32_FIXED_LINK_SPEED(n)), M)), \
(GMAC_SPEED_100M))
#define ETH_NXP_S32_MAC_DUPLEX(n) \
@ -574,7 +574,7 @@ BUILD_ASSERT((CONFIG_ETH_NXP_S32_TX_RING_BUF_SIZE % FEATURE_GMAC_DATA_BUS_WIDTH_
(GMAC_FULL_DUPLEX))
#define ETH_NXP_S32_MAC_MII(n) \
CONCAT(CONCAT(GMAC_, DT_INST_STRING_UPPER_TOKEN(n, phy_connection_type)), _MODE)
_CONCAT(_CONCAT(GMAC_, DT_INST_STRING_UPPER_TOKEN(n, phy_connection_type)), _MODE)
#define ETH_NXP_S32_IRQ_INIT(n, name) \
IRQ_CONNECT(DT_INST_IRQ_BY_NAME(n, name, irq), \

View file

@ -78,7 +78,7 @@ uint8_t memc_nxp_s32_qspi_get_instance(const struct device *dev)
#define QSPI_DATA_CFG(n) \
IF_ENABLED(FEATURE_QSPI_DDR, ( \
.dataRate = CONCAT(QSPI_IP_DATA_RATE_, \
.dataRate = _CONCAT(QSPI_IP_DATA_RATE_, \
DT_INST_STRING_UPPER_TOKEN(n, data_rate)), \
.dataAlign = COND_CODE_1(DT_INST_PROP(n, hold_time_2x), \
(QSPI_IP_FLASH_DATA_ALIGN_2X_REFCLK), \
@ -115,7 +115,7 @@ uint8_t memc_nxp_s32_qspi_get_instance(const struct device *dev)
#define QSPI_DLL_CFG(n, side, side_upper) \
IF_ENABLED(FEATURE_QSPI_HAS_DLL, ( \
.dllSettings##side_upper = { \
.dllMode = CONCAT(QSPI_IP_DLL_, \
.dllMode = _CONCAT(QSPI_IP_DLL_, \
DT_INST_STRING_UPPER_TOKEN(n, side##_dll_mode)), \
.freqEnable = DT_INST_PROP(n, side##_dll_freq_enable), \
.coarseDelay = DT_INST_PROP(n, side##_dll_coarse_delay), \
@ -129,7 +129,7 @@ uint8_t memc_nxp_s32_qspi_get_instance(const struct device *dev)
))
#define QSPI_READ_MODE(n, side, side_upper) \
CONCAT(QSPI_IP_READ_MODE_, DT_INST_STRING_UPPER_TOKEN(n, side##_rx_clock_source))
_CONCAT(QSPI_IP_READ_MODE_, DT_INST_STRING_UPPER_TOKEN(n, side##_rx_clock_source))
#define QSPI_IDLE_SIGNAL_DRIVE(n, side, side_upper) \
IF_ENABLED(FEATURE_QSPI_CONFIGURABLE_ISD, ( \
@ -160,7 +160,7 @@ uint8_t memc_nxp_s32_qspi_get_instance(const struct device *dev)
BUILD_ASSERT(DT_INST_PROP_LEN(n, ahb_buffers_sizes) == QSPI_IP_AHB_BUFFERS, \
"ahb-buffers-sizes must be of size QSPI_IP_AHB_BUFFERS"); \
BUILD_ASSERT( \
CONCAT(FEATURE_QSPI_, DT_INST_STRING_UPPER_TOKEN(n, a_rx_clock_source)) == 1,\
_CONCAT(FEATURE_QSPI_, DT_INST_STRING_UPPER_TOKEN(n, a_rx_clock_source)) == 1,\
"a-rx-clock-source source mode selected is not supported"); \
\
static const Qspi_Ip_ControllerConfigType \

View file

@ -27,9 +27,9 @@ LOG_MODULE_REGISTER(wdt_nxp_fs26);
#define FS26_INIT_FS_TIMEOUT_MS 1000U
/* Helper macros to set register values from Kconfig options */
#define WD_ERR_LIMIT(x) CONCAT(WD_ERR_LIMIT_, x)
#define WD_RFR_LIMIT(x) CONCAT(WD_RFR_LIMIT_, x)
#define WDW_PERIOD(x) CONCAT(CONCAT(WDW_PERIOD_, x), MS)
#define WD_ERR_LIMIT(x) _CONCAT(WD_ERR_LIMIT_, x)
#define WD_RFR_LIMIT(x) _CONCAT(WD_RFR_LIMIT_, x)
#define WDW_PERIOD(x) _CONCAT(_CONCAT(WDW_PERIOD_, x), MS)
#define BAD_WD_REFRESH_ERROR_STRING(x) \
((((x) & BAD_WD_DATA) ? "error in the data" : \
@ -826,7 +826,7 @@ static const struct wdt_driver_api wdt_nxp_fs26_api = {
static const struct wdt_nxp_fs26_config wdt_nxp_fs26_config_##n = { \
.spi = SPI_DT_SPEC_INST_GET(n, \
SPI_OP_MODE_MASTER | SPI_MODE_CPHA | SPI_WORD_SET(32), 0), \
.wd_type = CONCAT(FS26_WD_, DT_INST_STRING_UPPER_TOKEN(n, type)), \
.wd_type = _CONCAT(FS26_WD_, DT_INST_STRING_UPPER_TOKEN(n, type)), \
.int_gpio = GPIO_DT_SPEC_INST_GET(n, int_gpios), \
}; \
\

View file

@ -241,7 +241,7 @@ extern void z_arm_irq_direct_dynamic_dispatch_no_reschedule(void);
*/
#define ARM_IRQ_DIRECT_DYNAMIC_CONNECT(irq_p, priority_p, flags_p, resch) \
IRQ_DIRECT_CONNECT(irq_p, priority_p, \
CONCAT(z_arm_irq_direct_dynamic_dispatch_, resch), flags_p)
_CONCAT(z_arm_irq_direct_dynamic_dispatch_, resch), flags_p)
#endif /* CONFIG_DYNAMIC_DIRECT_INTERRUPTS */