diff options
author | Christophe Jaillet <christophe.jaillet@wanadoo.fr> | 2016-08-26 07:16:17 +0200 |
---|---|---|
committer | Doug Ledford <dledford@redhat.com> | 2016-09-02 13:46:12 -0400 |
commit | fffd68734dc685e208e86d8c5f6522cd695a8d60 (patch) | |
tree | 723bac04af6853bbbde4c544afa5b4cfc32b5ba5 /drivers/infiniband/hw/hfi1/mad.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 <christophe.jaillet@wanadoo.fr>
Acked-by: Majd Dibbiny <majd@mellanox.com>
Acked-by: Leon Romanovsky <leonro@mellanox.com>
Signed-off-by: Doug Ledford <dledford@redhat.com>
Diffstat (limited to 'drivers/infiniband/hw/hfi1/mad.c')
0 files changed, 0 insertions, 0 deletions