mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: huzhi001@208suo.com
To: tglx@linutronix.de, mingo@redhat.com, bp@alien8.de,
	dave.hansen@linux.intel.com, x86@kernel.org, seanjc@google.com,
	pbonzini@redhat.com
Cc: hpa@zytor.com, kvm@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: [PATCH] x86: Fix warnings in kvm_emulate.h
Date: Thu, 13 Jul 2023 20:48:29 +0800	[thread overview]
Message-ID: <a96564ba2d5b643fdbca000f686f2843@208suo.com> (raw)
In-Reply-To: <tencent_415AB86AA63A22065D7B022D94B2209BB707@qq.com>

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@208suo.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);

           reply	other threads:[~2023-07-13 13:01 UTC|newest]

Thread overview: expand[flat|nested]  mbox.gz  Atom feed
 [parent not found: <tencent_415AB86AA63A22065D7B022D94B2209BB707@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=a96564ba2d5b643fdbca000f686f2843@208suo.com \
    --to=huzhi001@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=pbonzini@redhat.com \
    --cc=seanjc@google.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®