From nobody Tue Apr 7 22:17:29 2026 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 2B55DC4332F for ; Wed, 16 Nov 2022 09:19:52 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233427AbiKPJTZ (ORCPT ); Wed, 16 Nov 2022 04:19:25 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42526 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233231AbiKPJS6 (ORCPT ); Wed, 16 Nov 2022 04:18:58 -0500 Received: from mxct.zte.com.cn (mxct.zte.com.cn [183.62.165.209]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 36D99DFF8 for ; Wed, 16 Nov 2022 01:18:57 -0800 (PST) Received: from mse-fl2.zte.com.cn (unknown [10.5.228.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mxct.zte.com.cn (FangMail) with ESMTPS id 4NByCg26Bzz4y0vn; Wed, 16 Nov 2022 17:18:55 +0800 (CST) Received: from xaxapp01.zte.com.cn ([10.88.40.50]) by mse-fl2.zte.com.cn with SMTP id 2AG9IfA6055683; Wed, 16 Nov 2022 17:18:41 +0800 (+08) (envelope-from ye.xingchen@zte.com.cn) Received: from mapi (xaxapp01[null]) by mapi (Zmail) with MAPI id mid31; Wed, 16 Nov 2022 17:18:43 +0800 (CST) Date: Wed, 16 Nov 2022 17:18:43 +0800 (CST) X-Zmail-TransId: 2af96374aaf337a94061 X-Mailer: Zmail v1.0 Message-ID: <202211161718436948912@zte.com.cn> Mime-Version: 1.0 From: To: Cc: , , , , , , , , Subject: =?UTF-8?B?W1BBVENIIGxpbnV4LW5leHRdIEtWTTogeDg2OiBSZXBsYWNlIElTX0VSUigpIHdpdGggSVNfRVJSX1ZBTFVFKCk=?= X-MAIL: mse-fl2.zte.com.cn 2AG9IfA6055683 X-Fangmail-Gw-Spam-Type: 0 X-FangMail-Miltered: at cgslv5.04-192.168.251.13.novalocal with ID 6374AAFF.000 by FangMail milter! X-FangMail-Envelope: 1668590335/4NByCg26Bzz4y0vn/6374AAFF.000/10.5.228.133/[10.5.228.133]/mse-fl2.zte.com.cn/ X-Fangmail-Anti-Spam-Filtered: true X-Fangmail-MID-QID: 6374AAFF.000/4NByCg26Bzz4y0vn Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" 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 aa39e6c2d1f1..c2eaa9b8d2cb 100644 --- a/arch/x86/kvm/x86.c +++ b/arch/x86/kvm/x86.c @@ -12483,7 +12483,7 @@ void __user * __x86_set_memory_region(struct kvm *k= vm, int id, gpa_t gpa, */ hva =3D 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) --=20 2.25.1