[openwrt/openwrt] mtk-mmc: replace empty body macros
LEDE Commits
lede-commits at lists.infradead.org
Wed Jun 11 05:19:56 PDT 2025
hauke pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/92fec1ff24c526895dc954b69bef05dee5ff812a
commit 92fec1ff24c526895dc954b69bef05dee5ff812a
Author: Mieczyslaw Nalewaj <namiltd at yahoo.com>
AuthorDate: Sun May 18 11:30:18 2025 +0200
mtk-mmc: replace empty body macros
Replace macros with empty body with 'do {} while (0)'.
Remove unnecessary semicolons.
Fixes:
drivers/mmc/host/mtk-mmc/sd.c: In function 'msdc_irq':
drivers/mmc/host/mtk-mmc/sd.c:1969:87: error: suggest braces around empty body in an 'else' statement [-Werror=empty-body]
1969 | IRQ_MSG("XXX CMD<%d> MSDC_INT_RSPCRCERR", cmd->opcode);
| ^
drivers/mmc/host/mtk-mmc/sd.c:1975:84: error: suggest braces around empty body in an 'else' statement [-Werror=empty-body]
1975 | IRQ_MSG("XXX CMD<%d> MSDC_INT_CMDTMO", cmd->opcode);
| ^
cc1: all warnings being treated as errors
Signed-off-by: Mieczyslaw Nalewaj <namiltd at yahoo.com>
Link: https://github.com/openwrt/openwrt/pull/18654
Signed-off-by: Hauke Mehrtens <hauke at hauke-m.de>
---
target/linux/ramips/files/drivers/mmc/host/mtk-mmc/dbg.h | 12 ++++++------
1 file changed, 6 insertions(+), 6 deletions(-)
diff --git a/target/linux/ramips/files/drivers/mmc/host/mtk-mmc/dbg.h b/target/linux/ramips/files/drivers/mmc/host/mtk-mmc/dbg.h
index 5a25a69b00..146c467b99 100644
--- a/target/linux/ramips/files/drivers/mmc/host/mtk-mmc/dbg.h
+++ b/target/linux/ramips/files/drivers/mmc/host/mtk-mmc/dbg.h
@@ -108,7 +108,7 @@ do { \
} while (0)
#endif /* end of +++ */
-#define N_MSG(evt, fmt, args...)
+#define N_MSG(evt, fmt, args...) do {} while (0)
/*
do { \
if ((DBG_EVT_##evt) & sd_debug_zone[host->id]) { \
@@ -122,25 +122,25 @@ do { \
do { \
printk(KERN_ERR TAG"%d -> "fmt" <- %s() : L<%d> PID<%s><0x%x>\n", \
host->id, ##args, __FUNCTION__, __LINE__, current->comm, current->pid); \
-} while (0);
+} while (0)
#if 1
//defined CONFIG_MTK_MMC_CD_POLL
-#define INIT_MSG(fmt, args...)
-#define IRQ_MSG(fmt, args...)
+#define INIT_MSG(fmt, args...) do {} while (0)
+#define IRQ_MSG(fmt, args...) do {} while (0)
#else
#define INIT_MSG(fmt, args...) \
do { \
printk(KERN_ERR TAG"%d -> "fmt" <- %s() : L<%d> PID<%s><0x%x>\n", \
host->id, ##args, __FUNCTION__, __LINE__, current->comm, current->pid); \
-} while (0);
+} while (0)
/* PID in ISR in not corrent */
#define IRQ_MSG(fmt, args...) \
do { \
printk(KERN_ERR TAG"%d -> "fmt" <- %s() : L<%d>\n", \
host->id, ##args, __FUNCTION__, __LINE__); \
-} while (0);
+} while (0)
#endif
void msdc_debug_proc_init(void);
More information about the lede-commits
mailing list