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 |
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 --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;