RDMA/hns: ZERO_OR_NULL_PTR macro overdetection
authorluoqing <luoqing@kylinos.cn>
Thu, 5 Jun 2025 03:49:18 +0000 (11:49 +0800)
committerLeon Romanovsky <leon@kernel.org>
Thu, 12 Jun 2025 08:12:59 +0000 (04:12 -0400)
commit1f505a4a4250798eceb6a8568988deb545587128
tree1518c9ee519a81dd93079ff6e3682eb5ae2e21ee
parent9284bc34c77399a12db1a191f35129882d067c90
RDMA/hns: ZERO_OR_NULL_PTR macro overdetection

sizeof(xx) these variable values' return values cannot be 0.
For memory allocation requests of non-zero length,
there is no need to check other return values;
it is sufficient to only verify that it is not null.

Signed-off-by: luoqing <luoqing@kylinos.cn>
Link: https://patch.msgid.link/20250605034918.242682-1-l1138897701@163.com
Reviewed-by: Junxian Huang <huangjunxian6@hisilicon.com>
Signed-off-by: Leon Romanovsky <leon@kernel.org>
drivers/infiniband/hw/hns/hns_roce_hw_v2.c
drivers/infiniband/hw/hns/hns_roce_qp.c