lkml.org 
[lkml]   [2023]   [Jul]   [12]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
Subject[PATCH] 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

Signed-off-by: Jie Shi <shijie001@208suo.com>
---
arch/x86/kvm/mtrr.c | 14 +++++++-------
1 file changed, 7 insertions(+), 7 deletions(-)

diff --git a/arch/x86/kvm/mtrr.c b/arch/x86/kvm/mtrr.c
index 3eb6e7f47e96..cda5f79f3f2e 100644
--- a/arch/x86/kvm/mtrr.c
+++ b/arch/x86/kvm/mtrr.c
@@ -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;
\
 
 \ /
  Last update: 2023-07-12 07:25    [W:2.626 / U:0.004 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site