]> git.baikalelectronics.ru Git - kernel.git/commit
mlxsw: Fix bug in __mlxsw_item_bit_array_offset
authorIdo Schimmel <idosch@mellanox.com>
Thu, 8 Oct 2015 13:17:38 +0000 (15:17 +0200)
committerDavid S. Miller <davem@davemloft.net>
Sun, 11 Oct 2015 12:08:09 +0000 (05:08 -0700)
commit6f1f824b91b2607fc64cf396b5d78cc22a39991e
treedef6c0073fa9ac734c816f17b9fb1dd37260f939
parent7cde84cc2179b2c5efce6e3ed20c139ba8fd5d99
mlxsw: Fix bug in __mlxsw_item_bit_array_offset

When calculating the shift needed in order to access a bit array element
in a byte, we should multiply the index by the element size and not
assume it is fixed at 2-bits.

Fixes: ea8f6084ecd5 ("mlxsw: Introduce Mellanox switch driver core")
Signed-off-by: Ido Schimmel <idosch@mellanox.com>
Signed-off-by: Jiri Pirko <jiri@mellanox.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/mellanox/mlxsw/item.h