Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp266393ybl; Tue, 7 Jan 2020 18:57:34 -0800 (PST) X-Google-Smtp-Source: APXvYqxtwDf9iqz6j874XM0BaFnvIYDQgsBLYT8c/tfuSF/sMZO0fDQxPo+Tv3d/sFZY1qCHtWlB X-Received: by 2002:a05:6808:683:: with SMTP id k3mr1327173oig.50.1578452254637; Tue, 07 Jan 2020 18:57:34 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1578452254; cv=none; d=google.com; s=arc-20160816; b=U58qZ/r2utD6Vne8hxpVhQ7ngGiQDVotB8MG3UodfnhaNa/uG1M5FN88UblPcPz+FC oSzQTOssaQdDWXgWljTw+WOFo1fRX19YjJvjOjbz69hPjnzn+NOLrqVQdNQuwGjKlQhQ lsv5BShDIKKAmc1WZBhtDnSAdo8J3+u2qdTNAuSDWmn/5MQsdpx5yWfcxLQs/RDLkvrU sTt1BJKuFibE2SBGFQOjHRfV7tTCut79VirMcqFfsjweZDbr290LcAqSp5g/oENOAnAm CvFT1FHGBoxI4IEg+6FCWPpMigjpZn4zmkzN42Eah9wq1MPGTLUMhdv6l4SciyNi9hhP lsbA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:cc:to:from :dkim-signature; bh=QyroB5LXjxb8iNcU2ElAPCjALtlsDRJIi4SawaB0E7c=; b=MA1Mf4t7PpkNTgGLdixlWftkcyAWMsCWrK5HNF/016urAGMv+DjlYihyNMDT56+e5S Cx8709H08o6bz6CUa0I7FUKGxtBZmjSsyLXp8TmLBNvZZi4MKQa3X3f8VVchQAE5Pn39 vLFt8CF5L9Cx8mOxhgzGv0ioeyCgUmRhnRh/vd6pCoYtsMmHnM2n6OMRviep1K2KEXJ9 6wFgiAo1RYrSsc6ofkaAJTCyCcVt3I3jGrV50wcrfP1opaxk0fFKyA+9rNmiafPZSj/Y t5IlWFAjaG1VBSzdXX8Y3A1ErWV8XNxFWwCr7yzKYPjwj0v1Kj+wv1r2nY+z/rSkoUi/ qE8Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=E3n6Gk5M; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id c19si1082588otn.7.2020.01.07.18.57.16; Tue, 07 Jan 2020 18:57:34 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=E3n6Gk5M; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726313AbgAHC4b (ORCPT + 99 others); Tue, 7 Jan 2020 21:56:31 -0500 Received: from mail-pg1-f194.google.com ([209.85.215.194]:40870 "EHLO mail-pg1-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725812AbgAHC4a (ORCPT ); Tue, 7 Jan 2020 21:56:30 -0500 Received: by mail-pg1-f194.google.com with SMTP id k25so814503pgt.7; Tue, 07 Jan 2020 18:56:30 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id; bh=QyroB5LXjxb8iNcU2ElAPCjALtlsDRJIi4SawaB0E7c=; b=E3n6Gk5MirvuWn2qz2nIHVm+5Hxjz4Nq4wAdMyekVm9lA2tuXwuqxrIjy+bHKC6aRy 29YP9weDLGP7P9gpfg+rJTz8bKsZdziuhhe78aqk5P0FQYw1x1Cxt19eIwU3FiJ6Y/k7 NwXUcOVepPCx6qcmZeR+tgGPaRqDgKb8TnZr5eOO6Qw/aIROygskXs0fAuif0zs0puaX h/4PakQlPNNXEue27pSySzbAqBiXhfLYjmtKEBgQj+uimEl4Q+aHoJ78jWSQW04VJ+Z7 glvcWowQ6cbxVX7rUq4/7W7IeFANAJQqoleuAoftLI05xvciZ6epm3pCB+V5Xm/OFS0B 6TWQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=QyroB5LXjxb8iNcU2ElAPCjALtlsDRJIi4SawaB0E7c=; b=Tsys2dIjoPGjgqC9hm8y7YPb1jfid5PTLacHU/Oifn0puzzfXN4PLKIF5oMh1xYMlO Lhi2qt31xkQ7Br3iGsoXhO6pYLwdNxy251rs+sv1o4gvvwWqOXse7nt4cco/VOddEF1O 0Ct8TYbyI10HlbOVQoofw3oQgtYq4KGzBrhw4Ayh6pO6+VGj3Ns56F6lPOfEKOrGV+Ys aS2Gp95ihj0WrIE1zCWMi1hFgZCTrYe9SqTBPP60dpWUcbEzn2eqXNvlI0jL9QvTSF+i Ol2kSZZPJgx3GOt8LoQrGrzFgzKH8pPNDrAAyQuw1gSXKen/KFtG0LVb3rXlmWm9OcpU VrvA== X-Gm-Message-State: APjAAAV0R3f2WNqg/FHCJp0mirMiCRKtqhikw7lHwLaagWa11yXWliID n01K80aEqatADyWVtRfU+OA= X-Received: by 2002:a65:538b:: with SMTP id x11mr2823226pgq.395.1578452189886; Tue, 07 Jan 2020 18:56:29 -0800 (PST) Received: from localhost (199.168.140.36.16clouds.com. [199.168.140.36]) by smtp.gmail.com with ESMTPSA id 144sm1021480pfc.124.2020.01.07.18.56.28 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Tue, 07 Jan 2020 18:56:29 -0800 (PST) From: Dejin Zheng To: peppe.cavallaro@st.com, alexandre.torgue@st.com, joabreu@synopsys.com, davem@davemloft.net, mcoquelin.stm32@gmail.com Cc: netdev@vger.kernel.org, linux-stm32@st-md-mailman.stormreply.com, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, Dejin Zheng Subject: [PATCH] net: stmmac: pci: remove the duplicate code of phy_mask Date: Wed, 8 Jan 2020 10:56:24 +0800 Message-Id: <20200108025624.13968-1-zhengdejin5@gmail.com> X-Mailer: git-send-email 2.17.1 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The value of phy_mask will be passed to phy_mask of struct mii_bus before register mdiobus, the mii_bus was obtained by mdiobus_alloc() and set mii_bus->phy_mask as zero by default. so It doesn't need to set phy_mask as zero again in this driver. Signed-off-by: Dejin Zheng --- drivers/net/ethernet/stmicro/stmmac/stmmac_pci.c | 5 ----- 1 file changed, 5 deletions(-) diff --git a/drivers/net/ethernet/stmicro/stmmac/stmmac_pci.c b/drivers/net/ethernet/stmicro/stmmac/stmmac_pci.c index 8237dbc3e991..40f171d310d7 100644 --- a/drivers/net/ethernet/stmicro/stmmac/stmmac_pci.c +++ b/drivers/net/ethernet/stmicro/stmmac/stmmac_pci.c @@ -65,7 +65,6 @@ static void common_default_data(struct plat_stmmacenet_data *plat) plat->force_sf_dma_mode = 1; plat->mdio_bus_data->needs_reset = true; - plat->mdio_bus_data->phy_mask = 0; /* Set default value for multicast hash bins */ plat->multicast_filter_bins = HASH_TABLE_SIZE; @@ -154,8 +153,6 @@ static int intel_mgbe_common_data(struct pci_dev *pdev, plat->tx_queues_cfg[6].weight = 0x0F; plat->tx_queues_cfg[7].weight = 0x10; - plat->mdio_bus_data->phy_mask = 0; - plat->dma_cfg->pbl = 32; plat->dma_cfg->pblx8 = true; plat->dma_cfg->fixed_burst = 0; @@ -386,8 +383,6 @@ static int snps_gmac5_default_data(struct pci_dev *pdev, plat->tso_en = 1; plat->pmt = 1; - plat->mdio_bus_data->phy_mask = 0; - /* Set default value for multicast hash bins */ plat->multicast_filter_bins = HASH_TABLE_SIZE; -- 2.17.1