diff mbox series

net: ethernet: 8390: axnet_cs: remove unused xfer_count variable

Message ID 20230327235423.1777590-1-trix@redhat.com (mailing list archive)
State Accepted
Commit e48cefb9c8d1308cd64c40ebabfd51d79bf6e93b
Delegated to: Netdev Maintainers
Headers show
Series net: ethernet: 8390: axnet_cs: remove unused xfer_count variable | expand

Checks

Context Check Description
netdev/series_format warning Single patches do not need cover letters; Target tree name not specified in the subject
netdev/tree_selection success Guessed tree name to be net-next
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: 19 this patch: 19
netdev/cc_maintainers success CCed 9 of 9 maintainers
netdev/build_clang success Errors and warnings before: 18 this patch: 18
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: 19 this patch: 19
netdev/checkpatch warning WARNING: drivers/net/ethernet/8390/axnet_cs.c is marked as 'obsolete' in the MAINTAINERS hierarchy. No unnecessary modifications please.
netdev/kdoc success Errors and warnings before: 0 this patch: 0
netdev/source_inline success Was 0 now: 0

Commit Message

Tom Rix March 27, 2023, 11:54 p.m. UTC
clang with W=1 reports
drivers/net/ethernet/8390/axnet_cs.c:653:9: error: variable
  'xfer_count' set but not used [-Werror,-Wunused-but-set-variable]
    int xfer_count = count;
        ^
This variable is not used so remove it.

Signed-off-by: Tom Rix <trix@redhat.com>
---
 drivers/net/ethernet/8390/axnet_cs.c | 3 ---
 1 file changed, 3 deletions(-)

Comments

Simon Horman March 28, 2023, 5:57 p.m. UTC | #1
On Mon, Mar 27, 2023 at 07:54:23PM -0400, Tom Rix wrote:
> clang with W=1 reports
> drivers/net/ethernet/8390/axnet_cs.c:653:9: error: variable
>   'xfer_count' set but not used [-Werror,-Wunused-but-set-variable]
>     int xfer_count = count;
>         ^
> This variable is not used so remove it.
> 
> Signed-off-by: Tom Rix <trix@redhat.com>

Reviewed-by: Simon Horman <simon.horman@corigine.com>
patchwork-bot+netdevbpf@kernel.org March 29, 2023, 7 a.m. UTC | #2
Hello:

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

On Mon, 27 Mar 2023 19:54:23 -0400 you wrote:
> clang with W=1 reports
> drivers/net/ethernet/8390/axnet_cs.c:653:9: error: variable
>   'xfer_count' set but not used [-Werror,-Wunused-but-set-variable]
>     int xfer_count = count;
>         ^
> This variable is not used so remove it.
> 
> [...]

Here is the summary with links:
  - net: ethernet: 8390: axnet_cs: remove unused xfer_count variable
    https://git.kernel.org/netdev/net-next/c/e48cefb9c8d1

You are awesome, thank you!
diff mbox series

Patch

diff --git a/drivers/net/ethernet/8390/axnet_cs.c b/drivers/net/ethernet/8390/axnet_cs.c
index 3aef959fc25b..78f985885547 100644
--- a/drivers/net/ethernet/8390/axnet_cs.c
+++ b/drivers/net/ethernet/8390/axnet_cs.c
@@ -650,7 +650,6 @@  static void block_input(struct net_device *dev, int count,
 {
     unsigned int nic_base = dev->base_addr;
     struct ei_device *ei_local = netdev_priv(dev);
-    int xfer_count = count;
     char *buf = skb->data;
 
     if ((netif_msg_rx_status(ei_local)) && (count != 4))
@@ -662,9 +661,7 @@  static void block_input(struct net_device *dev, int count,
     insw(nic_base + AXNET_DATAPORT,buf,count>>1);
     if (count & 0x01) {
 	buf[count-1] = inb(nic_base + AXNET_DATAPORT);
-	xfer_count++;
     }
-
 }
 
 /*====================================================================*/