[openwrt/openwrt] ramips: mt7620: eMMC: fix compiler warnings in non-debug mode

LEDE Commits lede-commits at lists.infradead.org
Wed Apr 4 00:16:31 PDT 2018


mkresin pushed a commit to openwrt/openwrt.git, branch master:
https://git.lede-project.org/cd75d6f7b339b613abbf92091c1baf70238c5f7e

commit cd75d6f7b339b613abbf92091c1baf70238c5f7e
Author: André Draszik <git at andred.net>
AuthorDate: Thu Feb 22 10:50:29 2018 +0000

    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 at andred.net>
---
 ...mmc-MIPS-ralink-add-sdhci-for-mt7620a-SoC.patch | 33 +++++++++-------------
 ...mmc-MIPS-ralink-add-sdhci-for-mt7620a-SoC.patch | 33 +++++++++-------------
 2 files changed, 26 insertions(+), 40 deletions(-)

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 71871b7..0940daa 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 <blogic at 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 at 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 at 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 at 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 at 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 at 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);
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 7275e33..d2c8a0e 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 <blogic at 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 at 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 at 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 at 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 at 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 at 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);



More information about the lede-commits mailing list