Skip to contentSkip to conversation

KVM: x86: Fix warnings in mtrr.c

PATCH New [email protected] 1 participant 1 message Jul 12, 2023 1 message not in the archive

Subsystems (3)
lore
Share & tools
lore

A message that is not in the archive (sent off-list or not yet received): [email protected]

#1 lore raw

PATCH 1/1 KVM: x86: Fix warnings in mtrr.c

The following checkpatch warnings are removed:
WARNING: Prefer 'unsigned int' to bare use of 'unsigned'
WARNING: Block comments should align the * on each line

---
 arch/x86/kvm/mtrr.c | 14 +++++++-------
 1 file changed, 7 insertions(+), 7 deletions(-)
arch/x86/kvm/mtrr.c +7 -7
index 3eb6e7f47e96..cda5f79f3f2e 100644
@@ -39,7 +39,7 @@ static struct kvm_mtrr_range *var_mtrr_msr_to_range(struct kvm_vcpu *vcpu,
     return &vcpu->arch.mtrr_state.var_ranges[index];
 }
 
-static bool msr_mtrr_valid(unsigned msr)
+static bool msr_mtrr_valid(unsigned int msr)
 {
     switch (msr) {
     case MTRRphysBase_MSR(0) ... MTRRphysMask_MSR(KVM_NR_VAR_MTRR - 1):
@@ -60,7 +60,7 @@ static bool msr_mtrr_valid(unsigned msr)
     return false;
 }
 
-static bool valid_mtrr_type(unsigned t)
+static bool valid_mtrr_type(unsigned int t)
 {
     return t < 8 && (1 << t) & 0x73; /* 0, 1, 4, 5, 6 */
 }
@@ -135,11 +135,11 @@ static u8 mtrr_disabled_type(struct kvm_vcpu *vcpu)
 }
 
 /*
-* Three terms are used in the following code:
-* - segment, it indicates the address segments covered by fixed MTRRs.
-* - unit, it corresponds to the MSR entry in the segment.
-* - range, a range is covered in one memory cache type.
-*/
+ * Three terms are used in the following code:
+ * - segment, it indicates the address segments covered by fixed MTRRs.
+ * - unit, it corresponds to the MSR entry in the segment.
+ * - range, a range is covered in one memory cache type.
+ */
 struct fixed_mtrr_segment {
     u64 start;
     u64 end;