Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp3045963yba; Mon, 8 Apr 2019 09:56:45 -0700 (PDT) X-Google-Smtp-Source: APXvYqxLbuKxbZln7xIlWms5LyoaHilw1uP/nHrEVNDPH3o3n/yZejFSWqe6IegD3KEOwpeqflfJ X-Received: by 2002:a17:902:b686:: with SMTP id c6mr31564052pls.14.1554742605642; Mon, 08 Apr 2019 09:56:45 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1554742605; cv=none; d=google.com; s=arc-20160816; b=CaAtEh3noA37ZQw2rYKLLG2eWQAnPUdHZp1Eoc+mZ3a6AWnXnCLmpj1jD3ghrp1o2o loriw4p8bVn59OegZFHtYo/mp2FeKxOfty6Cfv5D8cNha57jBG4xP4VdxozMI0oGYr9d 84Jk9Ljt0KwNQN/hl6vbjjqcteaF42D2e7xcxrmXAZPOWHS6eNaTADl7Z37KlEduFpOp kx8FXJ4g6fbnf+/6I1aLmRFm3sg78WnjrCHK8zkSTgN2lezwQgJNng2yza0yWQsSKsP2 KxzmAAxKg3lZGhEW1Nxj6OqZslwL4yee0OUQrkLOpvaBiKZQG1IOdSzuOUtrcuEoZjJa YHtw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=l3glfn9WWU3lhLgGU/EyvyS/513ji0Mp1eao5Telb8Y=; b=D36MvSI1GVvF7n8ZXTOzBXgz0UwTu/eYaNijKRS/Zzp6pENln1wcFXolwhGwxuBvnJ 48rcbZDZt4aKacmj3RdgCtU6oqR45anHsXp788muPEdrK0+cdFoFy3pru/8FTYsJjMME r431wAxZNK0gaKn6odP4tknpecAFZ9+DYLJh4vFLgUI2u9whEKDFWTyrEki+mJpX7Qyj pHffACFyvE7f3MKE9D8iZg3wUipsLgNRqU6FMoIdPJ+Ck3gvbCNyCaTEkLXjaLeLMmBv lMuCx1Ct9/tz5wbssQj7XUIv0J5fC6/3L4HM18ulXYQPBgoyFpZxfabLo34JhBQb6dbc 36Bg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id l69si27485692plb.272.2019.04.08.09.56.30; Mon, 08 Apr 2019 09:56:45 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729064AbfDHQzx (ORCPT + 99 others); Mon, 8 Apr 2019 12:55:53 -0400 Received: from mga17.intel.com ([192.55.52.151]:54764 "EHLO mga17.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726726AbfDHQzx (ORCPT ); Mon, 8 Apr 2019 12:55:53 -0400 X-Amp-Result: UNKNOWN X-Amp-Original-Verdict: FILE UNKNOWN X-Amp-File-Uploaded: False Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by fmsmga107.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 08 Apr 2019 09:55:52 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.60,325,1549958400"; d="scan'208";a="162465007" Received: from sjchrist-coffee.jf.intel.com (HELO linux.intel.com) ([10.54.74.181]) by fmsmga001.fm.intel.com with ESMTP; 08 Apr 2019 09:55:52 -0700 Date: Mon, 8 Apr 2019 09:55:51 -0700 From: Sean Christopherson To: Hariprasad Kelam Cc: Paolo Bonzini , Radim =?utf-8?B?S3LEjW3DocWZ?= , Thomas Gleixner , Ingo Molnar , Borislav Petkov , "H. Peter Anvin" , x86@kernel.org, kvm@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] KVM: x86: fix warning Using plain integer as NULL pointer Message-ID: <20190408165551.GD25880@linux.intel.com> References: <20190406093658.GA7438@hari-Inspiron-1545> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20190406093658.GA7438@hari-Inspiron-1545> User-Agent: Mutt/1.5.24 (2015-08-30) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Nit: For future reference, wrapping the warning text with quotes in the shortlog would be helpful. I initially read it as "fix a warning by using a plain integer as a NULL pointer". E.g.: KVM: x86: fix warning "Using plain integer as NULL pointer" On Sat, Apr 06, 2019 at 03:06:58PM +0530, Hariprasad Kelam wrote: > Changed passing argument as "0 to NULL" which resolves below sparse warning Nit: Use imperative mood to state what the patch does, as opposed to talking about the change in the past tense. That allows using past tense to describe things that actually did happen in the past. E.g.: Pass "NULL" instead of "0" for a pointer argument when querying KVM_CAP_NESTED_STATE to resolve the below sparse warning: > > arch/x86/kvm/x86.c:3096:61: warning: Using plain integer as NULL pointer > > Signed-off-by: Hariprasad Kelam Thanks for the fix! Reviewed-by: Sean Christopherson > --- > arch/x86/kvm/x86.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/arch/x86/kvm/x86.c b/arch/x86/kvm/x86.c > index 099b851..39034ec 100644 > --- a/arch/x86/kvm/x86.c > +++ b/arch/x86/kvm/x86.c > @@ -3093,7 +3093,7 @@ int kvm_vm_ioctl_check_extension(struct kvm *kvm, long ext) > break; > case KVM_CAP_NESTED_STATE: > r = kvm_x86_ops->get_nested_state ? > - kvm_x86_ops->get_nested_state(NULL, 0, 0) : 0; > + kvm_x86_ops->get_nested_state(NULL, NULL, 0) : 0; > break; > default: > break; > -- > 2.7.4 >