diff options
author | Chuhong Yuan <hslester96@gmail.com> | 2019-08-06 10:58:54 +0800 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2019-08-08 18:12:17 -0700 |
commit | ad2dcba008a4a24a39ba39300a460bec2f73fd04 (patch) | |
tree | 8300287b526ed9f49c70bb2d5fb98173559a62b0 /drivers/net/ethernet/chelsio/cxgb4/smt.h | |
parent | cxgb4: smt: Add lock for atomic_dec_and_test (diff) | |
download | linux-dev-ad2dcba008a4a24a39ba39300a460bec2f73fd04.tar.xz linux-dev-ad2dcba008a4a24a39ba39300a460bec2f73fd04.zip |
cxgb4: smt: Use normal int for refcount
All refcount operations are protected by spinlocks now.
Then the atomic counter can be replaced by a normal int.
This patch depends on PATCH 1/2.
Signed-off-by: Chuhong Yuan <hslester96@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/chelsio/cxgb4/smt.h')
-rw-r--r-- | drivers/net/ethernet/chelsio/cxgb4/smt.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/net/ethernet/chelsio/cxgb4/smt.h b/drivers/net/ethernet/chelsio/cxgb4/smt.h index d6c2cc271398..1268d6e93a47 100644 --- a/drivers/net/ethernet/chelsio/cxgb4/smt.h +++ b/drivers/net/ethernet/chelsio/cxgb4/smt.h @@ -59,7 +59,7 @@ struct smt_entry { u16 idx; u16 pfvf; u8 src_mac[ETH_ALEN]; - atomic_t refcnt; + int refcnt; spinlock_t lock; /* protect smt entry add,removal */ }; |