From nobody Thu Apr 9 09:27:44 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 3F9C1C43217 for ; Tue, 15 Nov 2022 03:17:05 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S237055AbiKODRD (ORCPT ); Mon, 14 Nov 2022 22:17:03 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57540 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S237555AbiKODQ5 (ORCPT ); Mon, 14 Nov 2022 22:16:57 -0500 Received: from unicom146.biz-email.net (unicom146.biz-email.net [210.51.26.146]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1FC3D1094; Mon, 14 Nov 2022 19:16:52 -0800 (PST) Received: from ([60.208.111.195]) by unicom146.biz-email.net ((D)) with ASMTP (SSL) id JEF00144; Tue, 15 Nov 2022 11:16:44 +0800 Received: from localhost.localdomain (10.200.104.97) by jtjnmail201602.home.langchao.com (10.100.2.2) with Microsoft SMTP Server id 15.1.2507.12; Tue, 15 Nov 2022 11:16:47 +0800 From: Bo Liu To: , CC: , , , Bo Liu Subject: [PATCH] aio: replace IS_ERR() with IS_ERR_VALUE() Date: Mon, 14 Nov 2022 22:16:44 -0500 Message-ID: <20221115031644.2341-1-liubo03@inspur.com> X-Mailer: git-send-email 2.18.2 MIME-Version: 1.0 X-Originating-IP: [10.200.104.97] tUid: 202211151116440ddae5e63825895396b0687c100e7070 X-Abuse-Reports-To: service@corp-email.com Abuse-Reports-To: service@corp-email.com X-Complaints-To: service@corp-email.com X-Report-Abuse-To: service@corp-email.com Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Avoid typecasts that are needed for IS_ERR() and use IS_ERR_VALUE() instead. Signed-off-by: Bo Liu Reviewed-by: Chaitanya Kulkarni --- fs/aio.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fs/aio.c b/fs/aio.c index 5b2ff20ad322..978bbfb8dcac 100644 --- a/fs/aio.c +++ b/fs/aio.c @@ -556,7 +556,7 @@ static int aio_setup_ring(struct kioctx *ctx, unsigned = int nr_events) PROT_READ | PROT_WRITE, MAP_SHARED, 0, &unused, NULL); mmap_write_unlock(mm); - if (IS_ERR((void *)ctx->mmap_base)) { + if (IS_ERR_VALUE(ctx->mmap_base)) { ctx->mmap_size =3D 0; aio_free_ring(ctx); return -ENOMEM; --=20 2.27.0