]> git.baikalelectronics.ru Git - kernel.git/commit
mlxsw: spectrum_switchdev: Remove reference count from mid
authorNogah Frankel <nogahf@mellanox.com>
Wed, 20 Sep 2017 14:15:03 +0000 (16:15 +0200)
committerDavid S. Miller <davem@davemloft.net>
Thu, 21 Sep 2017 01:03:12 +0000 (18:03 -0700)
commitaf02a5def7a88dbb9644ba5ebcdb00b3c8d8661d
treeb5e33328bc414612fa62f4c3f7afdb2de083ebc3
parent166a1cc91d90a9b6fed5466761a523cc6b4c82c6
mlxsw: spectrum_switchdev: Remove reference count from mid

Since there is a bitmap for the ports registered to each mid, there is no
need for a ref count, since it will always be the number of set bits in
this bitmap. Any check of the ref count was replaced with checking if the
bitmap is empty.

Signed-off-by: Nogah Frankel <nogahf@mellanox.com>
Signed-off-by: Jiri Pirko <jiri@mellanox.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/mellanox/mlxsw/spectrum.h
drivers/net/ethernet/mellanox/mlxsw/spectrum_switchdev.c