From: André Draszik Date: Thu, 22 Feb 2018 10:50:29 +0000 (+0000) Subject: ramips: mt7620: eMMC: fix compiler warnings in non-debug mode X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=cd75d6f7b339b613abbf92091c1baf70238c5f7e;p=openwrt%2Fstaging%2Fneocturne.git 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 --- diff --git a/target/linux/ramips/patches-4.14/0046-mmc-MIPS-ralink-add-sdhci-for-mt7620a-SoC.patch b/target/linux/ramips/patches-4.14/0046-mmc-MIPS-ralink-add-sdhci-for-mt7620a-SoC.patch index 71871b7e51..0940daac48 100644 --- a/target/linux/ramips/patches-4.14/0046-mmc-MIPS-ralink-add-sdhci-for-mt7620a-SoC.patch +++ b/target/linux/ramips/patches-4.14/0046-mmc-MIPS-ralink-add-sdhci-for-mt7620a-SoC.patch @@ -247,7 +247,7 @@ Signed-off-by: John Crispin + --- /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 +#include "mt6575_sd.h" +#include + -+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 +}; + +#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 + --- /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 +#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 + 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); diff --git a/target/linux/ramips/patches-4.9/0046-mmc-MIPS-ralink-add-sdhci-for-mt7620a-SoC.patch b/target/linux/ramips/patches-4.9/0046-mmc-MIPS-ralink-add-sdhci-for-mt7620a-SoC.patch index 7275e33ac2..d2c8a0e084 100644 --- a/target/linux/ramips/patches-4.9/0046-mmc-MIPS-ralink-add-sdhci-for-mt7620a-SoC.patch +++ b/target/linux/ramips/patches-4.9/0046-mmc-MIPS-ralink-add-sdhci-for-mt7620a-SoC.patch @@ -248,7 +248,7 @@ Signed-off-by: John Crispin + --- /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 +#include "mt6575_sd.h" +#include + -+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 +}; + +#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 + --- /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 +#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 + 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);