ixgbe: Explicitly initialize reference count to 0
Subsystems (3)
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.
--- drivers/net/ethernet/intel/ixgbe/ixgbe_fcoe.c | 1 + 1 file changed, 1 insertion(+)
drivers/net/ethernet/intel/ixgbe/ixgbe_fcoe.c +1 -0
@@ -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) {
Signature · 1 line
2.20.1
Quoted 10 lines
-----Original Message-----
From: Intel-wired-lan [mailto:intel-wired-lan-bounces at osuosl.org] On Behalf Of Chuhong Yuan
Sent: Friday, August 2, 2019 3:55 AM
Cc: netdev at vger.kernel.org; Chuhong Yuan <[email protected]>; linux- kernel at vger.kernel.org; intel-wired-lan at lists.osuosl.org; David S . Miller <[email protected]>
Subject: [Intel-wired-lan] [PATCH 1/2] ixgbe: Explicitly initialize reference count to 0
Quoted 8 lines
The driver does not explicitly call
atomic_setto initialize refcount to 0. Add the call so that it will be more straight forward to convert refcount fromatomic_ttorefcount_t.Signed-off-by Chuhong Yuan <[email protected]>--- drivers/net/ethernet/intel/ixgbe/ixgbe_fcoe.c | 1 + 1 file changed, 1 insertion(+)
Quoted 15 lines · AndrewX
Quoted 15 lines
-----Original Message-----
From: Intel-wired-lan [mailto:intel-wired-lan-bounces at osuosl.org] On Behalf Of Chuhong Yuan
Sent: Friday, August 2, 2019 3:55 AM
Cc: netdev at vger.kernel.org; Chuhong Yuan <[email protected]>; linux- kernel at vger.kernel.org; intel-wired-lan at lists.osuosl.org; David S . Miller <[email protected]>
Subject: [Intel-wired-lan] [PATCH 1/2] ixgbe: Explicitly initialize reference count to 0The driver does not explicitly call
atomic_setto initialize refcount to 0. Add the call so that it will be more straight forward to convert refcount fromatomic_ttorefcount_t.
Quoted 6 lines
Quoted 4 lines
Signed-off-by Chuhong Yuan <[email protected]>--- drivers/net/ethernet/intel/ixgbe/ixgbe_fcoe.c | 1 + 1 file changed, 1 insertion(+)Tested-by Andrew Bowers <[email protected]>
NAK. This patch is badly broken. We should not be resetting the fcoe refcnt in ixgbe_setup_fcoe_ddp_resources.