mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] KVM: x86: Fix warnings in mtrr.c
       [not found] <tencent_62384F83F25EFE76B71058AF970646526108@qq.com>
@ 2023-07-12  5:24 ` shijie001
  0 siblings, 0 replies; only message in thread
From: shijie001 @ 2023-07-12  5:24 UTC (permalink / raw)
  To: tglx, mingo, bp, dave.hansen, x86; +Cc: hpa, kvm, linux-kernel

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;

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2023-07-12  5:24 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <tencent_62384F83F25EFE76B71058AF970646526108@qq.com>
2023-07-12  5:24 ` [PATCH] KVM: x86: Fix warnings in mtrr.c shijie001

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®