diff mbox series

[net-next] tsnep: Fix resource_size cocci warning

Message ID 20211124205225.13985-1-gerhard@engleder-embedded.com (mailing list archive)
State Accepted
Commit 1aad9634b94ef65d72110a6fc6625c890db9667c
Delegated to: Netdev Maintainers
Headers show
Series [net-next] tsnep: Fix resource_size cocci warning | 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: 0 this patch: 0
netdev/cc_maintainers success CCed 4 of 4 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 No Fixes tag
netdev/build_allmodconfig_warn success Errors and warnings before: 0 this patch: 0
netdev/checkpatch success total: 0 errors, 0 warnings, 0 checks, 14 lines checked
netdev/kdoc success Errors and warnings before: 0 this patch: 0
netdev/source_inline success Was 0 now: 0

Commit Message

Gerhard Engleder Nov. 24, 2021, 8:52 p.m. UTC
From: Gerhard Engleder <gerhard@engleder-embedded.com>

The following warning is fixed, by removing the unused resource size:

drivers/net/ethernet/engleder/tsnep_main.c:1155:21-24:
WARNING: Suspicious code. resource_size is maybe missing with io

Reported-by: kernel test robot <lkp@intel.com>
Reported-by: Abaci Robot <abaci@linux.alibaba.com>
Signed-off-by: Gerhard Engleder <gerhard@engleder-embedded.com>
---
 drivers/net/ethernet/engleder/tsnep.h      | 1 -
 drivers/net/ethernet/engleder/tsnep_main.c | 1 -
 2 files changed, 2 deletions(-)

Comments

patchwork-bot+netdevbpf@kernel.org Nov. 25, 2021, 1:30 a.m. UTC | #1
Hello:

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

On Wed, 24 Nov 2021 21:52:25 +0100 you wrote:
> From: Gerhard Engleder <gerhard@engleder-embedded.com>
> 
> The following warning is fixed, by removing the unused resource size:
> 
> drivers/net/ethernet/engleder/tsnep_main.c:1155:21-24:
> WARNING: Suspicious code. resource_size is maybe missing with io
> 
> [...]

Here is the summary with links:
  - [net-next] tsnep: Fix resource_size cocci warning
    https://git.kernel.org/netdev/net-next/c/1aad9634b94e

You are awesome, thank you!
diff mbox series

Patch

diff --git a/drivers/net/ethernet/engleder/tsnep.h b/drivers/net/ethernet/engleder/tsnep.h
index d19fa175e3d9..23bbece6b7de 100644
--- a/drivers/net/ethernet/engleder/tsnep.h
+++ b/drivers/net/ethernet/engleder/tsnep.h
@@ -125,7 +125,6 @@  struct tsnep_adapter {
 	struct platform_device *pdev;
 	struct device *dmadev;
 	void __iomem *addr;
-	unsigned long size;
 	int irq;
 
 	bool gate_control;
diff --git a/drivers/net/ethernet/engleder/tsnep_main.c b/drivers/net/ethernet/engleder/tsnep_main.c
index 8333313dd706..3847368adbeb 100644
--- a/drivers/net/ethernet/engleder/tsnep_main.c
+++ b/drivers/net/ethernet/engleder/tsnep_main.c
@@ -1152,7 +1152,6 @@  static int tsnep_probe(struct platform_device *pdev)
 	adapter->addr = devm_ioremap_resource(&pdev->dev, io);
 	if (IS_ERR(adapter->addr))
 		return PTR_ERR(adapter->addr);
-	adapter->size = io->end - io->start + 1;
 	adapter->irq = platform_get_irq(pdev, 0);
 	netdev->mem_start = io->start;
 	netdev->mem_end = io->end;