Thread (6 messages) flat view 6 messages, 4 authors, 2020-04-01

Re: [PATCH 1/1] powerpc/cputable: Remove unnecessary copy of cpu_spec->oprofile_type

From: Christophe Leroy <hidden>
Date: 2020-02-17 06:31:19
Also in: lkml


Le 15/02/2020 à 06:36, Leonardo Bras a écrit :
quoted hunk ↗ jump to hunk
Before checking for cpu_type == NULL, this same copy happens, so doing
it here will just write the same value to the t->oprofile_type
again.

Remove the repeated copy, as it is unnecessary.

Signed-off-by: Leonardo Bras <redacted>
---
  arch/powerpc/kernel/cputable.c | 1 -
  1 file changed, 1 deletion(-)
diff --git a/arch/powerpc/kernel/cputable.c b/arch/powerpc/kernel/cputable.c
index e745abc5457a..5a87ec96582f 100644
--- a/arch/powerpc/kernel/cputable.c
+++ b/arch/powerpc/kernel/cputable.c
@@ -2197,7 +2197,6 @@ static struct cpu_spec * __init setup_cpu_spec(unsigned long offset,
  		 */
  		if (old.oprofile_cpu_type != NULL) {
  			t->oprofile_cpu_type = old.oprofile_cpu_type;
-			t->oprofile_type = old.oprofile_type;
  		}
The action being reduced to a single line, the { } should be removed.

Christophe
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help