powerpc/cputable: Remove unnecessary copy of cpu_spec->oprofile_type
PATCH 1/1 powerpc/cputable: Remove unnecessary copy of cpu_spec->oprofile_type
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.
--- arch/powerpc/kernel/cputable.c | 1 - 1 file changed, 1 deletion(-)
arch/powerpc/kernel/cputable.c +0 -1
@@ -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; } }
Signature · 1 line
2.24.1
Quoted 7 lines · Leonardo Bras
Before checking for
cpu_type== NULL, this same copy happens, so doing it here will just write the same value to thet->oprofile_typeagain.Remove the repeated copy, as it is unnecessary.
Signed-off-by Leonardo Bras <[email protected]>
LGTM
Quoted 17 lines
--- arch/powerpc/kernel/cputable.c | 1 - 1 file changed, 1 deletion(-)arch/powerpc/kernel/cputable.c +0
-1@@ -2197,7 +2197,6 @@ static struct cpu_spec * __init setup_cpu_spec(unsignedlong offset, */ if (old.oprofile_cpu_type !=NULL ) { t->oprofile_cpu_type = old.oprofile_cpu_type; - t->oprofile_type = old.oprofile_type; } }
Quoted 5 lines · Michael Neuling
Quoted 4 lines · Leonardo Bras
Before checking for
cpu_type== NULL, this same copy happens, so doing it here will just write the same value to thet->oprofile_typeagain.
Quoted 8 lines
Quoted 3 lines
Remove the repeated copy, as it is unnecessary.
Signed-off-by Leonardo Bras <[email protected]>LGTM
Reviewed-by Michael Neuling <[email protected]>
Thanks!
Quoted 17 lines
Quoted 17 lines
--- arch/powerpc/kernel/cputable.c | 1 - 1 file changed, 1 deletion(-)arch/powerpc/kernel/cputable.c +0
-1@@ -2197,7 +2197,6 @@ static struct cpu_spec * __init setup_cpu_spec(unsignedlong offset, */ if (old.oprofile_cpu_type !=NULL ) { t->oprofile_cpu_type = old.oprofile_cpu_type; - t->oprofile_type = old.oprofile_type; } }
Le 15/02/2020 à 06:36, Leonardo Bras a écrit :
Quoted 16 lines
Before checking for
cpu_type== NULL, this same copy happens, so doing it here will just write the same value to thet->oprofile_typeagain.Remove the repeated copy, as it is unnecessary.
Signed-off-by Leonardo Bras <[email protected]>--- arch/powerpc/kernel/cputable.c | 1 - 1 file changed, 1 deletion(-)arch/powerpc/kernel/cputable.c +0
-0
arch/powerpc/kernel/cputable.c static struct cpu_spec * __init setup_cpu_spec(unsigned long offset, · line 2200
Quoted 5 lines
arch/powerpc/kernel/cputable.c +0
-1@@ -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
Hello Christophe, thank you for the feedback.
Quoted 8 lines · Christophe Leroy
arch/powerpc/kernel/cputable.c static struct cpu_spec * __init setup_cpu_spec(unsigned long offset, · line 2200
Quoted 4 lines
if (old.oprofile_cpu_type != NULL) { t->oprofile_cpu_type = old.oprofile_cpu_type;arch/powerpc/kernel/cputable.c +0
-1- t->oprofile_type = old.oprofile_type; }The action being reduced to a single line, the { } should be removed.
Christophe
I intentionally let it this way because I just reviewed a patch that will add more itens here, and should be merged before this one.
This will avoid conflicts.
Best regards,
Leonardo Bras
Quoted 7 lines · Leonardo Bras
Before checking for
cpu_type== NULL, this same copy happens, so doing it here will just write the same value to thet->oprofile_typeagain.Remove the repeated copy, as it is unnecessary.
Signed-off-by Leonardo Bras <[email protected]>
Series applied to powerpc next, thanks.
https://git.kernel.org/powerpc/c/41b8426fdb59218f56a6e3b3facd43a82816e3eb
cheers