[openwrt/openwrt] ramips: mt7620: eMMC: remove unused variable

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


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

commit 584b2a26f5a9e1ffcd93ce8c7a96d7bdfc664f25
Author: André Draszik <git at andred.net>
AuthorDate: Thu Feb 22 10:21:51 2018 +0000

    ramips: mt7620: eMMC: remove unused variable
    
    msdc_6575_host[] is unused, just remove it. Also, it
    was the source of memory corruption up until the
    previous fix to this driver.
    
    Signed-off-by: André Draszik <git at andred.net>
---
 .../0046-mmc-MIPS-ralink-add-sdhci-for-mt7620a-SoC.patch             | 5 +----
 .../patches-4.9/0046-mmc-MIPS-ralink-add-sdhci-for-mt7620a-SoC.patch | 5 +----
 2 files changed, 2 insertions(+), 8 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 ef162d7..71871b7 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
@@ -1761,7 +1761,7 @@ Signed-off-by: John Crispin <blogic at openwrt.org>
 +
 --- /dev/null
 +++ b/drivers/mmc/host/mtk-mmc/sd.c
-@@ -0,0 +1,3068 @@
+@@ -0,0 +1,3065 @@
 +/* Copyright Statement:
 + *
 + * This software/firmware and related documentation ("MediaTek Software") are
@@ -1928,7 +1928,6 @@ Signed-off-by: John Crispin <blogic at openwrt.org>
 +//#define PERI_MSDC2_PDN    (17)
 +//#define PERI_MSDC3_PDN    (18)
 +
-+struct msdc_host *msdc_6575_host[] = {NULL,NULL,NULL,NULL};
 +#if 0 /* --- by chhung */
 +/* gate means clock power down */
 +static int g_clk_gate = 0; 
@@ -4602,8 +4601,6 @@ Signed-off-by: John Crispin <blogic at openwrt.org>
 +    host->dma.bd =  dma_alloc_coherent(NULL, MAX_BD_NUM  * sizeof(bd_t),  &host->dma.bd_addr,  GFP_KERNEL); 
 +    BUG_ON((!host->dma.gpd) || (!host->dma.bd));    
 +    msdc_init_gpd_bd(host, &host->dma);
-+    /*for emmc*/
-+    msdc_6575_host[pdev->id] = host;
 +    
 +#if 0
 +    tasklet_init(&host->card_tasklet, msdc_tasklet_card, (ulong)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 da3c077..7275e33 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
@@ -1761,7 +1761,7 @@ Signed-off-by: John Crispin <blogic at openwrt.org>
 +
 --- /dev/null
 +++ b/drivers/mmc/host/mtk-mmc/sd.c
-@@ -0,0 +1,3068 @@
+@@ -0,0 +1,3065 @@
 +/* Copyright Statement:
 + *
 + * This software/firmware and related documentation ("MediaTek Software") are
@@ -1928,7 +1928,6 @@ Signed-off-by: John Crispin <blogic at openwrt.org>
 +//#define PERI_MSDC2_PDN    (17)
 +//#define PERI_MSDC3_PDN    (18)
 +
-+struct msdc_host *msdc_6575_host[] = {NULL,NULL,NULL,NULL};
 +#if 0 /* --- by chhung */
 +/* gate means clock power down */
 +static int g_clk_gate = 0; 
@@ -4602,8 +4601,6 @@ Signed-off-by: John Crispin <blogic at openwrt.org>
 +    host->dma.bd =  dma_alloc_coherent(NULL, MAX_BD_NUM  * sizeof(bd_t),  &host->dma.bd_addr,  GFP_KERNEL); 
 +    BUG_ON((!host->dma.gpd) || (!host->dma.bd));    
 +    msdc_init_gpd_bd(host, &host->dma);
-+    /*for emmc*/
-+    msdc_6575_host[pdev->id] = host;
 +    
 +#if 0
 +    tasklet_init(&host->card_tasklet, msdc_tasklet_card, (ulong)host);



More information about the lede-commits mailing list