Skip to contentSkip to conversation

cpu/SMT: Fix cpu_smt_possible() comment

PATCH Superseded Zhang Rui 3 participants 4 messages Jul 10, 2023 – Jul 28, 2023 CPU hotplug

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore

Zhang Rui

author
#0 lore raw

PATCH 1/1 cpu/SMT: Fix cpu_smt_possible() comment

The comment of cpu_smt_possible() is not aligned with the changelog of commit e1572f1d08be ("cpu/SMT: create and export cpu_smt_possible()"), and it is wrong.

Fix cpu_smt_possible() comment.

---
 kernel/cpu.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
kernel/cpu.c +1 -1
index 7e8f1b044772..f6811c857102 100644
@@ -676,7 +676,7 @@ static inline bool cpu_smt_allowed(unsigned int cpu)
 	return !cpumask_test_cpu(cpu, &cpus_booted_once_mask);
 }
 
-/* Returns true if SMT is not supported of forcefully (irreversibly) disabled */
+/* Returns true if SMT is supported and not forcefully (irreversibly) disabled */
 bool cpu_smt_possible(void)
 {
 	return cpu_smt_control != CPU_SMT_FORCE_DISABLED &&
Signature · 1 line
2.34.1
Reviewed-by on v1 1/1
#1 lore raw
Quoted 16 lines · Zhang Rui

The comment of cpu_smt_possible() is not aligned with the changelog of commit e1572f1d08be ("cpu/SMT: create and export cpu_smt_possible()"), and it is wrong.

Fix cpu_smt_possible() comment.

---
 kernel/cpu.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
kernel/cpu.c +0 -0
index 7e8f1b044772..f6811c857102 100644

kernel/cpu.c static inline bool cpu_smt_allowed(unsigned int cpu) · line 682

Quoted 8 lines
kernel/cpu.c +1 -1
@@ -676,7 +676,7 @@ static inline bool cpu_smt_allowed(unsigned int cpu)
 	return !cpumask_test_cpu(cpu, &cpus_booted_once_mask);
 }
 
-/* Returns true if SMT is not supported of forcefully (irreversibly) disabled */
+/* Returns true if SMT is supported and not forcefully (irreversibly) disabled */
 bool cpu_smt_possible(void)
 {
 	return cpu_smt_control != CPU_SMT_FORCE_DISABLED &&

The function must've had a different name in an earlier version of the patch...

Thanks for catching this!

Signature · 1 line
Vitaly
#2 lore raw
In reply to Zhang Rui
Quoted 3 lines · Zhang Rui

The comment of cpu_smt_possible() is not aligned with the changelog of commit e1572f1d08be ("cpu/SMT: create and export cpu_smt_possible()"), and it is wrong.

Why? Do I need to go and read that commit log and figure out what's wrong?

Quoted 1 line

Fix cpu_smt_possible() comment.

Zero information.

author
#3 lore raw

Hi, Thomas,

Quoted 7 lines · Thomas Gleixner
Quoted 5 lines · Zhang Rui

The comment of cpu_smt_possible() is not aligned with the changelog of
commit e1572f1d08be ("cpu/SMT: create and export cpu_smt_possible()"),
and it is wrong.

Quoted 7 lines

Why? Do I need to go and read that commit log and figure out what's wrong?

Quoted 1 line

Fix cpu_smt_possible() comment.

Zero information.

Thanks for reviewing. Sent patch V2 with changelog rephrased.

thanks,
rui