Commit ddbfbcba authored by Krzysztof Kozlowski's avatar Krzysztof Kozlowski

memory: omap-gpmc: remove unused file-scope phys_base and mem_size

The file-scope variables phys_base and mem_size are assigned in
gpmc_probe() but never read.

This fixes build error when compile testing on x86_64 architecture:

    drivers/memory/omap-gpmc.c:246:24: error: conflicting types for ‘phys_base’
     static resource_size_t phys_base, mem_size;
    In file included from arch/x86/include/asm/page.h:12:0,
                     from arch/x86/include/asm/thread_info.h:12,
                     from include/linux/thread_info.h:38,
                     from arch/x86/include/asm/preempt.h:7,
                     from include/linux/preempt.h:78,
                     from include/linux/spinlock.h:51,
                     from include/linux/irq.h:14,
                     from drivers/memory/omap-gpmc.c:12:
    arch/x86/include/asm/page_64.h:12:22: note: previous declaration of ‘phys_base’ was here
     extern unsigned long phys_base;
Signed-off-by: default avatarKrzysztof Kozlowski <krzk@kernel.org>
Link: https://lore.kernel.org/r/20200724074038.5597-3-krzk@kernel.org
parent 8e9ffd5e
...@@ -243,7 +243,6 @@ static DEFINE_SPINLOCK(gpmc_mem_lock); ...@@ -243,7 +243,6 @@ static DEFINE_SPINLOCK(gpmc_mem_lock);
/* Define chip-selects as reserved by default until probe completes */ /* Define chip-selects as reserved by default until probe completes */
static unsigned int gpmc_cs_num = GPMC_CS_NUM; static unsigned int gpmc_cs_num = GPMC_CS_NUM;
static unsigned int gpmc_nr_waitpins; static unsigned int gpmc_nr_waitpins;
static resource_size_t phys_base, mem_size;
static unsigned int gpmc_capability; static unsigned int gpmc_capability;
static void __iomem *gpmc_base; static void __iomem *gpmc_base;
...@@ -2349,9 +2348,6 @@ static int gpmc_probe(struct platform_device *pdev) ...@@ -2349,9 +2348,6 @@ static int gpmc_probe(struct platform_device *pdev)
if (res == NULL) if (res == NULL)
return -ENOENT; return -ENOENT;
phys_base = res->start;
mem_size = resource_size(res);
gpmc_base = devm_ioremap_resource(&pdev->dev, res); gpmc_base = devm_ioremap_resource(&pdev->dev, res);
if (IS_ERR(gpmc_base)) if (IS_ERR(gpmc_base))
return PTR_ERR(gpmc_base); return PTR_ERR(gpmc_base);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment