lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [day] [month] [year] [list]
Message-ID: <e8ed03d11ad8e485a316649b487c1bf4@208suo.com>
Date:   Wed, 12 Jul 2023 13:24:21 +0800
From:   shijie001@...suo.com
To:     tglx@...utronix.de, mingo@...hat.com, bp@...en8.de,
        dave.hansen@...ux.intel.com, x86@...nel.org
Cc:     hpa@...or.com, kvm@...r.kernel.org, linux-kernel@...r.kernel.org
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@...suo.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;

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ