From 86f3ff3e65faa4039faec7ee38951ba9116bbd24 Mon Sep 17 00:00:00 2001 From: Jeevan Shriram Date: Tue, 26 Jan 2021 14:27:28 -0800 Subject: [PATCH] drivers: net: remove unused variables and functions Remove unused variables and functions from ethernet drivers. Change-Id: If0dc76072e8d4501d86fc503c79562682a5164b5 Signed-off-by: Jeevan Shriram --- .../ethernet/aquantia/atlantic-fwd/atl_ipa.c | 28 +------------------ drivers/platform/msm/ethernet/ipa_eth_pci.c | 1 - 2 files changed, 1 insertion(+), 28 deletions(-) diff --git a/drivers/net/ethernet/aquantia/atlantic-fwd/atl_ipa.c b/drivers/net/ethernet/aquantia/atlantic-fwd/atl_ipa.c index c85f6f7bb504..c31457c208e8 100644 --- a/drivers/net/ethernet/aquantia/atlantic-fwd/atl_ipa.c +++ b/drivers/net/ethernet/aquantia/atlantic-fwd/atl_ipa.c @@ -250,7 +250,6 @@ static void aqc_ipa_notify_cb(void *priv, struct aqo_device *aqo_dev = priv; struct sk_buff *skb = (struct sk_buff *)data; struct net_device *net_dev = to_ndev(aqo_dev); - struct iphdr *ip; if (evt != IPA_RECEIVE) return; @@ -267,14 +266,6 @@ static void aqc_ipa_notify_cb(void *priv, netif_rx_ni(skb); } -static void aqc_ipa_get_ecm_msg(struct ipa_ecm_msg *msg, - struct net_device *net_dev) - -{ - strlcpy(msg->name, net_dev->name, IPA_RESOURCE_NAME_MAX); - msg->ifindex = net_dev->ifindex; -} - static int aqc_match_pci(struct device *dev) { struct pci_dev *pci_dev = container_of(dev, struct pci_dev, dev); @@ -498,7 +489,6 @@ static void aqc_teardown_ring(struct aqo_device *aqo_dev, struct aqc_ch_info *ch_info) { struct atl_fwd_mem_ops *mem_ops = ch_info->ring->mem_ops; - struct atl_nic *nic = (struct atl_nic *)dev_get_drvdata(aqo_dev->eth_dev->dev); atl_fwd_disable_ring(ch_info->ring); aqc_deinit_pipe_info(&ch_info->pipe_info); @@ -513,8 +503,6 @@ static int aqc_setup_ring(struct aqo_device *aqo_dev, int ring_flags, struct aqc_ch_info *ch_info) { struct net_device *ndev = to_ndev(aqo_dev); - int ret = 0; - struct atl_nic *nic = (struct atl_nic *)dev_get_drvdata(aqo_dev->eth_dev->dev); struct atl_fwd_mem_ops *mem_ops = NULL; mem_ops = kzalloc(sizeof(*mem_ops), GFP_KERNEL); @@ -913,7 +901,6 @@ int aqo_netdev_rxflow_reset(struct aqo_device *aqo_dev) static int aqc_start_tx(struct ipa_eth_device *eth_dev) { struct aqo_device *aqo_dev = eth_dev->od_priv; - int ret = 0; struct atl_nic *nic = (struct atl_nic *)dev_get_drvdata(eth_dev->dev); if (setup_aqc_rings(aqo_dev)) { @@ -1010,19 +997,6 @@ static int aqo_clear_stats(struct ipa_eth_device *eth_dev) return 0; } -static size_t aqc_regs_save(struct aqo_device *aqo_dev, - struct aqc_regs *regs) -{ - regs->begin_ktime = ktime_get(); - - regs->end_ktime = ktime_get(); - - regs->duration_ns = - ktime_to_ns(ktime_sub(regs->end_ktime, regs->begin_ktime)); - - return 0; -} - static int aqo_save_regs(struct ipa_eth_device *eth_dev, void **regs, size_t *size) { @@ -1035,7 +1009,7 @@ static int atl_ipa_open_device(struct ipa_eth_device *eth_dev) struct atl_nic *nic = (struct atl_nic *)dev_get_drvdata(eth_dev->dev); if (!eth_dev || !eth_dev->dev) { - aqo_log_err(aqo_dev, "Invalid ethernet device structure"); + pr_err("%s: Invalid ethernet device structure\n", __func__); return -EFAULT; } diff --git a/drivers/platform/msm/ethernet/ipa_eth_pci.c b/drivers/platform/msm/ethernet/ipa_eth_pci.c index 6a2a477b4e4c..9c6a862bc878 100644 --- a/drivers/platform/msm/ethernet/ipa_eth_pci.c +++ b/drivers/platform/msm/ethernet/ipa_eth_pci.c @@ -176,7 +176,6 @@ static struct ipa_eth_device *ipa_eth_pci_alloc_device( static void ipa_eth_pci_free_device(struct ipa_eth_device *eth_dev) { - struct device *dev = eth_dev->dev; struct ipa_eth_pci_device *eth_pdev = eth_dev->bus_priv; if (eth_pdev) {