aboutsummaryrefslogtreecommitdiff
path: root/net/lapb/lapb_timer.c
diff options
context:
space:
mode:
authorJason Gunthorpe <[email protected]>2021-09-03 10:07:28 -0300
committerJason Gunthorpe <[email protected]>2021-09-08 08:32:04 -0300
commit84f969e1c48ed3825986e91a0786e363d57f69d1 (patch)
treefa0df9b7953931d0180dba5e3b507ace303e8909 /net/lapb/lapb_timer.c
parentf4c6f31011eafe027abddf6cee1288a1b5a05b73 (diff)
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 'net/lapb/lapb_timer.c')
0 files changed, 0 insertions, 0 deletions