Re: [PATCH] IB/hfi1: use size_t for passing array length

2017-02-19 Thread Doug Ledford
On Tue, 2017-02-14 at 22:23 +0100, Arnd Bergmann wrote: > 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 >

Re: [PATCH] IB/hfi1: use size_t for passing array length

2017-02-14 Thread Leon Romanovsky
On Tue, Feb 14, 2017 at 10:23:07PM +0100, Arnd Bergmann wrote: > 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': spec

[PATCH] IB/hfi1: use size_t for passing array length

2017-02-14 Thread Arnd Bergmann
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