linux/drivers/infiniband
Colin Ian King 8e71f694e0 IB/rdmavt: Fix sizeof mismatch
An incorrect sizeof is being used, struct rvt_ibport ** is not correct, it
should be struct rvt_ibport *. Note that since ** is the same size as
* this is not causing any issues.  Improve this fix by using
sizeof(*rdi->ports) as this allows us to not even reference the type
of the pointer.  Also remove line breaks as the entire statement can
fit on one line.

Link: https://lore.kernel.org/r/20201008095204.82683-1-colin.king@canonical.com
Addresses-Coverity: ("Sizeof not portable (SIZEOF_MISMATCH)")
Fixes: ff6acd6951 ("IB/rdmavt: Add device structure allocation")
Signed-off-by: Colin Ian King <colin.king@canonical.com>
Reviewed-by: Ira Weiny <ira.weiny@intel.com>
Acked-by: Dennis Dalessandro <dennis.dalessandro@cornelisnetworks.com>
Signed-off-by: Jason Gunthorpe <jgg@nvidia.com>
2020-10-08 15:14:17 -03:00
..
core RDMA/uverbs: Expose the new GID query API to user space 2020-10-01 21:20:11 -03:00
hw RDMA/bnxt_re: Fix sizeof mismatch for allocation of pbl_tbl. 2020-10-06 16:56:36 -03:00
sw IB/rdmavt: Fix sizeof mismatch 2020-10-08 15:14:17 -03:00
ulp RDMA/ipoib: Set rtnl_link_ops for ipoib interfaces 2020-10-05 15:05:45 -03:00
Kconfig IB/core: Improve ODP to use hmm_range_fault() 2020-10-01 16:39:54 -03:00
Makefile treewide: Add SPDX license identifier - Makefile/Kconfig 2019-05-21 10:50:46 +02:00