aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/ethernet/chelsio/cxgb4/smt.h
diff options
context:
space:
mode:
authorChuhong Yuan <hslester96@gmail.com>2019-08-06 10:58:54 +0800
committerDavid S. Miller <davem@davemloft.net>2019-08-08 18:12:17 -0700
commitad2dcba008a4a24a39ba39300a460bec2f73fd04 (patch)
tree8300287b526ed9f49c70bb2d5fb98173559a62b0 /drivers/net/ethernet/chelsio/cxgb4/smt.h
parentcxgb4: smt: Add lock for atomic_dec_and_test (diff)
downloadlinux-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.h2
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 */
};