Skip to contentSkip to conversation

powerpc/dt_cpu_ftrs: Make use of ISA_V3_* macros

PATCH Applied Murilo Opsfelder Araujo 2 participants 5 messages Jun 10, 2020 – Jun 26, 2020 PowerPC

lore
Share & tools
lore
#0 lore raw

cover powerpc/dt_cpu_ftrs: Make use of ISA_V3_* macros

The first patch removes unused macro ISA_V2_07B. The second and third patches make use of macros ISA_V3_0B and ISA_V3_1, respectively, instead their corresponding literals.

Murilo Opsfelder Araujo (3):
powerpc/dt_cpu_ftrs: Remove unused macro ISA_V2_07B powerpc/dt_cpu_ftrs: Make use of macro ISA_V3_0B powerpc/dt_cpu_ftrs: Make use of macro ISA_V3_1

 arch/powerpc/kernel/dt_cpu_ftrs.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

--
2.25.4

#1 lore raw

PATCH 1/3 powerpc/dt_cpu_ftrs: Remove unused macro ISA_V2_07B

Macro ISA_V2_07B is defined but not used anywhere else in the code.

---
 arch/powerpc/kernel/dt_cpu_ftrs.c | 1 -
 1 file changed, 1 deletion(-)
arch/powerpc/kernel/dt_cpu_ftrs.c +0 -1
index 3a409517c031..1b7da8b5ce0d 100644
@@ -24,7 +24,6 @@
 
 
 /* Device-tree visible constants follow */
-#define ISA_V2_07B      2070
 #define ISA_V3_0B       3000
 #define ISA_V3_1        3100
 
Signature · 1 line
2.25.4
#2 lore raw

PATCH 2/3 powerpc/dt_cpu_ftrs: Make use of macro ISA_V3_0B

In reply to Murilo Opsfelder Araujo

Macro ISA_V3_0B was defined but never used. Use it instead of literal.

---
 arch/powerpc/kernel/dt_cpu_ftrs.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
arch/powerpc/kernel/dt_cpu_ftrs.c +1 -1
index 1b7da8b5ce0d..9d6e833da2bd 100644
@@ -673,7 +673,7 @@ static void __init cpufeatures_setup_start(u32 isa)
 {
 	pr_info("setup for ISA %d\n", isa);
 
-	if (isa >= 3000) {
+	if (isa >= ISA_V3_0B) {
 		cur_cpu_spec->cpu_features |= CPU_FTR_ARCH_300;
 		cur_cpu_spec->cpu_user_features2 |= PPC_FEATURE2_ARCH_3_00;
 	}
Signature · 1 line
2.25.4
#3 lore raw

PATCH 3/3 powerpc/dt_cpu_ftrs: Make use of macro ISA_V3_1

In reply to Murilo Opsfelder Araujo

Macro ISA_V3_1 was defined but never used. Use it instead of literal.

---
 arch/powerpc/kernel/dt_cpu_ftrs.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
arch/powerpc/kernel/dt_cpu_ftrs.c +1 -1
index 9d6e833da2bd..a0edeb391e3e 100644
@@ -678,7 +678,7 @@ static void __init cpufeatures_setup_start(u32 isa)
 		cur_cpu_spec->cpu_user_features2 |= PPC_FEATURE2_ARCH_3_00;
 	}
 
-	if (isa >= 3100) {
+	if (isa >= ISA_V3_1) {
 		cur_cpu_spec->cpu_features |= CPU_FTR_ARCH_31;
 		cur_cpu_spec->cpu_user_features2 |= PPC_FEATURE2_ARCH_3_1;
 	}
Signature · 1 line
2.25.4
#4 lore raw
In reply to Murilo Opsfelder Araujo
Quoted 10 lines · Murilo Opsfelder Araujo

The first patch removes unused macro ISA_V2_07B. The second and third patches make use of macros ISA_V3_0B and ISA_V3_1, respectively, instead their corresponding literals.

Murilo Opsfelder Araujo (3):
powerpc/dt_cpu_ftrs: Remove unused macro ISA_V2_07B powerpc/dt_cpu_ftrs: Make use of macro ISA_V3_0B powerpc/dt_cpu_ftrs: Make use of macro ISA_V3_1

[...]

Applied to powerpc/next.

[1/3] powerpc/dt_cpu_ftrs: Remove unused macro ISA_V2_07B

      https://git.kernel.org/powerpc/c/f39eb5d8ac707fd59029a06c3f985f29b1aaa26b
[2/3] powerpc/dt_cpu_ftrs: Make use of macro ISA_V3_0B
      https://git.kernel.org/powerpc/c/e781f12a60a7bddb50909d42478cca8724c8b113
[3/3] powerpc/dt_cpu_ftrs: Make use of macro ISA_V3_1
      https://git.kernel.org/powerpc/c/7714394706c0309b3f3fc474b390463d60eb6cb1

cheers