From: shijie001@208suo.com
To: tglx@linutronix.de, mingo@redhat.com, bp@alien8.de,
dave.hansen@linux.intel.com, x86@kernel.org
Cc: hpa@zytor.com, kvm@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: [PATCH] KVM: x86: Fix warnings in mtrr.c
Date: Wed, 12 Jul 2023 13:24:21 +0800 [thread overview]
Message-ID: <e8ed03d11ad8e485a316649b487c1bf4@208suo.com> (raw)
In-Reply-To: <tencent_62384F83F25EFE76B71058AF970646526108@qq.com>
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;
parent reply other threads:[~2023-07-12 5:24 UTC|newest]
Thread overview: expand[flat|nested] mbox.gz Atom feed
[parent not found: <tencent_62384F83F25EFE76B71058AF970646526108@qq.com>]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=e8ed03d11ad8e485a316649b487c1bf4@208suo.com \
--to=shijie001@208suo.com \
--cc=bp@alien8.de \
--cc=dave.hansen@linux.intel.com \
--cc=hpa@zytor.com \
--cc=kvm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@redhat.com \
--cc=tglx@linutronix.de \
--cc=x86@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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®