IB/hfi1: Fix the size parameter to find_first_bit
authorChristophe Jaillet <christophe.jaillet@wanadoo.fr>
Fri, 26 Aug 2016 04:49:09 +0000 (06:49 +0200)
committerDoug Ledford <dledford@redhat.com>
Fri, 2 Sep 2016 17:46:32 +0000 (13:46 -0400)
commit6aaa382f1267644072f288916476879684502f73
treec2f91ad0acf986642086661a44ac03ff8eaee1f9
parentfffd68734dc685e208e86d8c5f6522cd695a8d60
IB/hfi1: 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(u64)' which is 8.

It is likely that the number of bits of 'port_mask' was expected here.
Use sizeof() * 8 to get the correct number.

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>
Signed-off-by: Doug Ledford <dledford@redhat.com>
drivers/infiniband/hw/hfi1/mad.c