[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <YJhRWQEy2Cpd1sKy@antec>
Date: Mon, 10 May 2021 06:17:13 +0900
From: Stafford Horne <shorne@...il.com>
To: Mike Rapoport <rppt@...nel.org>
Cc: Jonas Bonn <jonas@...thpole.se>,
Stefan Kristiansson <stefan.kristiansson@...nalahti.fi>,
Mike Rapoport <rppt@...ux.ibm.com>,
openrisc@...ts.librecores.org, linux-kernel@...r.kernel.org,
kernel test robot <lkp@...el.com>
Subject: Re: [PATCH 1/2] openrisc: mm/init.c: remove unused memblock_region
variable in map_ram()
On Sun, May 09, 2021 at 12:11:02PM +0300, Mike Rapoport wrote:
> From: Mike Rapoport <rppt@...ux.ibm.com>
>
> Kernel test robot reports:
>
> cppcheck possible warnings: (new ones prefixed by >>, may not real problems)
>
> >> arch/openrisc/mm/init.c:125:10: warning: Uninitialized variable: region [uninitvar]
> region->base, region->base + region->size);
> ^
>
> Replace usage of memblock_region fields with 'start' and 'end' variables
> that are initialized in for_each_mem_range() and remove the declaration of
> region.
>
> Fixes: b10d6bca8720 ("arch, drivers: replace for_each_membock() with for_each_mem_range()")
> Reported-by: kernel test robot <lkp@...el.com>
> Signed-off-by: Mike Rapoport <rppt@...ux.ibm.com>
> ---
> arch/openrisc/mm/init.c | 3 +--
> 1 file changed, 1 insertion(+), 2 deletions(-)
>
> diff --git a/arch/openrisc/mm/init.c b/arch/openrisc/mm/init.c
> index bf9b2310fc93..f3fa02b8838a 100644
> --- a/arch/openrisc/mm/init.c
> +++ b/arch/openrisc/mm/init.c
> @@ -75,7 +75,6 @@ static void __init map_ram(void)
> /* These mark extents of read-only kernel pages...
> * ...from vmlinux.lds.S
> */
> - struct memblock_region *region;
>
> v = PAGE_OFFSET;
>
> @@ -121,7 +120,7 @@ static void __init map_ram(void)
> }
>
> printk(KERN_INFO "%s: Memory: 0x%x-0x%x\n", __func__,
> - region->base, region->base + region->size);
> + start, end);
> }
> }
Thanks I will queue this.
-Stafford
Powered by blists - more mailing lists