From 5fa12073cb517becba593aecc7229fe02220ef29 Mon Sep 17 00:00:00 2001 From: Anas Nashif Date: Wed, 31 Mar 2021 14:39:38 -0400 Subject: [PATCH] drivers: remove what appears to be code from comments Some tools consider this as commented code because of the ifdef, so remove that and fix a coding guideline violation. Signed-off-by: Anas Nashif --- drivers/clock_control/clock_control_litex.c | 6 +++--- drivers/modem/quectel-bg9x.h | 2 +- include/toolchain/common.h | 2 +- samples/drivers/espi/src/main.c | 2 +- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/drivers/clock_control/clock_control_litex.c b/drivers/clock_control/clock_control_litex.c index 29978565aa..1c6891f428 100644 --- a/drivers/clock_control/clock_control_litex.c +++ b/drivers/clock_control/clock_control_litex.c @@ -476,7 +476,7 @@ static void litex_clk_print_all_params(void) litex_clk_print_params(&ldev->clkouts[c]); } } -#endif /* #ifdef CONFIG_CLOCK_CONTROL_LOG_LEVEL_DBG */ +#endif /* CONFIG_CLOCK_CONTROL_LOG_LEVEL_DBG */ /* Returns raw value ready to be written into MMCM */ static inline uint16_t litex_clk_calc_DI(uint16_t DO_val, uint16_t mask, @@ -1480,7 +1480,7 @@ int litex_clk_set_rate(struct litex_clk_clkout *lcko, unsigned long rate) #ifdef CONFIG_CLOCK_CONTROL_LOG_LEVEL_DBG litex_clk_print_all_params(); litex_clk_print_all_regs(); -#endif /* #ifdef CONFIG_CLOCK_CONTROL_LOG_LEVEL_DBG */ +#endif /* CONFIG_CLOCK_CONTROL_LOG_LEVEL_DBG */ return 0; } @@ -1769,7 +1769,7 @@ static int litex_clk_init(const struct device *dev) #ifdef CONFIG_CLOCK_CONTROL_LOG_LEVEL_DBG litex_clk_print_all_params(); litex_clk_print_all_regs(); -#endif /* #ifdef CONFIG_CLOCK_CONTROL_LOG_LEVEL_DBG */ +#endif /* CONFIG_CLOCK_CONTROL_LOG_LEVEL_DBG */ LOG_INF("LiteX Clock Control driver initialized"); return 0; diff --git a/drivers/modem/quectel-bg9x.h b/drivers/modem/quectel-bg9x.h index ed6624e4e7..545ca5b70a 100644 --- a/drivers/modem/quectel-bg9x.h +++ b/drivers/modem/quectel-bg9x.h @@ -147,4 +147,4 @@ static struct modem_pin modem_pins[] = { #endif }; -#endif /* #ifndef QUECTEL_BG9X_H */ +#endif /* QUECTEL_BG9X_H */ diff --git a/include/toolchain/common.h b/include/toolchain/common.h index 40b376617d..a7632ce1fa 100644 --- a/include/toolchain/common.h +++ b/include/toolchain/common.h @@ -137,7 +137,7 @@ #define __syscall static inline #else #define __syscall -#endif /* #ifndef ZTEST_UNITTEST */ +#endif /* ZTEST_UNITTEST */ /* Definitions for struct declaration tags. These are sentinel values used by * parse_syscalls.py to gather a list of names of struct declarations that diff --git a/samples/drivers/espi/src/main.c b/samples/drivers/espi/src/main.c index 61bcfda988..3e93d9403f 100644 --- a/samples/drivers/espi/src/main.c +++ b/samples/drivers/espi/src/main.c @@ -778,7 +778,7 @@ int espi_saf_test1(uint32_t spi_addr) return rc; } -#endif /* #ifdef CONFIG_ESPI_SAF */ +#endif /* CONFIG_ESPI_SAF */ static void host_warn_handler(uint32_t signal, uint32_t status) {