linux/drivers/infiniband/hw
Arnd Bergmann 64b2ae74e8 IB/hfi1: use size_t for passing array length
gcc-7 produces a mysterious warning about the size argument being potentially out
of range:

drivers/infiniband/hw/hfi1/verbs.c: In function 'init_cntr_names':
drivers/infiniband/hw/hfi1/verbs.c:1644:2: error: 'memcpy': specified size between 18446744071562067968 and 18446744073709551615 exceeds maximum object size 9223372036854775807 [-Werror=stringop-overflow=]

This seems to refer to a the case where an 64-bit size_t gets truncated
into a negative 'int' and subsequently turned into a high 64-bit number
again.

The fix is clearly to use size_t here, which matches the type that gets
used for this value elsewhere.

Fixes: b7481944b0 ("IB/hfi1: Show statistics counters under IB stats interface")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Reviewed-by: Leon Romanovsky <leonro@mellanox.com>
Signed-off-by: Doug Ledford <dledford@redhat.com>
2017-02-19 09:18:47 -05:00
..
bnxt_re RDMA/bnxt_re: Add bnxt_re driver build support 2017-02-14 09:51:28 -05:00
cxgb3 RDMA/core: Add the function ib_mtu_int_to_enum 2017-01-24 15:34:22 -05:00
cxgb4 iw_cxgb4: clean up send_connect() 2017-02-19 09:18:30 -05:00
hfi1 IB/hfi1: use size_t for passing array length 2017-02-19 09:18:47 -05:00
hns Merge branch 'mlx' into merge-test 2016-12-14 14:44:25 -05:00
i40iw Merge branch 'k.o/for-4.10-rc' into HEAD 2017-02-19 09:18:21 -05:00
mlx4 RDMA: Adding ethertype ETH_P_IBOE 2017-01-10 14:05:11 -05:00
mlx5 Updates for 4.10 kernel merge window 2016-12-15 12:03:32 -08:00
mthca IB/mthca: switch to pci_alloc_irq_vectors 2017-02-19 09:18:45 -05:00
nes Merge branch 'k.o/for-4.10-rc' into HEAD 2017-02-19 09:18:21 -05:00
ocrdma RDMA/ocrdma: Replace BUG() with BUG_ON() 2017-01-12 12:21:52 -05:00
qedr Merge branch 'k.o/for-4.10-rc' into HEAD 2017-02-19 09:18:21 -05:00
qib IB/hfi1, qib, rdmavt: Move AETH defines to rdma/ib_hdrs.h 2017-02-19 09:18:44 -05:00
usnic RDMA: Adding ethertype ETH_P_IBOE 2017-01-10 14:05:11 -05:00
vmw_pvrdma Merge branch 'k.o/for-4.10-rc' into HEAD 2017-02-19 09:18:21 -05:00
Makefile RDMA/bnxt_re: Add bnxt_re driver build support 2017-02-14 09:51:28 -05:00