Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp2229598pxb; Fri, 5 Mar 2021 10:12:29 -0800 (PST) X-Google-Smtp-Source: ABdhPJyFM446OK4GquSrCKTJuywgpn5WGnyqyav7li0bQanXTA+Yt/hkVBN1pXiR53rEM1Vri4rH X-Received: by 2002:a17:907:3e92:: with SMTP id hs18mr3390683ejc.396.1614967948899; Fri, 05 Mar 2021 10:12:28 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1614967948; cv=none; d=google.com; s=arc-20160816; b=G0aYJAKHtJEn22t8DHpsE7TD4py0f4DQW3lo920J8+7+AQAiZcTlJp0fXITZUPeIMb xbHBzrZDvSCxPsTzjtXc8nV4+d+R83TKvg1/W9fNpHTRVjlDsdlZSWnQ+8roFA5/JMb/ c1tAml/5bhfCuNzP3KYb5J0P1ZUcELCUbj6TovzrsUipcqEwzd6bQTraqx7KXizH4YZ1 VnSsuGIlqqsqsIqn9bxBQR78WSwchXaQxn/BvxeKg8PMMotIlTomWCBRvKn9J5bdP7De OUhVr4SkCMEL+ZQmlJYuBcnfzNbM4mmNZJ3tnCNboqnSQRV4rZ4blKLNgHJ8FgrEO5+5 xmkA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-disposition:mime-version:message-id :subject:cc:to:from:date:dkim-signature; bh=ubmhmztN8a8Hj0poOvVT8YbZJDxjF/QA8WxAgvM4BAo=; b=F0kXYHrdeRjfhF/XKATKvf3tRrCMtG0DLRtErjlA2MPsNhkzHICHOxcMF+4Wr2O3Hk ETaf8VJJiFWYJxCXkcOKPpxGlc/MJtTndGAVET1gQmyNqMohCF82dVdS8aYDSg/Z5D6s LhC47/o0tKoBM/Tv53KspBS8fQfM4fm5CECb0FEavy+dfN5M+k5yxE/0gAcRyNiKkv3D i3zQnW6gIZBoYrG3MaRL46INcaVcKZGqDqH2k0cmmuyuuRv2+3nHMuWbmx/RCsmP3wtD 0dDbD/t976DQamq7+tdKQjBa/t962bMzNmY+Uf8ZXQlxpA84H4eOyUorXuKcQbJxdMsP mbTw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=RBhZe6IV; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id h13si1877612edq.173.2021.03.05.10.12.06; Fri, 05 Mar 2021 10:12:28 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=RBhZe6IV; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229690AbhCESLK (ORCPT + 99 others); Fri, 5 Mar 2021 13:11:10 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53848 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229497AbhCESK4 (ORCPT ); Fri, 5 Mar 2021 13:10:56 -0500 Received: from mail-ed1-x533.google.com (mail-ed1-x533.google.com [IPv6:2a00:1450:4864:20::533]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 94467C061574 for ; Fri, 5 Mar 2021 10:10:55 -0800 (PST) Received: by mail-ed1-x533.google.com with SMTP id w9so3829304edc.11 for ; Fri, 05 Mar 2021 10:10:55 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:to:cc:subject:message-id:mime-version:content-disposition; bh=ubmhmztN8a8Hj0poOvVT8YbZJDxjF/QA8WxAgvM4BAo=; b=RBhZe6IVRoBkXgOGPTYenj14nkf3DHhFmd27DCVTFkVU37xSXaHheV4A5ZidTnyl+c 9PmNMmT6d0zHwMt4ZLvLlJSfAB+19qZ7LLzmAJ0DTEq3wkzAgGmmBACA0BEGDuDKGrfL gBlrPMb9uw6/odrFxO6QyhTYJnzUlD8Srby/9uvPkn/7w76iFUucWWk4QmTo1ZGXG0cx I0Cx687AKLp9i6YdMeerGvdJal7MZCtMNIAuNKknOWPRmZxY3125ZkSBPsN4s8OTVtDn BdzbLS7ixDlZBVTvmdlECo54l/cu09xzKUNFFmgfFMpHL/M78+aoczP0vZ88aadDKIPo sILQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:mime-version :content-disposition; bh=ubmhmztN8a8Hj0poOvVT8YbZJDxjF/QA8WxAgvM4BAo=; b=nC1qmA2JQExjG/AWsFyK1rFHhrdJIqDWsr8lPw5PSasbUqlTs35iIZDlQYzig7p8b6 Uts3Y7HhhUXxfXRS24R6cbO7E5X6utOxdJD82iz+Qrtz4ikgJBZJ8X4tghpYBRK+CLIf nVAF/Bv9uJ0J/wC/A10+7nMxVI84SP8TPecy+FEPZZ/BvNwFWFt2i1nSkWtjKsNYecQO Us7tUjT8knlfkdP475vfh00TccpebWBNUohNLqYtQ7tK15AKA/SssvKT8RZZ8Sp/4X21 XK7Dzdb5A67iOrhFkvmeMiw+TrPPxjL8j9bn8zcMqatkHoMvbYTGyKYHOG8F7b9csUJY xoaA== X-Gm-Message-State: AOAM530zb02KTG1kHSFIKXwsQ5uvO0Of29SM2u4lha+8kodL97P4BC3b 4CSk4Zs40qWUJggfVhij9Gg= X-Received: by 2002:a50:8a90:: with SMTP id j16mr10103042edj.334.1614967854419; Fri, 05 Mar 2021 10:10:54 -0800 (PST) Received: from LEGION ([27.255.58.138]) by smtp.gmail.com with ESMTPSA id br13sm1953440ejb.87.2021.03.05.10.10.47 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 05 Mar 2021 10:10:54 -0800 (PST) Date: Fri, 5 Mar 2021 23:10:44 +0500 From: Muhammad Usama Anjum To: Paolo Bonzini , Sean Christopherson , Vitaly Kuznetsov , Wanpeng Li , Jim Mattson , Joerg Roedel , Thomas Gleixner , Ingo Molnar , Borislav Petkov , x86@kernel.org, "H. Peter Anvin" , linux-kernel@vger.kernel.org Cc: musamaanjum@gmail.com Subject: [PATCH] kvm: x86: use NULL instead of using plain integer as pointer Message-ID: <20210305181044.GA489219@LEGION> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Sparse warnings removed: warning: Using plain integer as NULL pointer Signed-off-by: Muhammad Usama Anjum --- 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 884e5b3838c7..3e11065038e5 100644 --- a/arch/x86/kvm/x86.c +++ b/arch/x86/kvm/x86.c @@ -10570,7 +10570,7 @@ void __user * __x86_set_memory_region(struct kvm *kvm, int id, gpa_t gpa, return (void __user *)hva; } else { if (!slot || !slot->npages) - return 0; + return NULL; old_npages = slot->npages; hva = slot->userspace_addr; -- 2.25.1