All of lore.kernel.org
 help / color / mirror / Atom feed
From: Wei Liu <wl@xen.org>
To: "Roger Pau Monné" <roger.pau@citrix.com>
Cc: Kevin Tian <kevin.tian@intel.com>,
	Jan Beulich <jbeulich@suse.com>, Wei Liu <wl@xen.org>,
	Andrew Cooper <andrew.cooper3@citrix.com>,
	George Dunlap <george.dunlap@citrix.com>,
	Jun Nakajima <jun.nakajima@intel.com>,
	xen-devel@lists.xenproject.org,
	Simran Singhal <singhalsimran0@gmail.com>
Subject: Re: [Xen-devel] [PATCH] xen/x86: Remove unnecessary cast on void pointer
Date: Sat, 28 Mar 2020 10:58:39 +0000	[thread overview]
Message-ID: <20200328105839.rf3igs2h7o7ujj7s@debian> (raw)
In-Reply-To: <20200328101840.GN28601@Air-de-Roger>

On Sat, Mar 28, 2020 at 11:18:40AM +0100, Roger Pau Monné wrote:
> Thanks!
> 
> On Sat, Mar 28, 2020 at 11:08:35AM +0530, Simran Singhal wrote:
> > diff --git a/xen/arch/x86/hvm/vmx/vvmx.c b/xen/arch/x86/hvm/vmx/vvmx.c
> > index f049920196..a53d3ca2a4 100644
> > --- a/xen/arch/x86/hvm/vmx/vvmx.c
> > +++ b/xen/arch/x86/hvm/vmx/vvmx.c
> > @@ -256,7 +256,7 @@ static int vvmcs_offset(u32 width, u32 type, u32 index)
> >  u64 get_vvmcs_virtual(void *vvmcs, u32 vmcs_encoding)
> >  {
> >      union vmcs_encoding enc;
> > -    u64 *content = (u64 *) vvmcs;
> > +    u64 *content = vvmcs;
> >      int offset;
> >      u64 res;
> >  
> > @@ -310,7 +310,7 @@ enum vmx_insn_errno get_vvmcs_real_safe(const struct vcpu *v, u32 encoding,
> >  void set_vvmcs_virtual(void *vvmcs, u32 vmcs_encoding, u64 val)
> >  {
> >      union vmcs_encoding enc;
> > -    u64 *content = (u64 *) vvmcs;
> > +    u64 *content = vvmcs;
> 
> While there, would you mind changing u64 to uint64_t? (here and
> above)
> 

To add some context to this comment: new code has been using uintX
variants. We want to migrate existing code gradually. Since you're
touching these lines anyway, it is a good chance to do the migration.

When you do this in your next version, please add a line in the commit
message saying something along the line that "Take the chance to change
some u64 to uint64_t".

Wei.


  reply	other threads:[~2020-03-28 10:59 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-03-28  5:38 [Xen-devel] [PATCH] xen/x86: Remove unnecessary cast on void pointer Simran Singhal
2020-03-28 10:18 ` Roger Pau Monné
2020-03-28 10:58   ` Wei Liu [this message]
2020-03-28 12:18     ` Simran Singhal
2020-03-28 12:17   ` Simran Singhal
2020-03-28 16:42     ` Wei Liu

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=20200328105839.rf3igs2h7o7ujj7s@debian \
    --to=wl@xen.org \
    --cc=andrew.cooper3@citrix.com \
    --cc=george.dunlap@citrix.com \
    --cc=jbeulich@suse.com \
    --cc=jun.nakajima@intel.com \
    --cc=kevin.tian@intel.com \
    --cc=roger.pau@citrix.com \
    --cc=singhalsimran0@gmail.com \
    --cc=xen-devel@lists.xenproject.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.