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-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20180627000612.27263-2-paul.burton@mips.com>
Date:   Tue, 26 Jun 2018 17:06:02 -0700
From:   Paul Burton <paul.burton@...s.com>
To:     netdev@...r.kernel.org
Cc:     "David S . Miller" <davem@...emloft.net>,
        Andrew Lunn <andrew@...n.ch>, paul.burton@...s.com
Subject: [PATCH v7 01/11] net: pch_gbe: Remove unused struct pch_gbe_adapter fields

Remove a bunch of unused fields from struct pch_gbe_adapter. Among these
polling_netdev, config_space & led_status are entirely unused.
ethtool_lock is initialized but we never attempt to acquire the lock, so
that is effectively unused too. A msg_enable field was documented but
missing, so drop that from the kerneldoc comment.

Signed-off-by: Paul Burton <paul.burton@...s.com>
Cc: Andrew Lunn <andrew@...n.ch>
Cc: David S. Miller <davem@...emloft.net>
Cc: netdev@...r.kernel.org
---

Changes in v7: New patch

 drivers/net/ethernet/oki-semi/pch_gbe/pch_gbe.h      | 9 ---------
 drivers/net/ethernet/oki-semi/pch_gbe/pch_gbe_main.c | 1 -
 2 files changed, 10 deletions(-)

diff --git a/drivers/net/ethernet/oki-semi/pch_gbe/pch_gbe.h b/drivers/net/ethernet/oki-semi/pch_gbe/pch_gbe.h
index 44c2f291e766..be218ac81f21 100644
--- a/drivers/net/ethernet/oki-semi/pch_gbe/pch_gbe.h
+++ b/drivers/net/ethernet/oki-semi/pch_gbe/pch_gbe.h
@@ -555,11 +555,9 @@ struct pch_gbe_privdata {
 /**
  * struct pch_gbe_adapter - board specific private data structure
  * @stats_lock:	Spinlock structure for status
- * @ethtool_lock:	Spinlock structure for ethtool
  * @irq_sem:		Semaphore for interrupt
  * @netdev:		Pointer of network device structure
  * @pdev:		Pointer of pci device structure
- * @polling_netdev:	Pointer of polling network device structure
  * @napi:		NAPI structure
  * @hw:			Pointer of hardware structure
  * @stats:		Hardware status
@@ -567,9 +565,6 @@ struct pch_gbe_privdata {
  * @mii:		MII information structure
  * @watchdog_timer:	Watchdog timer list
  * @wake_up_evt:	Wake up event
- * @config_space:	Configuration space
- * @msg_enable:		Driver message level
- * @led_status:		LED status
  * @tx_ring:		Pointer of Tx descriptor ring structure
  * @rx_ring:		Pointer of Rx descriptor ring structure
  * @rx_buffer_len:	Receive buffer length
@@ -579,12 +574,10 @@ struct pch_gbe_privdata {
 
 struct pch_gbe_adapter {
 	spinlock_t stats_lock;
-	spinlock_t ethtool_lock;
 	atomic_t irq_sem;
 	struct net_device *netdev;
 	struct pci_dev *pdev;
 	int irq;
-	struct net_device *polling_netdev;
 	struct napi_struct napi;
 	struct pch_gbe_hw hw;
 	struct pch_gbe_hw_stats stats;
@@ -592,8 +585,6 @@ struct pch_gbe_adapter {
 	struct mii_if_info mii;
 	struct timer_list watchdog_timer;
 	u32 wake_up_evt;
-	u32 *config_space;
-	unsigned long led_status;
 	struct pch_gbe_tx_ring *tx_ring;
 	struct pch_gbe_rx_ring *rx_ring;
 	unsigned long rx_buffer_len;
diff --git a/drivers/net/ethernet/oki-semi/pch_gbe/pch_gbe_main.c b/drivers/net/ethernet/oki-semi/pch_gbe/pch_gbe_main.c
index 43c0c10dfeb7..8908ef654d94 100644
--- a/drivers/net/ethernet/oki-semi/pch_gbe/pch_gbe_main.c
+++ b/drivers/net/ethernet/oki-semi/pch_gbe/pch_gbe_main.c
@@ -1998,7 +1998,6 @@ static int pch_gbe_sw_init(struct pch_gbe_adapter *adapter)
 	}
 	spin_lock_init(&adapter->hw.miim_lock);
 	spin_lock_init(&adapter->stats_lock);
-	spin_lock_init(&adapter->ethtool_lock);
 	atomic_set(&adapter->irq_sem, 0);
 	pch_gbe_irq_disable(adapter);
 
-- 
2.18.0

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ