diff mbox series

[net-next] sfc/siena: Remove duplicate check on segments

Message ID 165294463549.23865.4557617334650441347.stgit@palantir17.mph.net (mailing list archive)
State Accepted
Commit cc398a34d16fd90a2dcc59b1105c634f038ea53b
Delegated to: Netdev Maintainers
Headers show
Series [net-next] sfc/siena: Remove duplicate check on segments | expand

Checks

Context Check Description
netdev/tree_selection success Clearly marked for net-next
netdev/fixes_present success Fixes tag not required for -next series
netdev/subject_prefix success Link
netdev/cover_letter success Single patches do not need cover letters
netdev/patch_count success Link
netdev/header_inline success No static functions without inline keyword in header files
netdev/build_32bit success Errors and warnings before: 1 this patch: 1
netdev/cc_maintainers success CCed 7 of 7 maintainers
netdev/build_clang success Errors and warnings before: 0 this patch: 0
netdev/module_param success Was 0 now: 0
netdev/verify_signedoff success Signed-off-by tag matches author and committer
netdev/verify_fixes success Fixes tag looks correct
netdev/build_allmodconfig_warn success Errors and warnings before: 1 this patch: 1
netdev/checkpatch success total: 0 errors, 0 warnings, 0 checks, 15 lines checked
netdev/kdoc success Errors and warnings before: 0 this patch: 0
netdev/source_inline success Was 0 now: 0

Commit Message

Martin Habets May 19, 2022, 7:17 a.m. UTC
Siena only supports software TSO. This means more code can be deleted,
as pointed out by the Smatch static checker warning:
	drivers/net/ethernet/sfc/siena/tx.c:184 __efx_siena_enqueue_skb()
	warn: duplicate check 'segments' (previous on line 158)

Fixes: 956f2d86cb37 ("sfc/siena: Remove build references to missing functionality")
Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Link: https://lore.kernel.org/kernel-janitors/YoH5tJMnwuGTrn1Z@kili/
Signed-off-by: Martin Habets <habetsm.xilinx@gmail.com>
---
 drivers/net/ethernet/sfc/siena/tx.c |    9 +--------
 1 file changed, 1 insertion(+), 8 deletions(-)

Comments

patchwork-bot+netdevbpf@kernel.org May 20, 2022, 11:50 p.m. UTC | #1
Hello:

This patch was applied to netdev/net-next.git (master)
by Jakub Kicinski <kuba@kernel.org>:

On Thu, 19 May 2022 08:17:15 +0100 you wrote:
> Siena only supports software TSO. This means more code can be deleted,
> as pointed out by the Smatch static checker warning:
> 	drivers/net/ethernet/sfc/siena/tx.c:184 __efx_siena_enqueue_skb()
> 	warn: duplicate check 'segments' (previous on line 158)
> 
> Fixes: 956f2d86cb37 ("sfc/siena: Remove build references to missing functionality")
> Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
> Link: https://lore.kernel.org/kernel-janitors/YoH5tJMnwuGTrn1Z@kili/
> Signed-off-by: Martin Habets <habetsm.xilinx@gmail.com>
> 
> [...]

Here is the summary with links:
  - [net-next] sfc/siena: Remove duplicate check on segments
    https://git.kernel.org/netdev/net-next/c/cc398a34d16f

You are awesome, thank you!
diff mbox series

Patch

diff --git a/drivers/net/ethernet/sfc/siena/tx.c b/drivers/net/ethernet/sfc/siena/tx.c
index b84b9e348c13..e166dcb9b99c 100644
--- a/drivers/net/ethernet/sfc/siena/tx.c
+++ b/drivers/net/ethernet/sfc/siena/tx.c
@@ -181,14 +181,7 @@  netdev_tx_t __efx_siena_enqueue_skb(struct efx_tx_queue *tx_queue,
 	if (__netdev_tx_sent_queue(tx_queue->core_txq, skb_len, xmit_more))
 		efx_tx_send_pending(tx_queue->channel);
 
-	if (segments) {
-		tx_queue->tso_bursts++;
-		tx_queue->tso_packets += segments;
-		tx_queue->tx_packets  += segments;
-	} else {
-		tx_queue->tx_packets++;
-	}
-
+	tx_queue->tx_packets++;
 	return NETDEV_TX_OK;