[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20190802105457.16596-1-hslester96@gmail.com>
Date: Fri, 2 Aug 2019 18:54:57 +0800
From: Chuhong Yuan <hslester96@...il.com>
To: unlisted-recipients:; (no To-header on input)
Cc: Jeff Kirsher <jeffrey.t.kirsher@...el.com>,
"David S . Miller" <davem@...emloft.net>,
intel-wired-lan@...ts.osuosl.org, netdev@...r.kernel.org,
linux-kernel@...r.kernel.org, Chuhong Yuan <hslester96@...il.com>
Subject: [PATCH 1/2] ixgbe: Explicitly initialize reference count to 0
The driver does not explicitly call atomic_set to initialize
refcount to 0.
Add the call so that it will be more straight forward to
convert refcount from atomic_t to refcount_t.
Signed-off-by: Chuhong Yuan <hslester96@...il.com>
---
drivers/net/ethernet/intel/ixgbe/ixgbe_fcoe.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/net/ethernet/intel/ixgbe/ixgbe_fcoe.c b/drivers/net/ethernet/intel/ixgbe/ixgbe_fcoe.c
index ccd852ad62a4..00710f43cfd2 100644
--- a/drivers/net/ethernet/intel/ixgbe/ixgbe_fcoe.c
+++ b/drivers/net/ethernet/intel/ixgbe/ixgbe_fcoe.c
@@ -773,6 +773,7 @@ int ixgbe_setup_fcoe_ddp_resources(struct ixgbe_adapter *adapter)
fcoe->extra_ddp_buffer = buffer;
fcoe->extra_ddp_buffer_dma = dma;
+ atomic_set(&fcoe->refcnt, 0);
/* allocate pci pool for each cpu */
for_each_possible_cpu(cpu) {
--
2.20.1
Powered by blists - more mailing lists