aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDavid S. Miller <davem@davemloft.net>2017-11-02 16:15:26 +0900
committerDavid S. Miller <davem@davemloft.net>2017-11-02 16:15:26 +0900
commit07d3c4afc55870a4445d322adf4190463580da7d (patch)
treee4d9a17131a6042c3b2647bf2b4afb3bc56c98a3
parentbpf: cpumap micro-optimization in cpu_map_enqueue (diff)
parentnet: dpaa: remove init which already done in per-cpu allocation (diff)
downloadlinux-dev-07d3c4afc55870a4445d322adf4190463580da7d.tar.xz
linux-dev-07d3c4afc55870a4445d322adf4190463580da7d.zip
Merge branch 'dpaa-cleanups'
yuan linyu says: ==================== net: dpaa: two minor cleanup original i try to remove duplicate code which clean allocated per-cpu area, thanks to David S. Miller, there are two build warning as errors. path 1: fix old code maybe-uninitialized warning. path 2: remove duplicate code and fix unused var warning. ==================== Signed-off-by: David S. Miller <davem@davemloft.net>
-rw-r--r--drivers/net/ethernet/freescale/dpaa/dpaa_eth.c8
1 files changed, 2 insertions, 6 deletions
diff --git a/drivers/net/ethernet/freescale/dpaa/dpaa_eth.c b/drivers/net/ethernet/freescale/dpaa/dpaa_eth.c
index a8d0be824149..969f6b12952e 100644
--- a/drivers/net/ethernet/freescale/dpaa/dpaa_eth.c
+++ b/drivers/net/ethernet/freescale/dpaa/dpaa_eth.c
@@ -2468,7 +2468,8 @@ static int dpaa_open(struct net_device *net_dev)
mac_dev = priv->mac_dev;
dpaa_eth_napi_enable(priv);
- if (dpaa_phy_init(net_dev))
+ err = dpaa_phy_init(net_dev);
+ if (err)
goto phy_init_failed;
for (i = 0; i < ARRAY_SIZE(mac_dev->port); i++) {
@@ -2668,7 +2669,6 @@ static inline u16 dpaa_get_headroom(struct dpaa_buffer_layout *bl)
static int dpaa_eth_probe(struct platform_device *pdev)
{
struct dpaa_bp *dpaa_bps[DPAA_BPS_NUM] = {NULL};
- struct dpaa_percpu_priv *percpu_priv;
struct net_device *net_dev = NULL;
struct dpaa_fq *dpaa_fq, *tmp;
struct dpaa_priv *priv = NULL;
@@ -2814,10 +2814,6 @@ static int dpaa_eth_probe(struct platform_device *pdev)
err = -ENOMEM;
goto free_dpaa_fqs;
}
- for_each_possible_cpu(i) {
- percpu_priv = per_cpu_ptr(priv->percpu_priv, i);
- memset(percpu_priv, 0, sizeof(*percpu_priv));
- }
priv->num_tc = 1;
netif_set_real_num_tx_queues(net_dev, priv->num_tc * DPAA_TC_TXQ_NUM);