From: kbuild test robot <fengguang.wu@intel.com>
To: Jason Gunthorpe <jgg@mellanox.com>
Cc: kbuild-all@01.org, Leon Romanovsky <leonro@mellanox.com>,
Doug Ledford <dledford@redhat.com>,
Yishai Hadas <yishaih@mellanox.com>,
Mark Bloch <markb@mellanox.com>,
Matan Barak <matanb@mellanox.com>,
Ariel Levkovich <lariel@mellanox.com>,
linux-rdma@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: [PATCH] RDMA/uverbs: fix ptr_ret.cocci warnings
Date: Wed, 28 Nov 2018 07:21:30 +0800 [thread overview]
Message-ID: <20181127232130.GA28456@sof-kbuild01> (raw)
In-Reply-To: <201811280723.DnTk8AXL%fengguang.wu@intel.com>
From: kbuild test robot <fengguang.wu@intel.com>
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 <fengguang.wu@intel.com>
---
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,
next parent reply other threads:[~2018-11-27 23:21 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <201811280723.DnTk8AXL%fengguang.wu@intel.com>
2018-11-27 23:21 ` kbuild test robot [this message]
2018-11-29 23:37 ` [PATCH] RDMA/uverbs: fix ptr_ret.cocci warnings Jason Gunthorpe
2018-12-03 17:23 ` Doug Ledford
2018-12-03 20:47 ` Jason Gunthorpe
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20181127232130.GA28456@sof-kbuild01 \
--to=fengguang.wu@intel.com \
--cc=dledford@redhat.com \
--cc=jgg@mellanox.com \
--cc=kbuild-all@01.org \
--cc=lariel@mellanox.com \
--cc=leonro@mellanox.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-rdma@vger.kernel.org \
--cc=markb@mellanox.com \
--cc=matanb@mellanox.com \
--cc=yishaih@mellanox.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox