Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp461124imu; Tue, 27 Nov 2018 15:23:29 -0800 (PST) X-Google-Smtp-Source: AJdET5eOvORHSMm78yNkcuNlUSdOqIUQa5FtcvMS3wBx+V+ab4ktK3HhcOdlhgb+MSJLSm0iimX1 X-Received: by 2002:a63:e247:: with SMTP id y7mr29728313pgj.84.1543361009685; Tue, 27 Nov 2018 15:23:29 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1543361009; cv=none; d=google.com; s=arc-20160816; b=ieH7WDxKF/IAPQwYx0EpOG3ZlcgR5RlsEjARCij9bNx5v/vcb8P77G/jckqYeKHp6s u9gojMW9WM03eCokcWAPKOzzYBokRwbCgLkjoH3hyoA/rf1mqilgHfJC7CrD2zcfKJD6 75lQppjGNTJDPYOG2QilTjEFIfDTGeNqje1FaOK/FTxvwYGINLrGHwrOXMecnmWWmvhv cdxGfydxzoSxAiYrGM4iTaijCaXO20E+5F9YYQperuvmtYKuhxMqcNgiZ9y2CCYjwys+ WIowiMM1o74rrrNo5M6RF8jTu7vw7tSqiEZwC2+0rUU27zmQogH3QtG4dqEpwUPyE4D9 h5TQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=pSQ8zGeqbCbwx+N4W/IwJE0ZZu26G1a4dbqin2zYbJw=; b=HYS8zmlVzlEEFPoZYZsEbXNxFqN1OmphqOGnnzT6li9o61oRRs47vMcUKyjKchlf88 yV5EcNKGCeAIME6ZBV1zCBB8gjYBgQe3mNgF8e3ZD9b5JpnZKTo2J9uWTqclmchDY5qy tMkNKvlDwhhLhuwg98yRgR5GVWNnhADUbolx8YhJIRiV5OnHnBqW01c8o1WD/1QGpDzN i7aK/C3Acp2IGY+RhI84Rr0UF+tmwUEAVKkc/eTsWOw2lw3Ti0ExhtutrCcoTVT4+/97 Y+zRhRfUbng5pbtvBroF0TN3r5unw63BO5qVo4ByxHFcNTkCnII5rtsy5/37pDkCNMXj SBhw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id f11si5217291plr.341.2018.11.27.15.23.14; Tue, 27 Nov 2018 15:23:29 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726770AbeK1KVS (ORCPT + 99 others); Wed, 28 Nov 2018 05:21:18 -0500 Received: from mga03.intel.com ([134.134.136.65]:63248 "EHLO mga03.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726068AbeK1KVR (ORCPT ); Wed, 28 Nov 2018 05:21:17 -0500 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga008.jf.intel.com ([10.7.209.65]) by orsmga103.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 27 Nov 2018 15:21:48 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.56,288,1539673200"; d="scan'208";a="95912036" Received: from lkp-server01.sh.intel.com (HELO lkp-server01) ([10.239.97.150]) by orsmga008.jf.intel.com with ESMTP; 27 Nov 2018 15:21:46 -0800 Received: from kbuild by lkp-server01 with local (Exim 4.89) (envelope-from ) id 1gRmfq-000Esh-3O; Wed, 28 Nov 2018 07:21:46 +0800 Date: Wed, 28 Nov 2018 07:21:30 +0800 From: kbuild test robot To: Jason Gunthorpe Cc: kbuild-all@01.org, Leon Romanovsky , Doug Ledford , Yishai Hadas , Mark Bloch , Matan Barak , Ariel Levkovich , linux-rdma@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH] RDMA/uverbs: fix ptr_ret.cocci warnings Message-ID: <20181127232130.GA28456@sof-kbuild01> References: <201811280723.DnTk8AXL%fengguang.wu@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <201811280723.DnTk8AXL%fengguang.wu@intel.com> User-Agent: Mutt/1.5.23 (2014-03-12) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: kbuild test robot drivers/infiniband/core/uverbs_cmd.c:1095:1-3: WARNING: PTR_ERR_OR_ZERO can be used Use PTR_ERR_OR_ZERO rather than if(IS_ERR(...)) + PTR_ERR Generated by: scripts/coccinelle/api/ptr_ret.cocci Fixes: 7106a9769715 ("RDMA/uverbs: Make write() handlers return 0 on success") Signed-off-by: kbuild test robot --- tree: git://git.kernel.org/pub/scm/linux/kernel/git/rdma/rdma for-next head: 07f05f40d956d40f32852a7b3ff109a72d254cf9 commit: 7106a9769715bb4c0448927a29aa3b505855871c [31/37] RDMA/uverbs: Make write() handlers return 0 on success uverbs_cmd.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) --- a/drivers/infiniband/core/uverbs_cmd.c +++ b/drivers/infiniband/core/uverbs_cmd.c @@ -1092,10 +1092,7 @@ static int ib_uverbs_create_cq(struct uv sizeof(cmd.comp_channel), ib_uverbs_create_cq_cb, NULL); - if (IS_ERR(obj)) - return PTR_ERR(obj); - - return 0; + return PTR_ERR_OR_ZERO(obj); } static int ib_uverbs_ex_create_cq_cb(struct uverbs_attr_bundle *attrs,