lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20211124205225.13985-1-gerhard@engleder-embedded.com>
Date:   Wed, 24 Nov 2021 21:52:25 +0100
From:   Gerhard Engleder <gerhard@...leder-embedded.com>
To:     davem@...emloft.net, kuba@...nel.org, yang.lee@...ux.alibaba.com
Cc:     netdev@...r.kernel.org,
        Gerhard Engleder <gerhard@...leder-embedded.com>,
        kernel test robot <lkp@...el.com>,
        Abaci Robot <abaci@...ux.alibaba.com>
Subject: [PATCH net-next] tsnep: Fix resource_size cocci warning

From: Gerhard Engleder <gerhard@...leder-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@...el.com>
Reported-by: Abaci Robot <abaci@...ux.alibaba.com>
Signed-off-by: Gerhard Engleder <gerhard@...leder-embedded.com>
---
 drivers/net/ethernet/engleder/tsnep.h      | 1 -
 drivers/net/ethernet/engleder/tsnep_main.c | 1 -
 2 files changed, 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 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;
-- 
2.20.1

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ