[PATCH -next] memory: emif: Remove set but not used variables 'custom_configs' and 'cs1_used'
From: YueHaibing
Date: Mon May 27 2019 - 12:12:54 EST
Fixes gcc '-Wunused-but-set-variable' warning:
drivers/memory/emif.c: In function get_emif_reg_values:
drivers/memory/emif.c:1626:36: warning: variable custom_configs set but not used [-Wunused-but-set-variable]
drivers/memory/emif.c: In function get_emif_reg_values:
drivers/memory/emif.c:1618:9: warning: variable cs1_used set but not used [-Wunused-but-set-variable]
They are not used since introduction in commit
a93de288aad3 ("memory: emif: handle frequency and voltage change events")
Signed-off-by: YueHaibing <yuehaibing@xxxxxxxxxx>
---
drivers/memory/emif.c | 5 +----
1 file changed, 1 insertion(+), 4 deletions(-)
diff --git a/drivers/memory/emif.c b/drivers/memory/emif.c
index 2f214440008c..1b262bbd1d65 100644
--- a/drivers/memory/emif.c
+++ b/drivers/memory/emif.c
@@ -1615,7 +1615,7 @@ static void emif_shutdown(struct platform_device *pdev)
static int get_emif_reg_values(struct emif_data *emif, u32 freq,
struct emif_regs *regs)
{
- u32 cs1_used, ip_rev, phy_type;
+ u32 ip_rev, phy_type;
u32 cl, type;
const struct lpddr2_timings *timings;
const struct lpddr2_min_tck *min_tck;
@@ -1623,7 +1623,6 @@ static int get_emif_reg_values(struct emif_data *emif, u32 freq,
const struct lpddr2_addressing *addressing;
struct emif_data *emif_for_calc;
struct device *dev;
- const struct emif_custom_configs *custom_configs;
dev = emif->dev;
/*
@@ -1641,12 +1640,10 @@ static int get_emif_reg_values(struct emif_data *emif, u32 freq,
device_info = emif_for_calc->plat_data->device_info;
type = device_info->type;
- cs1_used = device_info->cs1_used;
ip_rev = emif_for_calc->plat_data->ip_rev;
phy_type = emif_for_calc->plat_data->phy_type;
min_tck = emif_for_calc->plat_data->min_tck;
- custom_configs = emif_for_calc->plat_data->custom_configs;
set_ddr_clk_period(freq);
--
2.17.1