Received: by 2002:a05:6358:1087:b0:cb:c9d3:cd90 with SMTP id j7csp895073rwi; Thu, 20 Oct 2022 06:31:57 -0700 (PDT) X-Google-Smtp-Source: AMsMyM786uJ9kJBmEgnewbW3rrLanpRfo5m1eEPG/sfw3NSwTbYPh45It9Qe1EHpG49u09frp5iW X-Received: by 2002:a17:90b:4f4a:b0:20c:64e2:2bee with SMTP id pj10-20020a17090b4f4a00b0020c64e22beemr53430093pjb.32.1666272717125; Thu, 20 Oct 2022 06:31:57 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1666272717; cv=none; d=google.com; s=arc-20160816; b=mHT79p6/Y9wD3eN7kBGTdX26ftASJLdn/bzy/LMvvRZXGQIfdIQxPLCRG+xW7hFn6m BUSVu/BcHa7ru2DEEZqz+ORiNwGkXkvn0IaYWyg7RQGTe+B+w6wMX+LpRR3zs4tWz4Lf iMlToSLJo2+7F8rV+yggxvz0SgjlYJdS/cnnUYynye7d+dlV2ixaKUUWL1vEF4hBKFUh kjlUyVEAxop9si7X7O0XjB1bhpcaF6EYliYtRYxZEGMDOiVm/yN6+Zea4GNm/9LswcPR o55eQT8TtkaoB+IZSZSX7TCxRtMTuo5yC+xSzhA5o5era4Dd7Gtinid2bCv+OgS38JoC KO4Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=iXYBiVeIg3bXe+RYeJHWLJUuTYSz6XkSd7JNsHDAMGo=; b=DpZDflNHsdnQdBk9UPr3FzKPj3yy6AugQFN/8mVH22uN2JpiWIK+peLnw4a62sd5Fu OO/H8utyHMKAA993eH7G82vGNDcaHGPm/QAHB3k4yHhwKzruYaQ4Uy7IJ+b4XYQCCFOT QTlooJJ1u/hG3v/3Ds3Ia63OgHzy7hnyr/DlIXm4hZwwn3vcr/Urv839A97Sgv5cBcXi 5QTzkbL/bB51UbRikrWgM/qr3nq6hy8zcKabsrqob6Sg4wcxO0EEYDxp/ZsbUqwWEfup k37Ans/ib+GBn58ixbrq5j5cfDs51PHw9nHxeAVxpR00Rnj4nC8ljEp7g+JyK5ScE//B B0hA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=chmc41O8; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 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 out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id k9-20020a170902c40900b0017d2311af5dsi26205324plk.69.2022.10.20.06.31.42; Thu, 20 Oct 2022 06:31:57 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=chmc41O8; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 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 S231431AbiJTLj6 (ORCPT + 99 others); Thu, 20 Oct 2022 07:39:58 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47498 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231428AbiJTLjy (ORCPT ); Thu, 20 Oct 2022 07:39:54 -0400 Received: from mail-pj1-x102d.google.com (mail-pj1-x102d.google.com [IPv6:2607:f8b0:4864:20::102d]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id DDB255050D; Thu, 20 Oct 2022 04:39:50 -0700 (PDT) Received: by mail-pj1-x102d.google.com with SMTP id x1-20020a17090ab00100b001fda21bbc90so3169115pjq.3; Thu, 20 Oct 2022 04:39:50 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=iXYBiVeIg3bXe+RYeJHWLJUuTYSz6XkSd7JNsHDAMGo=; b=chmc41O8+WmHf7G+cUG7F27mqVOj7PoODYmu6lGE56Ra5gBxrE8Ad6z0tdkrlmyu8o 9ahJpklzOhQC7ZfN0PqvY1GtEJ5Rhem6AyExC7KDJAwyidvNR+LzPB0MOjf7zMb2ZVVF X3Df716cwnyJqlVRSknYrxnAD47LkCrXPw6h3goJnKSg7VnMg/MRXbaHXtdPUdRLyxsu AxPF52SX4s+wD4LHxcDroXl+AGrgvscEpZkSlKDZVOdYTwrN8R7cxpkIHcc3741g5jXN DUaGBGJbzEZ/C67XqcbR2BeN0M4Ju6SSmp3rjlIYMDPRe04u5YH1CxSRfWspijMKSon/ tfpA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=iXYBiVeIg3bXe+RYeJHWLJUuTYSz6XkSd7JNsHDAMGo=; b=nPBBLrI1yc3saFkWA0YhwXdzPMMxgvpoW6LyEy/job/6x4PEFOgqI89T97vd+wtci2 v2gwgvVOVXPyDKWLVWc0b4lqi/lOa/pTUdHDYo1V3P5cJwte06kZw/jaG1QeXh4JXsA/ 8gNXpG+uOv231RZrxD+hfiG7DQAxMQgtzrkOjmS5rYUQTE7gV9+S3vmnY7qnttdR7gdz PsycVq50wkU9FWYfPuprGeCAIqj6J0B+7h22W6IP0hgZX6EZKCw/pvhYOLE465Z2u9zc 2ptljX1cu047o2S589aCwkHwipEPiHf/WCfqB/0Eny3KLZ4JUaw+gPQKKwGtz0Yd+Iwd J1aQ== X-Gm-Message-State: ACrzQf2px7Oq5I58rs4JcW2e0nSAllUxa5MgHF5avZztNYJJ9sBtHHWl p9wrDsKW/q8CmquZxfYz8LY= X-Received: by 2002:a17:902:f791:b0:17c:c1dd:a3b5 with SMTP id q17-20020a170902f79100b0017cc1dda3b5mr13332042pln.141.1666265989512; Thu, 20 Oct 2022 04:39:49 -0700 (PDT) Received: from localhost.localdomain ([193.203.214.57]) by smtp.gmail.com with ESMTPSA id h8-20020a170902680800b0018661acdff5sm1394981plk.142.2022.10.20.04.39.46 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 20 Oct 2022 04:39:48 -0700 (PDT) From: yexingchen116@gmail.com X-Google-Original-From: ye.xingchen@zte.com.cn To: seanjc@google.com Cc: pbonzini@redhat.com, tglx@linutronix.de, mingo@redhat.com, bp@alien8.de, dave.hansen@linux.intel.com, x86@kernel.org, hpa@zytor.com, kvm@vger.kernel.org, linux-kernel@vger.kernel.org, ye xingchen Subject: [PATCH linux-next] KVM: x86: Replace IS_ERR() with IS_ERR_VALUE() Date: Thu, 20 Oct 2022 11:39:43 +0000 Message-Id: <20221020113943.400103-1-ye.xingchen@zte.com.cn> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-1.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_ENVFROM_END_DIGIT, FREEMAIL_FROM,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: ye xingchen Avoid type casts that are needed for IS_ERR() and use IS_ERR_VALUE() instead. Signed-off-by: ye xingchen --- 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 4bd5f8a751de..1c260f716c3b 100644 --- a/arch/x86/kvm/x86.c +++ b/arch/x86/kvm/x86.c @@ -12414,7 +12414,7 @@ void __user * __x86_set_memory_region(struct kvm *kvm, int id, gpa_t gpa, */ hva = vm_mmap(NULL, 0, size, PROT_READ | PROT_WRITE, MAP_SHARED | MAP_ANONYMOUS, 0); - if (IS_ERR((void *)hva)) + if (IS_ERR_VALUE(hva)) return (void __user *)hva; } else { if (!slot || !slot->npages) -- 2.25.1