diff mbox series

[iwl-net,v1,3/4] igc: Remove unused qbv_count

Message ID 20240702040926.3327530-4-faizal.abdul.rahim@linux.intel.com (mailing list archive)
State Superseded
Delegated to: Netdev Maintainers
Headers show
Series igc bug fixes related to qbv_count usage | expand

Checks

Context Check Description
netdev/series_format success Posting correctly formatted
netdev/tree_selection success Clearly marked for net
netdev/ynl success Generated files up to date; no warnings/errors; no diff in generated;
netdev/fixes_present success Fixes tag present in non-next series
netdev/header_inline success No static functions without inline keyword in header files
netdev/build_32bit success Errors and warnings before: 856 this patch: 856
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: 862 this patch: 862
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: 860 this patch: 860
netdev/checkpatch success total: 0 errors, 0 warnings, 0 checks, 22 lines checked
netdev/build_clang_rust success No Rust files in patch. Skipping build
netdev/kdoc success Errors and warnings before: 29 this patch: 29
netdev/source_inline success Was 0 now: 0

Commit Message

Abdul Rahim, Faizal July 2, 2024, 4:09 a.m. UTC
Removing qbv_count which is now obsolete after these 2 patches:
"igc: Fix reset adapter logics when tx mode change"
"igc: Fix qbv_config_change_errors logics"

The variable qbv_count serves to indicate whether Taprio is active or if
the tx mode is in TSN (IGC_TQAVCTRL_TRANSMIT_MODE_TSN). This is due to its
unconditional increment within igc_tsn_enable_offload(), which both runs
Taprio and sets the tx mode to TSN.

Signed-off-by: Faizal Rahim <faizal.abdul.rahim@linux.intel.com>
---
 drivers/net/ethernet/intel/igc/igc.h      | 1 -
 drivers/net/ethernet/intel/igc/igc_main.c | 1 -
 drivers/net/ethernet/intel/igc/igc_tsn.c  | 2 --
 3 files changed, 4 deletions(-)

Comments

Simon Horman July 3, 2024, 3:10 p.m. UTC | #1
On Tue, Jul 02, 2024 at 12:09:25AM -0400, Faizal Rahim wrote:
> Removing qbv_count which is now obsolete after these 2 patches:
> "igc: Fix reset adapter logics when tx mode change"
> "igc: Fix qbv_config_change_errors logics"
> 
> The variable qbv_count serves to indicate whether Taprio is active or if
> the tx mode is in TSN (IGC_TQAVCTRL_TRANSMIT_MODE_TSN). This is due to its
> unconditional increment within igc_tsn_enable_offload(), which both runs
> Taprio and sets the tx mode to TSN.
> 
> Signed-off-by: Faizal Rahim <faizal.abdul.rahim@linux.intel.com>

Hi Faizal,

This change looks good to me.
However, it seems more appropriate as a clean-up for iwl-next
once the previous to patches make it there via iwl-net.

That notwithstanding,

Reviewed-by: Simon Horman <horms@kernel.org>

...
Abdul Rahim, Faizal July 5, 2024, 4:47 p.m. UTC | #2
On 3/7/2024 11:10 pm, Simon Horman wrote:
> On Tue, Jul 02, 2024 at 12:09:25AM -0400, Faizal Rahim wrote:
>> Removing qbv_count which is now obsolete after these 2 patches:
>> "igc: Fix reset adapter logics when tx mode change"
>> "igc: Fix qbv_config_change_errors logics"
>>
>> The variable qbv_count serves to indicate whether Taprio is active or if
>> the tx mode is in TSN (IGC_TQAVCTRL_TRANSMIT_MODE_TSN). This is due to its
>> unconditional increment within igc_tsn_enable_offload(), which both runs
>> Taprio and sets the tx mode to TSN.
>>
>> Signed-off-by: Faizal Rahim <faizal.abdul.rahim@linux.intel.com>
> 
> Hi Faizal,
> 
> This change looks good to me.
> However, it seems more appropriate as a clean-up for iwl-next
> once the previous to patches make it there via iwl-net.
> 
> That notwithstanding,
> 
> Reviewed-by: Simon Horman <horms@kernel.org>
> 
> ...

Got it, will do that.
Thanks.
diff mbox series

Patch

diff --git a/drivers/net/ethernet/intel/igc/igc.h b/drivers/net/ethernet/intel/igc/igc.h
index 8b14c029eda1..5fd0d85f83ac 100644
--- a/drivers/net/ethernet/intel/igc/igc.h
+++ b/drivers/net/ethernet/intel/igc/igc.h
@@ -254,7 +254,6 @@  struct igc_adapter {
 	bool taprio_offload_enable;
 	u32 qbv_config_change_errors;
 	bool qbv_transition;
-	unsigned int qbv_count;
 	/* Access to oper_gate_closed, admin_gate_closed and qbv_transition
 	 * are protected by the qbv_tx_lock.
 	 */
diff --git a/drivers/net/ethernet/intel/igc/igc_main.c b/drivers/net/ethernet/intel/igc/igc_main.c
index 0f8a5ad940ec..e7664bd81505 100644
--- a/drivers/net/ethernet/intel/igc/igc_main.c
+++ b/drivers/net/ethernet/intel/igc/igc_main.c
@@ -6246,7 +6246,6 @@  static int igc_qbv_clear_schedule(struct igc_adapter *adapter)
 	adapter->cycle_time = NSEC_PER_SEC;
 	adapter->taprio_offload_enable = false;
 	adapter->qbv_config_change_errors = 0;
-	adapter->qbv_count = 0;
 
 	for (i = 0; i < adapter->num_tx_queues; i++) {
 		struct igc_ring *ring = adapter->tx_ring[i];
diff --git a/drivers/net/ethernet/intel/igc/igc_tsn.c b/drivers/net/ethernet/intel/igc/igc_tsn.c
index 61f047ebf34d..26dbe3442ad1 100644
--- a/drivers/net/ethernet/intel/igc/igc_tsn.c
+++ b/drivers/net/ethernet/intel/igc/igc_tsn.c
@@ -267,8 +267,6 @@  static int igc_tsn_enable_offload(struct igc_adapter *adapter)
 
 	tqavctrl |= IGC_TQAVCTRL_TRANSMIT_MODE_TSN | IGC_TQAVCTRL_ENHANCED_QAV;
 
-	adapter->qbv_count++;
-
 	cycle = adapter->cycle_time;
 	base_time = adapter->base_time;