Re: [PATCH][next] RDMA/bnxt_re: fix sizeof mismatch for allocation of pbl_tbl.
From: Jason Gunthorpe
Date: Tue Oct 06 2020 - 15:57:18 EST
On Tue, Oct 06, 2020 at 12:47:00PM +0100, Colin King wrote:
> From: Colin Ian King <colin.king@xxxxxxxxxxxxx>
>
> An incorrect sizeof is being used, u64 * is not correct, it should be
> just u64 for a table of umem_pgs number of u64 items in the pbl_tbl.
> Use the idiom sizeof(*pbl_tbl) to get the object type without the need
> to explicitly use u64.
>
> Addresses-Coverity: ("Sizeof not portable (SIZEOF_MISMATCH)")
> Fixes: 1ac5a4047975 ("RDMA/bnxt_re: Add bnxt_re RoCE driver")
> Signed-off-by: Colin Ian King <colin.king@xxxxxxxxxxxxx>
> ---
> drivers/infiniband/hw/bnxt_re/ib_verbs.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
Applied to for-next, thanks
Jason