diff mbox series

nds32/setup: remove unused memblock_region variable in setup_memory()

Message ID 20210712125218.28951-1-rppt@kernel.org (mailing list archive)
State New
Headers show
Series nds32/setup: remove unused memblock_region variable in setup_memory() | expand

Commit Message

Mike Rapoport July 12, 2021, 12:52 p.m. UTC
From: Mike Rapoport <rppt@linux.ibm.com>

kernel test robot reports unused variable warning:

cppcheck possible warnings: (new ones prefixed by >>, may not real
problems)

>> arch/nds32/kernel/setup.c:247:26: warning: Unused variable: region
>> [unusedVariable]
    struct memblock_region *region;
                            ^

Remove the unused variable.

Reported-by: kernel test robot <lkp@intel.com>
Signed-off-by: Mike Rapoport <rppt@linux.ibm.com>
---
 arch/nds32/kernel/setup.c | 1 -
 1 file changed, 1 deletion(-)


base-commit: e73f0f0ee7541171d89f2e2491130c7771ba58d3

Comments

Guenter Roeck Sept. 8, 2021, 3:20 p.m. UTC | #1
On Mon, Jul 12, 2021 at 03:52:18PM +0300, Mike Rapoport wrote:
> From: Mike Rapoport <rppt@linux.ibm.com>
> 
> kernel test robot reports unused variable warning:
> 
> cppcheck possible warnings: (new ones prefixed by >>, may not real
> problems)
> 
> >> arch/nds32/kernel/setup.c:247:26: warning: Unused variable: region
> >> [unusedVariable]
>     struct memblock_region *region;
>                             ^
> 
> Remove the unused variable.
> 
> Reported-by: kernel test robot <lkp@intel.com>
> Signed-off-by: Mike Rapoport <rppt@linux.ibm.com>

Reviewed-by: Guenter Roeck <linux@roeck-us.net>
Tested-by: Guenter Roeck <linux@roeck-us.net>

This is now fatal.

arch/nds32/kernel/setup.c: In function 'setup_memory':
arch/nds32/kernel/setup.c:247:26: error: unused variable 'region'

Anyone care to apply it ?

Guenter

> ---
>  arch/nds32/kernel/setup.c | 1 -
>  1 file changed, 1 deletion(-)
> 
> diff --git a/arch/nds32/kernel/setup.c b/arch/nds32/kernel/setup.c
> index 41725eaf8bac..b3d34d646652 100644
> --- a/arch/nds32/kernel/setup.c
> +++ b/arch/nds32/kernel/setup.c
> @@ -244,7 +244,6 @@ static void __init setup_memory(void)
>  	unsigned long ram_start_pfn;
>  	unsigned long free_ram_start_pfn;
>  	phys_addr_t memory_start, memory_end;
> -	struct memblock_region *region;
>  
>  	memory_end = memory_start = 0;
>  
> 
> base-commit: e73f0f0ee7541171d89f2e2491130c7771ba58d3
> -- 
> 2.28.0
>
diff mbox series

Patch

diff --git a/arch/nds32/kernel/setup.c b/arch/nds32/kernel/setup.c
index 41725eaf8bac..b3d34d646652 100644
--- a/arch/nds32/kernel/setup.c
+++ b/arch/nds32/kernel/setup.c
@@ -244,7 +244,6 @@  static void __init setup_memory(void)
 	unsigned long ram_start_pfn;
 	unsigned long free_ram_start_pfn;
 	phys_addr_t memory_start, memory_end;
-	struct memblock_region *region;
 
 	memory_end = memory_start = 0;