From mboxrd@z Thu Jan 1 00:00:00 1970 From: Paul Burton Subject: [PATCH v7 01/11] net: pch_gbe: Remove unused struct pch_gbe_adapter fields Date: Tue, 26 Jun 2018 17:06:02 -0700 Message-ID: <20180627000612.27263-2-paul.burton@mips.com> References: <20180627000612.27263-1-paul.burton@mips.com> Mime-Version: 1.0 Content-Type: text/plain Cc: "David S . Miller" , Andrew Lunn , paul.burton@mips.com To: netdev@vger.kernel.org Return-path: Received: from mail-eopbgr700099.outbound.protection.outlook.com ([40.107.70.99]:11034 "EHLO NAM04-SN1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1754591AbeF0AGd (ORCPT ); Tue, 26 Jun 2018 20:06:33 -0400 In-Reply-To: <20180627000612.27263-1-paul.burton@mips.com> Sender: netdev-owner@vger.kernel.org List-ID: 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 Cc: Andrew Lunn Cc: David S. Miller Cc: netdev@vger.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