From patchwork Wed Feb 10 17:59:35 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nobuhiro Iwamatsu X-Patchwork-Id: 12081573 X-Patchwork-Delegate: kuba@kernel.org Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-16.8 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 56D40C43381 for ; Wed, 10 Feb 2021 18:06:11 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 33E2C64E6F for ; Wed, 10 Feb 2021 18:06:11 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233927AbhBJSFp (ORCPT ); Wed, 10 Feb 2021 13:05:45 -0500 Received: from mo-csw1514.securemx.jp ([210.130.202.153]:52342 "EHLO mo-csw.securemx.jp" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232369AbhBJSB5 (ORCPT ); Wed, 10 Feb 2021 13:01:57 -0500 Received: by mo-csw.securemx.jp (mx-mo-csw1514) id 11AHxdZw012724; Thu, 11 Feb 2021 02:59:39 +0900 X-Iguazu-Qid: 34tMdHaKfB3KnWgQ2C X-Iguazu-QSIG: v=2; s=0; t=1612979979; q=34tMdHaKfB3KnWgQ2C; m=w+r9R3BCnx0ieRU1JliZZ+qBHax/h5ycHAnyWnDfMIg= Received: from imx12.toshiba.co.jp (imx12.toshiba.co.jp [61.202.160.132]) by relay.securemx.jp (mx-mr1510) id 11AHxbKX015468; Thu, 11 Feb 2021 02:59:38 +0900 Received: from enc02.toshiba.co.jp ([61.202.160.51]) by imx12.toshiba.co.jp with ESMTP id 11AHxbYi005268; Thu, 11 Feb 2021 02:59:37 +0900 (JST) Received: from hop101.toshiba.co.jp ([133.199.85.107]) by enc02.toshiba.co.jp with ESMTP id 11AHxbYi020770; Thu, 11 Feb 2021 02:59:37 +0900 From: Nobuhiro Iwamatsu To: "David S . Miller" , Jakub Kicinski , Rusaimi Amira Ruslan , "Vineetha G . Jaya Kumaran" Cc: netdev@vger.kernel.org, Nobuhiro Iwamatsu Subject: [PATCH] net: stmmac: dwmac-intel-plat: remove unnecessary initialization Date: Thu, 11 Feb 2021 02:59:35 +0900 X-TSB-HOP: ON Message-Id: <20210210175935.3967631-1-nobuhiro1.iwamatsu@toshiba.co.jp> X-Mailer: git-send-email 2.27.0 MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org X-Patchwork-Delegate: kuba@kernel.org plat_dat is initialized by stmmac_probe_config_dt(). So, initialization is not required by priv->plat. This removes unnecessary initialization and variables. Signed-off-by: Nobuhiro Iwamatsu --- drivers/net/ethernet/stmicro/stmmac/dwmac-intel-plat.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/drivers/net/ethernet/stmicro/stmmac/dwmac-intel-plat.c b/drivers/net/ethernet/stmicro/stmmac/dwmac-intel-plat.c index ba0e4d2b256a..6c19fcc76c6f 100644 --- a/drivers/net/ethernet/stmicro/stmmac/dwmac-intel-plat.c +++ b/drivers/net/ethernet/stmicro/stmmac/dwmac-intel-plat.c @@ -74,8 +74,6 @@ MODULE_DEVICE_TABLE(of, intel_eth_plat_match); static int intel_eth_plat_probe(struct platform_device *pdev) { - struct net_device *ndev = platform_get_drvdata(pdev); - struct stmmac_priv *priv = netdev_priv(ndev); struct plat_stmmacenet_data *plat_dat; struct stmmac_resources stmmac_res; const struct of_device_id *match; @@ -83,7 +81,6 @@ static int intel_eth_plat_probe(struct platform_device *pdev) unsigned long rate; int ret; - plat_dat = priv->plat; ret = stmmac_get_platform_resources(pdev, &stmmac_res); if (ret) return ret;