diff options
author | Christophe Jaillet <[email protected]> | 2016-08-26 07:16:17 +0200 |
---|---|---|
committer | Doug Ledford <[email protected]> | 2016-09-02 13:46:12 -0400 |
commit | fffd68734dc685e208e86d8c5f6522cd695a8d60 (patch) | |
tree | 723bac04af6853bbbde4c544afa5b4cfc32b5ba5 /tools/perf/util/trace-event-scripting.c | |
parent | 61a28d2b690a8b6c383a075a12d62d711850f9d7 (diff) |
IB/mlx5: Fix the size parameter to find_first_bit
The 2nd parameter of 'find_first_bit' is the number of bits to search.
In this case, we are passing 'sizeof(tmp)' which is likely to be 4 or 8
because 'tmp' is an 'unsigned long'.
It is likely that the number of bits of 'tmp' was expected here. So use
BITS_PER_LONG instead.
It has been spotted by the following coccinelle script:
@@
expression ret, x;
@@
* ret = \(find_first_bit \| find_first_zero_bit\) (x, sizeof(...));
Signed-off-by: Christophe JAILLET <[email protected]>
Acked-by: Majd Dibbiny <[email protected]>
Acked-by: Leon Romanovsky <[email protected]>
Signed-off-by: Doug Ledford <[email protected]>
Diffstat (limited to 'tools/perf/util/trace-event-scripting.c')
0 files changed, 0 insertions, 0 deletions