aboutsummaryrefslogtreecommitdiffstats
path: root/lib/netdev-notifier-error-inject.c
diff options
context:
space:
mode:
authorJason Gunthorpe <[email protected]>2021-09-03 13:07:28 +0000
committerJason Gunthorpe <[email protected]>2021-09-08 11:32:04 +0000
commit84f969e1c48ed3825986e91a0786e363d57f69d1 (patch)
treefa0df9b7953931d0180dba5e3b507ace303e8909 /lib/netdev-notifier-error-inject.c
parentRDMA/mlx5: Fix xlt_chunk_align calculation (diff)
downloadkernel-84f969e1c48ed3825986e91a0786e363d57f69d1.tar.gz
kernel-84f969e1c48ed3825986e91a0786e363d57f69d1.zip
IB/qib: Fix null pointer subtraction compiler warning
>> drivers/infiniband/hw/qib/qib_sysfs.c:411:1: warning: performing pointer subtraction with a null pointer has undefined behavior +[-Wnull-pointer-subtraction] QIB_DIAGC_ATTR(rc_resends); ^~~~~~~~~~~~~~~~~~~~~~~~~~ drivers/infiniband/hw/qib/qib_sysfs.c:408:51: note: expanded from macro 'QIB_DIAGC_ATTR' .counter = &((struct qib_ibport *)0)->rvp.n_##N - (u64 *)0, \ Use offsetof and accomplish the type check using static_assert. Fixes: 4a7aaf88c89f ("RDMA/qib: Use attributes for the port sysfs") Link: https://lore.kernel.org/r/[email protected] Reported-by: kernel test robot <[email protected]> Acked-by: Dennis Dalessandro <[email protected]> Signed-off-by: Jason Gunthorpe <[email protected]>
Diffstat (limited to 'lib/netdev-notifier-error-inject.c')
0 files changed, 0 insertions, 0 deletions