Skip to contentSkip to conversation

KVM: x86/mmu: Make @tdp_mmu_allowed static

PATCH In review David Matlack 3 participants 5 messages Feb 13, 2023 – Feb 16, 2023

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 KVM: x86/mmu: Make @tdp_mmu_allowed static

Make @tdp_mmu_allowed static since it is only ever used within arch/x86/kvm/mmu/mmu.c.

---
 arch/x86/kvm/mmu/mmu.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
arch/x86/kvm/mmu/mmu.c +1 -1
index aeb240b339f5..adb9438be3ca 100644
@@ -100,7 +100,7 @@ module_param_named(flush_on_reuse, force_flush_and_sync_on_reuse, bool, 0644);
  */
 bool tdp_enabled = false;
 
-bool __ro_after_init tdp_mmu_allowed;
+static bool __ro_after_init tdp_mmu_allowed;
 
 #ifdef CONFIG_X86_64
 bool __read_mostly tdp_mmu_enabled = true;

base-commit: f15a87c006901e02727bf8ac75b0251cdf8e0ecc

Signature · 1 line
2.39.1.581.gbfd45094c4-goog
maintainer Reviewed-by on v1 1/1
#1 lore raw
Quoted 1 line · David Matlack

Make @tdp_mmu_allowed static since it is only ever used within

Doesn't "@" usually refer to function parameters?

Quoted 6 lines

arch/x86/kvm/mmu/mmu.c.

---

Fixes 3af15ff47c4d ("KVM: x86/mmu: Change tdp_mmu to a read-only parameter")

Paolo, want to grab this one directly for 6.3?

#2 lore raw
Quoted 5 lines · Sean Christopherson
Quoted 1 line · David Matlack

Make @tdp_mmu_allowed static since it is only ever used within

Doesn't "@" usually refer to function parameters?

Oh is that the convention? For some reason I assumed it was used when referring to any variable.

Quoted 12 lines
Quoted 7 lines

arch/x86/kvm/mmu/mmu.c.

---

Fixes 3af15ff47c4d ("KVM: x86/mmu: Change tdp_mmu to a read-only parameter")

Paolo, want to grab this one directly for 6.3?

#3 lore raw
Quoted 9 lines · David Matlack
Quoted 5 lines · Sean Christopherson
Quoted 1 line · David Matlack

Make @tdp_mmu_allowed static since it is only ever used within

Doesn't "@" usually refer to function parameters?

Oh is that the convention? For some reason I assumed it was used when referring to any variable.

Yes? My experience with it is entirely in the context of kernel-doc syntax, where it's used to document function params and struct field. Global symbols don't need additional reference because they are the focus of the comment/documentation.