Received: by 2002:ac0:e34a:0:0:0:0:0 with SMTP id g10csp361908imn; Wed, 27 Jul 2022 08:15:10 -0700 (PDT) X-Google-Smtp-Source: AGRyM1tIaHcpVqC7wfxpCMdgNa7KmZNMCRA5blHgpPVZymwMapsjP8T7QcFLFzGsT04SKPA/xj39 X-Received: by 2002:a05:6402:34c1:b0:43c:e6a:397d with SMTP id w1-20020a05640234c100b0043c0e6a397dmr13646136edc.160.1658934910738; Wed, 27 Jul 2022 08:15:10 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1658934910; cv=none; d=google.com; s=arc-20160816; b=TNPY5N7YfxSazT3UCnnZws+3t8SI5dtbB3fmc5eXrb5U/I58McZrxDyFraUq4Lertk BIaJVRSOErOLfL8cE5o/vkiYCW7B/FM5xcGxBPUoKm2Akewf3VdQ1j18fvizaNdn2tE8 4ux7V9jz8DYgCTvUWBensMRDGw06MN4bsnHox2K0Sk6VzkAoC5PeMOdD4tSrydoTJHlE T/baXe5WofHxAz8bSa25IDM/iFHM7x0sml13ebvTNYTMw0M5mRyVKzGGHUGJnmMfQM0O oSkUVMSNo2f4y7ijFUXWjUuYOuxtyWBC9dXhqS3lIlFp5cb0Uu88WFbo9LPs4hZHD+As gcQw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:message-id:date:subject:cc:to:from; bh=bqtK2OnHq6zEHgsOzBjvFMoGZJUh4jklbBnV6Mdt1qo=; b=eLnBiluZcao9i67CbEHqOu/cSQueINDim4F/J86LDGg6um7Gy0Vf/+AGL9Dd2hwB5a PdRKZYQq1MpmkLJEy/6EciqVDCRpz5XMed1dMjo4kwG9nDFyo/q6qV6sLRts2UE2Nbwg sgh3p9ZCitEH2OGnMcKZZdR3GPV6ThB97xeUMjcx2lxp4j5CsTu0dvNtNRD4eE/QN8kG Vp73lnJjgUVKvGx+u18J5XMGZ+0Pad0eq/b2DLvR9762ksWnqIGSyZYOrUoh/yYJmh2E 1M7mfF3jkbQeilGPlBJYP7OLmPdoZb7WgOcJjpKAyt4wT9FAdR1otL4VzaVtx3TEEcKc bShw== 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 Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id b4-20020a0564021f0400b0043c0af44278si7714781edb.10.2022.07.27.08.14.45; Wed, 27 Jul 2022 08:15:10 -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; 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 S233600AbiG0PEx (ORCPT + 99 others); Wed, 27 Jul 2022 11:04:53 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49698 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232807AbiG0PEv (ORCPT ); Wed, 27 Jul 2022 11:04:51 -0400 Received: from mail.nfschina.com (unknown [IPv6:2400:dd01:100f:2:72e2:84ff:fe10:5f45]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 0219345F53; Wed, 27 Jul 2022 08:04:49 -0700 (PDT) Received: from localhost (unknown [127.0.0.1]) by mail.nfschina.com (Postfix) with ESMTP id CE0871E80D89; Wed, 27 Jul 2022 23:04:56 +0800 (CST) X-Virus-Scanned: amavisd-new at test.com Received: from mail.nfschina.com ([127.0.0.1]) by localhost (mail.nfschina.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id Ijy2gFPFcoVt; Wed, 27 Jul 2022 23:04:54 +0800 (CST) Received: from localhost.localdomain (unknown [180.167.10.98]) (Authenticated sender: liqiong@nfschina.com) by mail.nfschina.com (Postfix) with ESMTPA id 6E2401E80D54; Wed, 27 Jul 2022 23:04:53 +0800 (CST) From: Li Qiong To: Santosh Shilimkar , "David S . Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni Cc: netdev@vger.kernel.org, linux-rdma@vger.kernel.org, rds-devel@oss.oracle.com, linux-kernel@vger.kernel.org, yuzhe@nfschina.com, renyu@nfschina.com, jiaming@nfschina.com, Li Qiong Subject: [PATCH] net/rds: Use PTR_ERR instead of IS_ERR for rdsdebug() Date: Wed, 27 Jul 2022 23:03:41 +0800 Message-Id: <20220727150341.23746-1-liqiong@nfschina.com> X-Mailer: git-send-email 2.11.0 X-Spam-Status: No, score=-1.1 required=5.0 tests=BAYES_00,RDNS_NONE, SPF_HELO_NONE,SPF_NONE autolearn=no 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 If 'local_odp_mr->r_trans_private' is a error code, it is better to print the error code than to print the value of IS_ERR(). Signed-off-by: Li Qiong --- net/rds/rdma.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/net/rds/rdma.c b/net/rds/rdma.c index 6f1a50d50d06..fba82d36593a 100644 --- a/net/rds/rdma.c +++ b/net/rds/rdma.c @@ -742,7 +742,7 @@ int rds_cmsg_rdma_args(struct rds_sock *rs, struct rds_message *rm, NULL, 0, rs, &local_odp_mr->r_key, NULL, iov->addr, iov->bytes, ODP_VIRTUAL); if (IS_ERR(local_odp_mr->r_trans_private)) { - ret = IS_ERR(local_odp_mr->r_trans_private); + ret = PTR_ERR(local_odp_mr->r_trans_private); rdsdebug("get_mr ret %d %p\"", ret, local_odp_mr->r_trans_private); kfree(local_odp_mr); -- 2.11.0