[<prev] [next>] [day] [month] [year] [list]
Message-ID: <a96564ba2d5b643fdbca000f686f2843@208suo.com>
Date: Thu, 13 Jul 2023 20:48:29 +0800
From: huzhi001@...suo.com
To: tglx@...utronix.de, mingo@...hat.com, bp@...en8.de,
dave.hansen@...ux.intel.com, x86@...nel.org, seanjc@...gle.com,
pbonzini@...hat.com
Cc: hpa@...or.com, kvm@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: [PATCH] x86: Fix warnings in kvm_emulate.h
The following checkpatch warnings are removed:
WARNING: Prefer 'unsigned int' to bare use of 'unsigned'
WARNING: Prefer 'unsigned int' to bare use of 'unsigned'
WARNING: Prefer 'unsigned int' to bare use of 'unsigned'
WARNING: Prefer 'unsigned int' to bare use of 'unsigned'
WARNING: Prefer 'unsigned int' to bare use of 'unsigned'
WARNING: Prefer 'unsigned int' to bare use of 'unsigned'
WARNING: Prefer 'unsigned int' to bare use of 'unsigned'
WARNING: Prefer 'unsigned int' to bare use of 'unsigned'
Signed-off-by: ZhiHu <huzhi001@...suo.com>
---
arch/x86/kvm/kvm_emulate.h | 16 ++++++++--------
1 file changed, 8 insertions(+), 8 deletions(-)
diff --git a/arch/x86/kvm/kvm_emulate.h b/arch/x86/kvm/kvm_emulate.h
index ab65f3a47dfd..652020025457 100644
--- a/arch/x86/kvm/kvm_emulate.h
+++ b/arch/x86/kvm/kvm_emulate.h
@@ -95,14 +95,14 @@ struct x86_emulate_ops {
*
* @reg: gpr number.
*/
- ulong (*read_gpr)(struct x86_emulate_ctxt *ctxt, unsigned reg);
+ ulong (*read_gpr)(struct x86_emulate_ctxt *ctxt, unsigned int reg);
/*
* write_gpr: write a general purpose register (rax - r15)
*
* @reg: gpr number.
* @val: value to write.
*/
- void (*write_gpr)(struct x86_emulate_ctxt *ctxt, unsigned reg,
ulong val);
+ void (*write_gpr)(struct x86_emulate_ctxt *ctxt, unsigned int reg,
ulong val);
/*
* read_std: Read bytes of standard (non-emulated/special) memory.
* Used for descriptor reading.
@@ -240,10 +240,10 @@ struct operand {
unsigned long *reg;
struct segmented_address {
ulong ea;
- unsigned seg;
+ unsigned int seg;
} mem;
- unsigned xmm;
- unsigned mm;
+ unsigned int xmm;
+ unsigned int mm;
} addr;
union {
unsigned long val;
@@ -508,7 +508,7 @@ void emulator_invalidate_register_cache(struct
x86_emulate_ctxt *ctxt);
void emulator_writeback_register_cache(struct x86_emulate_ctxt *ctxt);
bool emulator_can_use_gpa(struct x86_emulate_ctxt *ctxt);
-static inline ulong reg_read(struct x86_emulate_ctxt *ctxt, unsigned
nr)
+static inline ulong reg_read(struct x86_emulate_ctxt *ctxt, unsigned
int nr)
{
if (KVM_EMULATOR_BUG_ON(nr >= NR_EMULATOR_GPRS, ctxt))
nr &= NR_EMULATOR_GPRS - 1;
@@ -520,7 +520,7 @@ static inline ulong reg_read(struct x86_emulate_ctxt
*ctxt, unsigned nr)
return ctxt->_regs[nr];
}
-static inline ulong *reg_write(struct x86_emulate_ctxt *ctxt, unsigned
nr)
+static inline ulong *reg_write(struct x86_emulate_ctxt *ctxt, unsigned
int nr)
{
if (KVM_EMULATOR_BUG_ON(nr >= NR_EMULATOR_GPRS, ctxt))
nr &= NR_EMULATOR_GPRS - 1;
@@ -533,7 +533,7 @@ static inline ulong *reg_write(struct
x86_emulate_ctxt *ctxt, unsigned nr)
return &ctxt->_regs[nr];
}
-static inline ulong *reg_rmw(struct x86_emulate_ctxt *ctxt, unsigned
nr)
+static inline ulong *reg_rmw(struct x86_emulate_ctxt *ctxt, unsigned
int nr)
{
reg_read(ctxt, nr);
return reg_write(ctxt, nr);
Powered by blists - more mailing lists