]> asedeno.scripts.mit.edu Git - linux.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)
commit0161b9505ab59d4bfc0de66073c9240d1b05040d
treeb5e33328bc414612fa62f4c3f7afdb2de083ebc3
parent4cdc35e4ebf2e6b1cf4fe028eb9e711723f9199a
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