[openwrt/openwrt] ramips: mtk-mcc: move cmd_buf for dbg under ifdef

LEDE Commits lede-commits at lists.infradead.org
Thu May 11 18:24:57 PDT 2023


ansuel pushed a commit to openwrt/openwrt.git, branch master:
https://git.openwrt.org/3fa87858a790008b145b6ef41e0476a36c256143

commit 3fa87858a790008b145b6ef41e0476a36c256143
Author: Christian Marangi <ansuelsmth at gmail.com>
AuthorDate: Sat May 6 23:16:13 2023 +0200

    ramips: mtk-mcc: move cmd_buf for dbg under ifdef
    
    Move cmd_buf for dbg under ifdef to fix compilation warning:
    drivers/mmc/host/mtk-mmc/dbg.c:51:13: error: 'cmd_buf' defined but not used [-Werror=unused-variable]
       51 | static char cmd_buf[256];
          |             ^~~~~~~
    cc1: all warnings being treated as errors
    
    Signed-off-by: Christian Marangi <ansuelsmth at gmail.com>
---
 target/linux/ramips/files/drivers/mmc/host/mtk-mmc/dbg.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/target/linux/ramips/files/drivers/mmc/host/mtk-mmc/dbg.c b/target/linux/ramips/files/drivers/mmc/host/mtk-mmc/dbg.c
index d897b12163..fc5f1e4985 100644
--- a/target/linux/ramips/files/drivers/mmc/host/mtk-mmc/dbg.c
+++ b/target/linux/ramips/files/drivers/mmc/host/mtk-mmc/dbg.c
@@ -48,8 +48,6 @@
 #include "mt6575_sd.h"
 #include <linux/seq_file.h>
 
-static char cmd_buf[256];
-
 /* for debug zone */
 unsigned int sd_debug_zone[4] = {
 	0,
@@ -59,6 +57,9 @@ unsigned int sd_debug_zone[4] = {
 };
 
 #if defined(MT6575_SD_DEBUG)
+
+static char cmd_buf[256];
+
 /* for driver profile */
 #define TICKS_ONE_MS  (13000)
 u32 gpt_enable;




More information about the lede-commits mailing list