* [PATCH] rdma: delete the useless casting value returned
@ 2021-03-12 2:19 Wang Qing
2021-03-12 13:10 ` Jason Gunthorpe
0 siblings, 1 reply; 2+ messages in thread
From: Wang Qing @ 2021-03-12 2:19 UTC (permalink / raw)
To: Doug Ledford, Jason Gunthorpe, linux-rdma, linux-kernel; +Cc: Wang Qing
Fix the following coccicheck warning:
WARNING: casting value returned by memory allocation function is useless.
Signed-off-by: Wang Qing <wangqing@vivo.com>
---
include/rdma/ib_verbs.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/include/rdma/ib_verbs.h b/include/rdma/ib_verbs.h
index ca28fca..f4d24d8
--- a/include/rdma/ib_verbs.h
+++ b/include/rdma/ib_verbs.h
@@ -2259,7 +2259,7 @@ struct iw_cm_conn_param;
struct ib_struct)))
#define rdma_zalloc_drv_obj_gfp(ib_dev, ib_type, gfp) \
- ((struct ib_type *)kzalloc(ib_dev->ops.size_##ib_type, gfp))
+ kzalloc(ib_dev->ops.size_##ib_type, gfp)
#define rdma_zalloc_drv_obj(ib_dev, ib_type) \
rdma_zalloc_drv_obj_gfp(ib_dev, ib_type, GFP_KERNEL)
--
2.7.4
^ permalink raw reply related [flat|nested] 2+ messages in thread
end of thread, other threads:[~2021-03-12 13:11 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-03-12 2:19 [PATCH] rdma: delete the useless casting value returned Wang Qing
2021-03-12 13:10 ` Jason Gunthorpe
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox