diff options
author | Arnd Bergmann <arnd@arndb.de> | 2017-02-15 00:23:07 +0300 |
---|---|---|
committer | Doug Ledford <dledford@redhat.com> | 2017-02-19 17:18:47 +0300 |
commit | 64b2ae74e83c0294f66ab8db9c99c274fa1a5f1a (patch) | |
tree | 597f3ee26458812f465454eb646f9f3bafabf97a /net/ipx/Makefile | |
parent | 23536dfaa3ef5b4e61272ea65ed6c1b15db022ec (diff) | |
download | linux-64b2ae74e83c0294f66ab8db9c99c274fa1a5f1a.tar.xz |
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: b7481944b06e ("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>
Diffstat (limited to 'net/ipx/Makefile')
0 files changed, 0 insertions, 0 deletions