From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.0 required=3.0 tests=DKIM_INVALID,DKIM_SIGNED, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS,USER_AGENT_SANE_1 autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 43126C43331 for ; Sat, 28 Mar 2020 10:59:31 +0000 (UTC) Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id DAEBD20716 for ; Sat, 28 Mar 2020 10:59:30 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (1024-bit key) header.d=xen.org header.i=@xen.org header.b="Gjw41TjC" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org DAEBD20716 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=xen.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=xen-devel-bounces@lists.xenproject.org Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.89) (envelope-from ) id 1jI9BJ-0005Rg-Pk; Sat, 28 Mar 2020 10:59:13 +0000 Received: from all-amaz-eas1.inumbo.com ([34.197.232.57] helo=us1-amaz-eas2.inumbo.com) by lists.xenproject.org with esmtp (Exim 4.89) (envelope-from ) id 1jI9BI-0005RZ-UM for xen-devel@lists.xenproject.org; Sat, 28 Mar 2020 10:59:12 +0000 X-Inumbo-ID: 17ff83cb-70e3-11ea-8b30-12813bfff9fa Received: from mail.xenproject.org (unknown [104.130.215.37]) by us1-amaz-eas2.inumbo.com (Halon) with ESMTPS id 17ff83cb-70e3-11ea-8b30-12813bfff9fa; Sat, 28 Mar 2020 10:58:45 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=xen.org; s=20200302mail; h=In-Reply-To:Content-Transfer-Encoding:Content-Type: MIME-Version:References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=VGg5s7LEJBJSjdd7dc6tJwEHIukPmsXF3AhFSl6pAIw=; b=Gjw41TjCHal50+3D9RqSoYCaEl 1uW/tgD+7sAd3PBUwpmzTA3ORQu/UljqcJ3CiseKN47oGyO7MkWWnZcn1Ygvbzgffqzi9j4hmC+5f lt/Ck90SR26YmPVcVxmIAJqGdgjWByvYIGAJk9cisZn7Zp28vQANXY8d+ueD/oE/exo0=; Received: from xenbits.xenproject.org ([104.239.192.120]) by mail.xenproject.org with esmtp (Exim 4.89) (envelope-from ) id 1jI9Ao-0007xm-Ca; Sat, 28 Mar 2020 10:58:42 +0000 Received: from 44.142.6.51.dyn.plus.net ([51.6.142.44] helo=debian) by xenbits.xenproject.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1jI9Ao-0006uB-2Z; Sat, 28 Mar 2020 10:58:42 +0000 Date: Sat, 28 Mar 2020 10:58:39 +0000 From: Wei Liu To: Roger Pau =?utf-8?B?TW9ubsOp?= Message-ID: <20200328105839.rf3igs2h7o7ujj7s@debian> References: <20200328053834.GA12753@simran-Inspiron-5558> <20200328101840.GN28601@Air-de-Roger> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20200328101840.GN28601@Air-de-Roger> User-Agent: NeoMutt/20180716 Subject: Re: [Xen-devel] [PATCH] xen/x86: Remove unnecessary cast on void pointer X-BeenThere: xen-devel@lists.xenproject.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Cc: Kevin Tian , Jan Beulich , Wei Liu , Andrew Cooper , George Dunlap , Jun Nakajima , xen-devel@lists.xenproject.org, Simran Singhal Errors-To: xen-devel-bounces@lists.xenproject.org Sender: "Xen-devel" 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.