]> 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)
commit8e9f41f54692dd89f95763d164a1f0d8aa8d0d40
treeb5e33328bc414612fa62f4c3f7afdb2de083ebc3
parentbe52c9559fa2ceaffdfab89f277059d5c0d6768a
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