From patchwork Tue Nov 15 03:16:44 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bo Liu X-Patchwork-Id: 20164 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:6687:0:0:0:0:0 with SMTP id l7csp2496844wru; Mon, 14 Nov 2022 19:27:27 -0800 (PST) X-Google-Smtp-Source: AA0mqf6Yu/AcMvKARw8V/XszY4o18Gv7yP43oMKN1bM7ykGvbpi958jw9CzxPHDfwIs93VbwgZgR X-Received: by 2002:a17:90a:7565:b0:205:edfd:13f7 with SMTP id q92-20020a17090a756500b00205edfd13f7mr224464pjk.19.1668482847006; Mon, 14 Nov 2022 19:27:27 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1668482846; cv=none; d=google.com; s=arc-20160816; b=0PdaSZNIoqN2SA7NA8OH0EgWBgRi51VwyBYmp/sxQjojCodP89ftEzvgE+zDLw8nli T0GPySz46bJrEcjXfKv4ZfHekp5EL+8He9tN8yw0/NvYDwarHz3ctAmpwvpsFJDzMEVu fndY91YeY+FftbVZoCsOJ1J8yo+DN+YtCkf0Zbz6abEhEuKGsR+3KauXo+KneSPHL8aA vu+EZHI+QcQkW4xZHkB24uf1KH0YEVyLLDV/AxjhQKG+1ae0Udk8GrWEfjdH9EnRs5sx CMnxUPuZQ6VSAfwjHf5dGXPyDXuyP+vbeezIcvEahopEloDpdMoi5mba60mAT4y/0gDh YVuA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:abuse-reports-to:tuid:mime-version:message-id :date:subject:cc:to:from; bh=yJDwXY1Rvr0u0up9cMTID3mWAO17z7hnqABAF15VA2g=; b=XxOCggZaPtdfk5ZTBRev1K+z/17dGqu6ix/8tNCE96JqIjt7KziQxln4/0d0ZovDIN p1r/yybowLU3rtoo23JVEvsAwpdnjzRKWxORG3pj2eGczG8c54kEbnqTfp8bphdnQQiA T/Dr8zCy8XhKdF7Fgm0sGwEdYOmmqSMxYrVEWYS8GQ7ov5VqX5soeP37qEGeeb6n7Hmd FSAGbQMyczxLz1xuwAVBf6sL0So/hLpsedwJDjxINrSx0iHQYbWb0RI7VAQOqtxv4RV9 axeEMBJY5SQcvpdTtMPjWiEGsUQDTHB6YDVUxy3/OVSu5iSC5pbTWikv9hWFz7rplKtg fWmA== ARC-Authentication-Results: i=1; mx.google.com; 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 Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id nh17-20020a17090b365100b00212f86579f8si13821168pjb.111.2022.11.14.19.27.13; Mon, 14 Nov 2022 19:27:26 -0800 (PST) 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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236965AbiKODRC (ORCPT + 99 others); Mon, 14 Nov 2022 22:17:02 -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 X-Spam-Status: No, score=-2.6 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_LOW, 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 X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1749531069576836809?= X-GMAIL-MSGID: =?utf-8?q?1749531069576836809?= 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 = 0; aio_free_ring(ctx); return -ENOMEM;