diff mbox series

[2/2] igbvf: remove unused spinlock

Message ID 20240920185918.616302-3-wander@redhat.com (mailing list archive)
State Awaiting Upstream
Delegated to: Netdev Maintainers
Headers show
Series Fixes in igbvf driver | expand

Checks

Context Check Description
netdev/series_format warning Target tree name not specified in the subject
netdev/tree_selection success Guessed tree name to be net-next
netdev/ynl success Generated files up to date; no warnings/errors; no diff in generated;
netdev/fixes_present success Fixes tag not required for -next series
netdev/header_inline success No static functions without inline keyword in header files
netdev/build_32bit success Errors and warnings before: 16 this patch: 16
netdev/build_tools success No tools touched, skip
netdev/cc_maintainers success CCed 7 of 7 maintainers
netdev/build_clang success Errors and warnings before: 16 this patch: 16
netdev/verify_signedoff success Signed-off-by tag matches author and committer
netdev/deprecated_api success None detected
netdev/check_selftest success No net selftest shell script
netdev/verify_fixes success No Fixes tag
netdev/build_allmodconfig_warn success Errors and warnings before: 16 this patch: 16
netdev/checkpatch success total: 0 errors, 0 warnings, 0 checks, 27 lines checked
netdev/build_clang_rust success No Rust files in patch. Skipping build
netdev/kdoc success Errors and warnings before: 20 this patch: 20
netdev/source_inline success Was 0 now: 0
netdev/contest success net-next-2024-09-21--06-00 (tests: 764)

Commit Message

Wander Lairson Costa Sept. 20, 2024, 6:59 p.m. UTC
tx_queue_lock and stats_lock are declared and initialized, but never
used. Remove them.

Signed-off-by: Wander Lairson Costa <wander@redhat.com>
---
 drivers/net/ethernet/intel/igbvf/igbvf.h  | 3 ---
 drivers/net/ethernet/intel/igbvf/netdev.c | 3 ---
 2 files changed, 6 deletions(-)

Comments

Paul Menzel Sept. 21, 2024, 12:52 p.m. UTC | #1
Dear Wander,


Thank you for your patch.

Am 20.09.24 um 20:59 schrieb Wander Lairson Costa:
> tx_queue_lock and stats_lock are declared and initialized, but never
> used. Remove them.
> 
> Signed-off-by: Wander Lairson Costa <wander@redhat.com>

It’d be great if you added a Fixes: tag.

> ---
>   drivers/net/ethernet/intel/igbvf/igbvf.h  | 3 ---
>   drivers/net/ethernet/intel/igbvf/netdev.c | 3 ---
>   2 files changed, 6 deletions(-)
> 
> diff --git a/drivers/net/ethernet/intel/igbvf/igbvf.h b/drivers/net/ethernet/intel/igbvf/igbvf.h
> index 6ad35a00a287..ca6e44245a7b 100644
> --- a/drivers/net/ethernet/intel/igbvf/igbvf.h
> +++ b/drivers/net/ethernet/intel/igbvf/igbvf.h
> @@ -169,8 +169,6 @@ struct igbvf_adapter {
>   	u16 link_speed;
>   	u16 link_duplex;
>   
> -	spinlock_t tx_queue_lock; /* prevent concurrent tail updates */
> -
>   	/* track device up/down/testing state */
>   	unsigned long state;
>   
> @@ -220,7 +218,6 @@ struct igbvf_adapter {
>   	/* OS defined structs */
>   	struct net_device *netdev;
>   	struct pci_dev *pdev;
> -	spinlock_t stats_lock; /* prevent concurrent stats updates */
>   
>   	/* structs defined in e1000_hw.h */
>   	struct e1000_hw hw;
> diff --git a/drivers/net/ethernet/intel/igbvf/netdev.c b/drivers/net/ethernet/intel/igbvf/netdev.c
> index 925d7286a8ee..02044aa2181b 100644
> --- a/drivers/net/ethernet/intel/igbvf/netdev.c
> +++ b/drivers/net/ethernet/intel/igbvf/netdev.c
> @@ -1656,12 +1656,9 @@ static int igbvf_sw_init(struct igbvf_adapter *adapter)
>   	if (igbvf_alloc_queues(adapter))
>   		return -ENOMEM;
>   
> -	spin_lock_init(&adapter->tx_queue_lock);
> -
>   	/* Explicitly disable IRQ since the NIC can be in any state. */
>   	igbvf_irq_disable(adapter);
>   
> -	spin_lock_init(&adapter->stats_lock);
>   	spin_lock_init(&adapter->hw.mbx_lock);
>   
>   	set_bit(__IGBVF_DOWN, &adapter->state);

With that addressed:

Reviewed-by: Paul Menzel <pmenzel@molgen.mpg.de>


Kind regards,

Paul
Przemek Kitszel Sept. 23, 2024, 9:02 a.m. UTC | #2
On 9/21/24 14:52, Paul Menzel wrote:
> Dear Wander,
> 
> 
> Thank you for your patch.
> 
> Am 20.09.24 um 20:59 schrieb Wander Lairson Costa:
>> tx_queue_lock and stats_lock are declared and initialized, but never
>> used. Remove them.
>>
>> Signed-off-by: Wander Lairson Costa <wander@redhat.com>
> 
> It’d be great if you added a Fixes: tag.

Alternatively you could split this series into two, and send this patch
to iwl-next tree, without the fixes tag. For me this patch is just
a cleanup, not a fix.

> 

[...]

> 
> With that addressed:
> 
> Reviewed-by: Paul Menzel <pmenzel@molgen.mpg.de>
> 
> 
> Kind regards,
> 
> Paul
Wander Lairson Costa Sept. 23, 2024, 4:46 p.m. UTC | #3
On Mon, Sep 23, 2024 at 6:04 AM Przemek Kitszel
<przemyslaw.kitszel@intel.com> wrote:
>
> On 9/21/24 14:52, Paul Menzel wrote:
> > Dear Wander,
> >
> >
> > Thank you for your patch.
> >
> > Am 20.09.24 um 20:59 schrieb Wander Lairson Costa:
> >> tx_queue_lock and stats_lock are declared and initialized, but never
> >> used. Remove them.
> >>
> >> Signed-off-by: Wander Lairson Costa <wander@redhat.com>
> >
> > It’d be great if you added a Fixes: tag.
>
> Alternatively you could split this series into two, and send this patch
> to iwl-next tree, without the fixes tag. For me this patch is just
> a cleanup, not a fix.
>
> >
>

Should I send a new version of the patches separately?

> [...]
>
> >
> > With that addressed:
> >
> > Reviewed-by: Paul Menzel <pmenzel@molgen.mpg.de>
> >
> >
> > Kind regards,
> >
> > Paul
>
Tony Nguyen Sept. 23, 2024, 6:44 p.m. UTC | #4
On 9/23/2024 9:46 AM, Wander Lairson Costa wrote:
> On Mon, Sep 23, 2024 at 6:04 AM Przemek Kitszel
> <przemyslaw.kitszel@intel.com> wrote:
>>
>> On 9/21/24 14:52, Paul Menzel wrote:
>>> Dear Wander,
>>>
>>>
>>> Thank you for your patch.
>>>
>>> Am 20.09.24 um 20:59 schrieb Wander Lairson Costa:
>>>> tx_queue_lock and stats_lock are declared and initialized, but never
>>>> used. Remove them.
>>>>
>>>> Signed-off-by: Wander Lairson Costa <wander@redhat.com>
>>>
>>> It’d be great if you added a Fixes: tag.
>>
>> Alternatively you could split this series into two, and send this patch
>> to iwl-next tree, without the fixes tag. For me this patch is just
>> a cleanup, not a fix.
>>
>>>
>>
> 
> Should I send a new version of the patches separately?

The patches apply to the respective trees when split out so I can take 
these without a re-send. Patch 1 will need a Fixes: for it though...

I'm seeing it as: 9d5c824399de ("igb: PCI-Express 82575 Gigabit Ethernet 
driver")?

Thanks,
Tony

>> [...]
>>
>>>
>>> With that addressed:
>>>
>>> Reviewed-by: Paul Menzel <pmenzel@molgen.mpg.de>
>>>
>>>
>>> Kind regards,
>>>
>>> Paul
>>
>
Wander Lairson Costa Sept. 24, 2024, 11:21 a.m. UTC | #5
On Mon, Sep 23, 2024 at 3:44 PM Tony Nguyen <anthony.l.nguyen@intel.com> wrote:
>
>
>
> On 9/23/2024 9:46 AM, Wander Lairson Costa wrote:
> > On Mon, Sep 23, 2024 at 6:04 AM Przemek Kitszel
> > <przemyslaw.kitszel@intel.com> wrote:
> >>
> >> On 9/21/24 14:52, Paul Menzel wrote:
> >>> Dear Wander,
> >>>
> >>>
> >>> Thank you for your patch.
> >>>
> >>> Am 20.09.24 um 20:59 schrieb Wander Lairson Costa:
> >>>> tx_queue_lock and stats_lock are declared and initialized, but never
> >>>> used. Remove them.
> >>>>
> >>>> Signed-off-by: Wander Lairson Costa <wander@redhat.com>
> >>>
> >>> It’d be great if you added a Fixes: tag.
> >>
> >> Alternatively you could split this series into two, and send this patch
> >> to iwl-next tree, without the fixes tag. For me this patch is just
> >> a cleanup, not a fix.
> >>
> >>>
> >>
> >
> > Should I send a new version of the patches separately?
>
> The patches apply to the respective trees when split out so I can take
> these without a re-send. Patch 1 will need a Fixes: for it though...
>
> I'm seeing it as: 9d5c824399de ("igb: PCI-Express 82575 Gigabit Ethernet
> driver")?
>

Can you add the tag when you apply the patch or should I add it?

> Thanks,
> Tony
>
> >> [...]
> >>
> >>>
> >>> With that addressed:
> >>>
> >>> Reviewed-by: Paul Menzel <pmenzel@molgen.mpg.de>
> >>>
> >>>
> >>> Kind regards,
> >>>
> >>> Paul
> >>
> >
>
Jacob Keller Oct. 21, 2024, 10:57 p.m. UTC | #6
On 9/24/2024 4:21 AM, Wander Lairson Costa wrote:
> On Mon, Sep 23, 2024 at 3:44 PM Tony Nguyen <anthony.l.nguyen@intel.com> wrote:
>>
>>
>>
>> On 9/23/2024 9:46 AM, Wander Lairson Costa wrote:
>>> On Mon, Sep 23, 2024 at 6:04 AM Przemek Kitszel
>>> <przemyslaw.kitszel@intel.com> wrote:
>>>>
>>>> On 9/21/24 14:52, Paul Menzel wrote:
>>>>> Dear Wander,
>>>>>
>>>>>
>>>>> Thank you for your patch.
>>>>>
>>>>> Am 20.09.24 um 20:59 schrieb Wander Lairson Costa:
>>>>>> tx_queue_lock and stats_lock are declared and initialized, but never
>>>>>> used. Remove them.
>>>>>>
>>>>>> Signed-off-by: Wander Lairson Costa <wander@redhat.com>
>>>>>
>>>>> It’d be great if you added a Fixes: tag.
>>>>
>>>> Alternatively you could split this series into two, and send this patch
>>>> to iwl-next tree, without the fixes tag. For me this patch is just
>>>> a cleanup, not a fix.
>>>>
>>>>>
>>>>
>>>
>>> Should I send a new version of the patches separately?
>>
>> The patches apply to the respective trees when split out so I can take
>> these without a re-send. Patch 1 will need a Fixes: for it though...
>>
>> I'm seeing it as: 9d5c824399de ("igb: PCI-Express 82575 Gigabit Ethernet
>> driver")?
>>
> 
> Can you add the tag when you apply the patch or should I add it?
> 

I will add the fixes tag when I said it.

Thanks,
Jake
diff mbox series

Patch

diff --git a/drivers/net/ethernet/intel/igbvf/igbvf.h b/drivers/net/ethernet/intel/igbvf/igbvf.h
index 6ad35a00a287..ca6e44245a7b 100644
--- a/drivers/net/ethernet/intel/igbvf/igbvf.h
+++ b/drivers/net/ethernet/intel/igbvf/igbvf.h
@@ -169,8 +169,6 @@  struct igbvf_adapter {
 	u16 link_speed;
 	u16 link_duplex;
 
-	spinlock_t tx_queue_lock; /* prevent concurrent tail updates */
-
 	/* track device up/down/testing state */
 	unsigned long state;
 
@@ -220,7 +218,6 @@  struct igbvf_adapter {
 	/* OS defined structs */
 	struct net_device *netdev;
 	struct pci_dev *pdev;
-	spinlock_t stats_lock; /* prevent concurrent stats updates */
 
 	/* structs defined in e1000_hw.h */
 	struct e1000_hw hw;
diff --git a/drivers/net/ethernet/intel/igbvf/netdev.c b/drivers/net/ethernet/intel/igbvf/netdev.c
index 925d7286a8ee..02044aa2181b 100644
--- a/drivers/net/ethernet/intel/igbvf/netdev.c
+++ b/drivers/net/ethernet/intel/igbvf/netdev.c
@@ -1656,12 +1656,9 @@  static int igbvf_sw_init(struct igbvf_adapter *adapter)
 	if (igbvf_alloc_queues(adapter))
 		return -ENOMEM;
 
-	spin_lock_init(&adapter->tx_queue_lock);
-
 	/* Explicitly disable IRQ since the NIC can be in any state. */
 	igbvf_irq_disable(adapter);
 
-	spin_lock_init(&adapter->stats_lock);
 	spin_lock_init(&adapter->hw.mbx_lock);
 
 	set_bit(__IGBVF_DOWN, &adapter->state);