ramips: mt7620: eMMC: fix compiler warnings in non-debug mode

drivers/mmc/host/mtk-mmc/dbg.c:51:13: warning: 'cmd_buf' defined but not used [-Wunused-variable]
 static char cmd_buf[256];
             ^~~~~~~

In addition, msdc_reg[] is completely unused, even in debug
mode.

Signed-off-by: André Draszik <git@andred.net>
This commit is contained in:
André Draszik 2018-02-22 10:50:29 +00:00 committed by Mathias Kresin
parent 584b2a26f5
commit cd75d6f7b3
2 changed files with 26 additions and 40 deletions

View file

@ -247,7 +247,7 @@ Signed-off-by: John Crispin <blogic@openwrt.org>
+
--- /dev/null
+++ b/drivers/mmc/host/mtk-mmc/dbg.c
@@ -0,0 +1,347 @@
@@ -0,0 +1,348 @@
+/* Copyright Statement:
+ *
+ * This software/firmware and related documentation ("MediaTek Software") are
@ -298,16 +298,6 @@ Signed-off-by: John Crispin <blogic@openwrt.org>
+#include "mt6575_sd.h"
+#include <linux/seq_file.h>
+
+static char cmd_buf[256];
+
+/* for debug zone */
+unsigned int sd_debug_zone[4]={
+ 0,
+ 0,
+ 0,
+ 0
+};
+
+/* mode select */
+u32 dma_size[4]={
+ 512,
@ -323,6 +313,17 @@ Signed-off-by: John Crispin <blogic@openwrt.org>
+};
+
+#if defined (MT6575_SD_DEBUG)
+static char cmd_buf[256];
+
+/* for debug zone */
+static unsigned int sd_debug_zone[4]={
+ 0,
+ 0,
+ 0,
+ 0
+};
+
+
+/* for driver profile */
+#define TICKS_ONE_MS (13000)
+u32 gpt_enable = 0;
@ -1761,7 +1762,7 @@ Signed-off-by: John Crispin <blogic@openwrt.org>
+
--- /dev/null
+++ b/drivers/mmc/host/mtk-mmc/sd.c
@@ -0,0 +1,3065 @@
@@ -0,0 +1,3057 @@
+/* Copyright Statement:
+ *
+ * This software/firmware and related documentation ("MediaTek Software") are
@ -1914,10 +1915,6 @@ Signed-off-by: John Crispin <blogic@openwrt.org>
+#define MAX_SGMT_SZ (MAX_DMA_CNT)
+#define MAX_REQ_SZ (MAX_SGMT_SZ * 8)
+
+#ifdef MT6575_SD_DEBUG
+static struct msdc_regs *msdc_reg[HOST_MAX_NUM];
+#endif
+
+static int mtk_sw_poll;
+
+static int cd_active_low = 1;
@ -4359,10 +4356,6 @@ Signed-off-by: John Crispin <blogic@openwrt.org>
+ u32 base = host->base;
+ struct msdc_hw *hw = host->hw;
+
+#ifdef MT6575_SD_DEBUG
+ msdc_reg[host->id] = (struct msdc_regs *)host->base;
+#endif
+
+ /* Power on */
+#if 0 /* --- by chhung */
+ msdc_vcore_on(host);

View file

@ -248,7 +248,7 @@ Signed-off-by: John Crispin <blogic@openwrt.org>
+
--- /dev/null
+++ b/drivers/mmc/host/mtk-mmc/dbg.c
@@ -0,0 +1,347 @@
@@ -0,0 +1,348 @@
+/* Copyright Statement:
+ *
+ * This software/firmware and related documentation ("MediaTek Software") are
@ -299,16 +299,6 @@ Signed-off-by: John Crispin <blogic@openwrt.org>
+#include "mt6575_sd.h"
+#include <linux/seq_file.h>
+
+static char cmd_buf[256];
+
+/* for debug zone */
+unsigned int sd_debug_zone[4]={
+ 0,
+ 0,
+ 0,
+ 0
+};
+
+/* mode select */
+u32 dma_size[4]={
+ 512,
@ -324,6 +314,17 @@ Signed-off-by: John Crispin <blogic@openwrt.org>
+};
+
+#if defined (MT6575_SD_DEBUG)
+static char cmd_buf[256];
+
+/* for debug zone */
+static unsigned int sd_debug_zone[4]={
+ 0,
+ 0,
+ 0,
+ 0
+};
+
+
+/* for driver profile */
+#define TICKS_ONE_MS (13000)
+u32 gpt_enable = 0;
@ -1761,7 +1762,7 @@ Signed-off-by: John Crispin <blogic@openwrt.org>
+
--- /dev/null
+++ b/drivers/mmc/host/mtk-mmc/sd.c
@@ -0,0 +1,3065 @@
@@ -0,0 +1,3057 @@
+/* Copyright Statement:
+ *
+ * This software/firmware and related documentation ("MediaTek Software") are
@ -1914,10 +1915,6 @@ Signed-off-by: John Crispin <blogic@openwrt.org>
+#define MAX_SGMT_SZ (MAX_DMA_CNT)
+#define MAX_REQ_SZ (MAX_SGMT_SZ * 8)
+
+#ifdef MT6575_SD_DEBUG
+static struct msdc_regs *msdc_reg[HOST_MAX_NUM];
+#endif
+
+static int mtk_sw_poll;
+
+static int cd_active_low = 1;
@ -4359,10 +4356,6 @@ Signed-off-by: John Crispin <blogic@openwrt.org>
+ u32 base = host->base;
+ struct msdc_hw *hw = host->hw;
+
+#ifdef MT6575_SD_DEBUG
+ msdc_reg[host->id] = (struct msdc_regs *)host->base;
+#endif
+
+ /* Power on */
+#if 0 /* --- by chhung */
+ msdc_vcore_on(host);