ramips: mtk-mcc: move cmd_buf for dbg under ifdef
authorChristian Marangi <ansuelsmth@gmail.com>
Sat, 6 May 2023 21:16:13 +0000 (23:16 +0200)
committerChristian Marangi <ansuelsmth@gmail.com>
Fri, 12 May 2023 01:15:38 +0000 (03:15 +0200)
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@gmail.com>
target/linux/ramips/files/drivers/mmc/host/mtk-mmc/dbg.c

index d897b1216348833af136d44c36309a8c308f7495..fc5f1e4985a348f5b12d0229d85f6341afd456d6 100644 (file)
@@ -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;