All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] mips: cacheinfo: Remove unnecessary increment of level
@ 2021-01-16  8:40 Souptick Joarder
  2021-01-18  1:54 ` Jiaxun Yang
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Souptick Joarder @ 2021-01-16  8:40 UTC (permalink / raw)
  To: tsbogend, jiaxun.yang, yangtiezhu
  Cc: linux-mips, linux-kernel, Souptick Joarder

kernel test robot throws below warning ->

arch/mips/kernel/cacheinfo.c:112:3: warning: Variable 'level' is
modified but its new value is never used. [unreadVariable]

Remove unnecessary increment of level at the end.

Reported-by: kernel test robot <lkp@intel.com>
Signed-off-by: Souptick Joarder <jrdr.linux@gmail.com>
---
 arch/mips/kernel/cacheinfo.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/arch/mips/kernel/cacheinfo.c b/arch/mips/kernel/cacheinfo.c
index 5f9d0eb..c858ae3 100644
--- a/arch/mips/kernel/cacheinfo.c
+++ b/arch/mips/kernel/cacheinfo.c
@@ -109,7 +109,6 @@ static int __populate_cache_leaves(unsigned int cpu)
 
 	if (c->tcache.waysize) {
 		populate_cache(tcache, this_leaf, level, CACHE_TYPE_UNIFIED);
-		level++;
 	}
 
 	this_cpu_ci->cpu_map_populated = true;
-- 
1.9.1


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH] mips: cacheinfo: Remove unnecessary increment of level
  2021-01-16  8:40 [PATCH] mips: cacheinfo: Remove unnecessary increment of level Souptick Joarder
@ 2021-01-18  1:54 ` Jiaxun Yang
  2021-01-18  8:40 ` Thomas Bogendoerfer
  2021-01-27 21:05 ` Thomas Bogendoerfer
  2 siblings, 0 replies; 4+ messages in thread
From: Jiaxun Yang @ 2021-01-18  1:54 UTC (permalink / raw)
  To: Souptick Joarder, tsbogend, yangtiezhu; +Cc: linux-mips, linux-kernel

在 2021/1/16 下午4:40, Souptick Joarder 写道:
> kernel test robot throws below warning ->
>
> arch/mips/kernel/cacheinfo.c:112:3: warning: Variable 'level' is
> modified but its new value is never used. [unreadVariable]
>
> Remove unnecessary increment of level at the end.
>
> Reported-by: kernel test robot <lkp@intel.com>
> Signed-off-by: Souptick Joarder <jrdr.linux@gmail.com>

Reviewed-by: Jiaxun Yang <jiaxun.yang@flygoat.com>

> ---
>   arch/mips/kernel/cacheinfo.c | 1 -
>   1 file changed, 1 deletion(-)
>
> diff --git a/arch/mips/kernel/cacheinfo.c b/arch/mips/kernel/cacheinfo.c
> index 5f9d0eb..c858ae3 100644
> --- a/arch/mips/kernel/cacheinfo.c
> +++ b/arch/mips/kernel/cacheinfo.c
> @@ -109,7 +109,6 @@ static int __populate_cache_leaves(unsigned int cpu)
>   
>   	if (c->tcache.waysize) {
>   		populate_cache(tcache, this_leaf, level, CACHE_TYPE_UNIFIED);
> -		level++;
>   	}
>   
>   	this_cpu_ci->cpu_map_populated = true;


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] mips: cacheinfo: Remove unnecessary increment of level
  2021-01-16  8:40 [PATCH] mips: cacheinfo: Remove unnecessary increment of level Souptick Joarder
  2021-01-18  1:54 ` Jiaxun Yang
@ 2021-01-18  8:40 ` Thomas Bogendoerfer
  2021-01-27 21:05 ` Thomas Bogendoerfer
  2 siblings, 0 replies; 4+ messages in thread
From: Thomas Bogendoerfer @ 2021-01-18  8:40 UTC (permalink / raw)
  To: Souptick Joarder; +Cc: jiaxun.yang, yangtiezhu, linux-mips, linux-kernel

On Sat, Jan 16, 2021 at 02:10:00PM +0530, Souptick Joarder wrote:
> kernel test robot throws below warning ->
> 
> arch/mips/kernel/cacheinfo.c:112:3: warning: Variable 'level' is
> modified but its new value is never used. [unreadVariable]
> 
> Remove unnecessary increment of level at the end.
> 
> Reported-by: kernel test robot <lkp@intel.com>
> Signed-off-by: Souptick Joarder <jrdr.linux@gmail.com>
> ---
>  arch/mips/kernel/cacheinfo.c | 1 -
>  1 file changed, 1 deletion(-)
> 
> diff --git a/arch/mips/kernel/cacheinfo.c b/arch/mips/kernel/cacheinfo.c
> index 5f9d0eb..c858ae3 100644
> --- a/arch/mips/kernel/cacheinfo.c
> +++ b/arch/mips/kernel/cacheinfo.c
> @@ -109,7 +109,6 @@ static int __populate_cache_leaves(unsigned int cpu)
>  
>  	if (c->tcache.waysize) {
>  		populate_cache(tcache, this_leaf, level, CACHE_TYPE_UNIFIED);
> -		level++;

please remove the no longer needed braces, too.

Thomas.

-- 
Crap can work. Given enough thrust pigs will fly, but it's not necessarily a
good idea.                                                [ RFC1925, 2.3 ]

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] mips: cacheinfo: Remove unnecessary increment of level
  2021-01-16  8:40 [PATCH] mips: cacheinfo: Remove unnecessary increment of level Souptick Joarder
  2021-01-18  1:54 ` Jiaxun Yang
  2021-01-18  8:40 ` Thomas Bogendoerfer
@ 2021-01-27 21:05 ` Thomas Bogendoerfer
  2 siblings, 0 replies; 4+ messages in thread
From: Thomas Bogendoerfer @ 2021-01-27 21:05 UTC (permalink / raw)
  To: Souptick Joarder; +Cc: jiaxun.yang, yangtiezhu, linux-mips, linux-kernel

On Sat, Jan 16, 2021 at 02:10:00PM +0530, Souptick Joarder wrote:
> kernel test robot throws below warning ->
> 
> arch/mips/kernel/cacheinfo.c:112:3: warning: Variable 'level' is
> modified but its new value is never used. [unreadVariable]
> 
> Remove unnecessary increment of level at the end.
> 
> Reported-by: kernel test robot <lkp@intel.com>
> Signed-off-by: Souptick Joarder <jrdr.linux@gmail.com>
> ---
>  arch/mips/kernel/cacheinfo.c | 1 -
>  1 file changed, 1 deletion(-)

applied to mips-next with braces removed.

Thomas.

-- 
Crap can work. Given enough thrust pigs will fly, but it's not necessarily a
good idea.                                                [ RFC1925, 2.3 ]

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2021-01-27 21:13 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-01-16  8:40 [PATCH] mips: cacheinfo: Remove unnecessary increment of level Souptick Joarder
2021-01-18  1:54 ` Jiaxun Yang
2021-01-18  8:40 ` Thomas Bogendoerfer
2021-01-27 21:05 ` Thomas Bogendoerfer

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.