2021-06-02 18:58:02

by Souptick Joarder

[permalink] [raw]
Subject: [PATCH] h8300: Remove unused variable

Kernel test robot throws below warning ->

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

Fixed it by removing unused variable.

Reported-by: kernel test robot <[email protected]>
Signed-off-by: Souptick Joarder <[email protected]>
---
arch/h8300/kernel/setup.c | 2 --
1 file changed, 2 deletions(-)

diff --git a/arch/h8300/kernel/setup.c b/arch/h8300/kernel/setup.c
index 15280af7251c..5745a763dc78 100644
--- a/arch/h8300/kernel/setup.c
+++ b/arch/h8300/kernel/setup.c
@@ -69,8 +69,6 @@ void __init h8300_fdt_init(void *fdt, char *bootargs)

static void __init bootmem_init(void)
{
- struct memblock_region *region;
-
memory_end = memory_start = 0;

/* Find main memory where is the kernel */
--
2.25.1


2021-06-02 19:06:41

by Mike Rapoport

[permalink] [raw]
Subject: Re: [PATCH] h8300: Remove unused variable

On Thu, Jun 03, 2021 at 12:24:31AM +0530, Souptick Joarder wrote:
> Kernel test robot throws below warning ->
>
> >> arch/h8300/kernel/setup.c:72:26:
> warning: Unused variable: region [unusedVariable]
> struct memblock_region *region;
>
> Fixed it by removing unused variable.
>
> Reported-by: kernel test robot <[email protected]>
> Signed-off-by: Souptick Joarder <[email protected]>

I believe a Fixes: tag would be appropriate here. Otherwise

Acked-by: Mike Rapoport <[email protected]>

> ---
> arch/h8300/kernel/setup.c | 2 --
> 1 file changed, 2 deletions(-)
>
> diff --git a/arch/h8300/kernel/setup.c b/arch/h8300/kernel/setup.c
> index 15280af7251c..5745a763dc78 100644
> --- a/arch/h8300/kernel/setup.c
> +++ b/arch/h8300/kernel/setup.c
> @@ -69,8 +69,6 @@ void __init h8300_fdt_init(void *fdt, char *bootargs)
>
> static void __init bootmem_init(void)
> {
> - struct memblock_region *region;
> -
> memory_end = memory_start = 0;
>
> /* Find main memory where is the kernel */
> --
> 2.25.1
>

--
Sincerely yours,
Mike.

2021-06-06 14:29:57

by Yoshinori Sato

[permalink] [raw]
Subject: Re: [PATCH] h8300: Remove unused variable

On Thu, 03 Jun 2021 03:54:31 +0900,
Souptick Joarder wrote:
>
> Kernel test robot throws below warning ->
>
> >> arch/h8300/kernel/setup.c:72:26:
> warning: Unused variable: region [unusedVariable]
> struct memblock_region *region;
>
> Fixed it by removing unused variable.
>
> Reported-by: kernel test robot <[email protected]>
> Signed-off-by: Souptick Joarder <[email protected]>
> ---
> arch/h8300/kernel/setup.c | 2 --
> 1 file changed, 2 deletions(-)
>
> diff --git a/arch/h8300/kernel/setup.c b/arch/h8300/kernel/setup.c
> index 15280af7251c..5745a763dc78 100644
> --- a/arch/h8300/kernel/setup.c
> +++ b/arch/h8300/kernel/setup.c
> @@ -69,8 +69,6 @@ void __init h8300_fdt_init(void *fdt, char *bootargs)
>
> static void __init bootmem_init(void)
> {
> - struct memblock_region *region;
> -
> memory_end = memory_start = 0;
>
> /* Find main memory where is the kernel */
> --
> 2.25.1
>

Acked-by: Yoshinori Sato <[email protected]>

--
Yoshinori Sato