mtd: spear_smi: remove set but not used variable 'flash_info'
authorzhengbin <zhengbin13@huawei.com>
Tue, 3 Sep 2019 02:52:29 +0000 (10:52 +0800)
committerMiquel Raynal <miquel.raynal@bootlin.com>
Tue, 8 Oct 2019 17:13:30 +0000 (19:13 +0200)
Fixes gcc '-Wunused-but-set-variable' warning:

drivers/mtd/devices/spear_smi.c: In function spear_smi_probe_config_dt:
drivers/mtd/devices/spear_smi.c:780:32: warning: variable flash_info set but not used [-Wunused-but-set-variable]

It is not used since commit 6551ab5d30d6 ("mtd:
add device-tree support to spear_smi")

Reported-by: Hulk Robot <hulkci@huawei.com>
Signed-off-by: zhengbin <zhengbin13@huawei.com>
Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
drivers/mtd/devices/spear_smi.c

index 7f6f6f1..3241477 100644 (file)
@@ -777,9 +777,6 @@ static int spear_smi_probe_config_dt(struct platform_device *pdev,
 
        /* Fill structs for each subnode (flash device) */
        while ((pp = of_get_next_child(np, pp))) {
-               struct spear_smi_flash_info *flash_info;
-
-               flash_info = &pdata->board_flash_info[i];
                pdata->np[i] = pp;
 
                /* Read base-addr and size from DT */