[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <202504012109233981_YPVbd4wQzmAzP3tA5IG@zte.com.cn>
Date: Tue, 1 Apr 2025 21:09:23 +0800 (CST)
From: <shao.mingyin@....com.cn>
To: <jgg@...pe.ca>
Cc: <leon@...nel.org>, <li.haoran7@....com.cn>, <linux-rdma@...r.kernel.org>,
<linux-kernel@...r.kernel.org>, <viro@...iv.linux.org.uk>,
<brauner@...nel.org>, <agoldberger@...dia.com>, <cmeiohas@...dia.com>,
<msanalla@...dia.com>, <dan.carpenter@...aro.org>,
<mrgolin@...zon.com>, <phaddad@...dia.com>, <ynachum@...zon.com>,
<mgurtovoy@...dia.com>, <yang.yang29@....com.cn>,
<xu.xin16@....com.cn>, <ye.xingchen@....com.cn>
Subject: [PATCH 2/3] RDMA/uverbs: Convert to use ERR_CAST()
From: Li Haoran <li.haoran7@....com.cn>
As opposed to open-code, using the ERR_CAST macro clearly indicates that
this is a pointer to an error value and a type conversion was performed.
Signed-off-by: Li Haoran <li.haoran7@....com.cn>
Signed-off-by: Shao Mingyin <shao.mingyin@....com.cn>
---
drivers/infiniband/core/uverbs_cmd.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/infiniband/core/uverbs_cmd.c b/drivers/infiniband/core/uverbs_cmd.c
index 3c3bb670c805..bc9fe3ceca4d 100644
--- a/drivers/infiniband/core/uverbs_cmd.c
+++ b/drivers/infiniband/core/uverbs_cmd.c
@@ -193,7 +193,7 @@ _ib_uverbs_lookup_comp_file(s32 fd, struct uverbs_attr_bundle *attrs)
fd, attrs);
if (IS_ERR(uobj))
- return (void *)uobj;
+ return ERR_CAST(uobj);
uverbs_uobject_get(uobj);
uobj_put_read(uobj);
--
2.25.1
Powered by blists - more mailing lists