Messages in this thread Patch in this message | | | From | Wang Qing <> | Subject | [PATCH] rdma: delete the useless casting value returned | Date | Fri, 12 Mar 2021 10:19:30 +0800 |
| |
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
| |