diff options
author | Gerhard Engleder <gerhard@engleder-embedded.com> | 2021-11-24 21:52:25 +0100 |
---|---|---|
committer | Jakub Kicinski <kuba@kernel.org> | 2021-11-24 17:09:13 -0800 |
commit | 1aad9634b94ef65d72110a6fc6625c890db9667c (patch) | |
tree | 1235146a3dde8d7e5280ece45080bbbb56772301 | |
parent | 6a9d66a05b9b2d59bfef3d114812138aa880a6c7 (diff) | |
download | linux-stable-1aad9634b94ef65d72110a6fc6625c890db9667c.tar.gz linux-stable-1aad9634b94ef65d72110a6fc6625c890db9667c.tar.bz2 linux-stable-1aad9634b94ef65d72110a6fc6625c890db9667c.zip |
tsnep: Fix resource_size cocci warning
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>
Link: https://lore.kernel.org/r/20211124205225.13985-1-gerhard@engleder-embedded.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
-rw-r--r-- | drivers/net/ethernet/engleder/tsnep.h | 1 | ||||
-rw-r--r-- | drivers/net/ethernet/engleder/tsnep_main.c | 1 |
2 files changed, 0 insertions, 2 deletions
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 03d5b31d147c..955565a2a86c 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; |