From patchwork Mon Apr 20 21:51:17 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andy Shevchenko X-Patchwork-Id: 220906 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=-9.8 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH, MAILING_LIST_MULTI, SIGNED_OFF_BY, SPF_HELO_NONE, SPF_PASS, 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 399B2C54FD0 for ; Mon, 20 Apr 2020 21:51:32 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 1C2E520724 for ; Mon, 20 Apr 2020 21:51:32 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727915AbgDTVvb (ORCPT ); Mon, 20 Apr 2020 17:51:31 -0400 Received: from mga04.intel.com ([192.55.52.120]:11821 "EHLO mga04.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725550AbgDTVv1 (ORCPT ); Mon, 20 Apr 2020 17:51:27 -0400 IronPort-SDR: QiZJ5W7xgyMv4lnHx2wQ8mutdXsGpuPJ3jAVU6JXKcG2QjndUV1KYZ/ajNAF0R/6YvXy6ZQuFh CRHjd/v3x0ng== X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga004.fm.intel.com ([10.253.24.48]) by fmsmga104.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 20 Apr 2020 14:51:26 -0700 IronPort-SDR: b+PJegl+nrYoqwLw5nJ15f9nI0KvnCv+Q9pOumHXVzQ5cw/FohdLiZ8f+SUBEUiy7NS1VezAWM SZ5JtEPu2Cyw== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.72,407,1580803200"; d="scan'208";a="279391957" Received: from black.fi.intel.com ([10.237.72.28]) by fmsmga004.fm.intel.com with ESMTP; 20 Apr 2020 14:51:24 -0700 Received: by black.fi.intel.com (Postfix, from userid 1003) id D5F6E17F; Tue, 21 Apr 2020 00:51:22 +0300 (EEST) From: Andy Shevchenko To: Doug Berger , Florian Fainelli , bcm-kernel-feedback-list@broadcom.com, "David S. Miller" , netdev@vger.kernel.org, Jeremy Linton Cc: Andy Shevchenko Subject: [PATCH v2 1/5] net: bcmgenet: Drop ACPI_PTR() to avoid compiler warning Date: Tue, 21 Apr 2020 00:51:17 +0300 Message-Id: <20200420215121.17735-2-andriy.shevchenko@linux.intel.com> X-Mailer: git-send-email 2.26.1 In-Reply-To: <20200420215121.17735-1-andriy.shevchenko@linux.intel.com> References: <20200420215121.17735-1-andriy.shevchenko@linux.intel.com> MIME-Version: 1.0 Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org When compiled with CONFIG_ACPI=n, ACPI_PTR() will be no-op, and thus genet_acpi_match table defined, but not used. Compiler is not happy about such data. Drop ACPI_PTR() for good. Signed-off-by: Andy Shevchenko Acked-by: Florian Fainelli --- drivers/net/ethernet/broadcom/genet/bcmgenet.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/ethernet/broadcom/genet/bcmgenet.c b/drivers/net/ethernet/broadcom/genet/bcmgenet.c index d975338bf78d..9f2f0e681656 100644 --- a/drivers/net/ethernet/broadcom/genet/bcmgenet.c +++ b/drivers/net/ethernet/broadcom/genet/bcmgenet.c @@ -3740,7 +3740,7 @@ static struct platform_driver bcmgenet_driver = { .name = "bcmgenet", .of_match_table = bcmgenet_match, .pm = &bcmgenet_pm_ops, - .acpi_match_table = ACPI_PTR(genet_acpi_match), + .acpi_match_table = genet_acpi_match, }, }; module_platform_driver(bcmgenet_driver); From patchwork Mon Apr 20 21:51:18 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andy Shevchenko X-Patchwork-Id: 220907 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=-9.8 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH, MAILING_LIST_MULTI, SIGNED_OFF_BY, SPF_HELO_NONE, SPF_PASS, 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 687F5C55181 for ; Mon, 20 Apr 2020 21:51:27 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 42E5B20724 for ; Mon, 20 Apr 2020 21:51:27 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727046AbgDTVv0 (ORCPT ); Mon, 20 Apr 2020 17:51:26 -0400 Received: from mga01.intel.com ([192.55.52.88]:8706 "EHLO mga01.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725550AbgDTVv0 (ORCPT ); Mon, 20 Apr 2020 17:51:26 -0400 IronPort-SDR: nt0cwSbwuOM3WluXgFBtBleor1iCnAIinER/LYmjiirU3+NXlCF6dLDT9IF969HS1ODxH7Phbm 6EKAsh14RCpA== X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga005.fm.intel.com ([10.253.24.32]) by fmsmga101.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 20 Apr 2020 14:51:26 -0700 IronPort-SDR: 7Oz14WDhEE3NHSwlqjn8qOmowojvOUlDkkX6FqKkJovXXco8kbq7Fs2vLDuKWI2gXAsHc263Pl Z7uRTStGB2iQ== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.72,407,1580803200"; d="scan'208";a="455845893" Received: from black.fi.intel.com ([10.237.72.28]) by fmsmga005.fm.intel.com with ESMTP; 20 Apr 2020 14:51:23 -0700 Received: by black.fi.intel.com (Postfix, from userid 1003) id DDA17233; Tue, 21 Apr 2020 00:51:22 +0300 (EEST) From: Andy Shevchenko To: Doug Berger , Florian Fainelli , bcm-kernel-feedback-list@broadcom.com, "David S. Miller" , netdev@vger.kernel.org, Jeremy Linton Cc: Andy Shevchenko Subject: [PATCH v2 2/5] net: bcmgenet: Drop useless OF code Date: Tue, 21 Apr 2020 00:51:18 +0300 Message-Id: <20200420215121.17735-3-andriy.shevchenko@linux.intel.com> X-Mailer: git-send-email 2.26.1 In-Reply-To: <20200420215121.17735-1-andriy.shevchenko@linux.intel.com> References: <20200420215121.17735-1-andriy.shevchenko@linux.intel.com> MIME-Version: 1.0 Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org There is nothing which needs a set of OF headers, followed by redundant OF node ID check. Drop them for good. Signed-off-by: Andy Shevchenko --- drivers/net/ethernet/broadcom/genet/bcmgenet.c | 13 ------------- 1 file changed, 13 deletions(-) diff --git a/drivers/net/ethernet/broadcom/genet/bcmgenet.c b/drivers/net/ethernet/broadcom/genet/bcmgenet.c index 9f2f0e681656..ef275db018f7 100644 --- a/drivers/net/ethernet/broadcom/genet/bcmgenet.c +++ b/drivers/net/ethernet/broadcom/genet/bcmgenet.c @@ -23,11 +23,6 @@ #include #include #include -#include -#include -#include -#include -#include #include #include @@ -3417,8 +3412,6 @@ MODULE_DEVICE_TABLE(of, bcmgenet_match); static int bcmgenet_probe(struct platform_device *pdev) { struct bcmgenet_platform_data *pd = pdev->dev.platform_data; - struct device_node *dn = pdev->dev.of_node; - const struct of_device_id *of_id = NULL; const struct bcmgenet_plat_data *pdata; struct bcmgenet_priv *priv; struct net_device *dev; @@ -3433,12 +3426,6 @@ static int bcmgenet_probe(struct platform_device *pdev) return -ENOMEM; } - if (dn) { - of_id = of_match_node(bcmgenet_match, dn); - if (!of_id) - return -EINVAL; - } - priv = netdev_priv(dev); priv->irq0 = platform_get_irq(pdev, 0); if (priv->irq0 < 0) { From patchwork Mon Apr 20 21:51:21 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andy Shevchenko X-Patchwork-Id: 220905 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=-9.8 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH, MAILING_LIST_MULTI, SIGNED_OFF_BY, SPF_HELO_NONE, SPF_PASS, 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 3DAE4C54FD0 for ; Mon, 20 Apr 2020 21:51:36 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 1C76020724 for ; Mon, 20 Apr 2020 21:51:36 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727947AbgDTVvf (ORCPT ); Mon, 20 Apr 2020 17:51:35 -0400 Received: from mga18.intel.com ([134.134.136.126]:63045 "EHLO mga18.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725550AbgDTVve (ORCPT ); Mon, 20 Apr 2020 17:51:34 -0400 IronPort-SDR: aW54VVt+krT8AR8NIkOkBx47Q+7ptdaMN4KYYkynvQ9h715GVOYJEgm+aNWmU9Uezg6rM8nbUc gTQ1zldNukJw== X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga002.jf.intel.com ([10.7.209.21]) by orsmga106.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 20 Apr 2020 14:51:33 -0700 IronPort-SDR: S4rPRDlcvKQkJUdJ8Ikh8rJSgiknIg9jCzUamifGqHa+KJT8B6vNme29UrpBTBveWyd/hOiAFj odSe4QjuDkrg== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.72,407,1580803200"; d="scan'208";a="273314471" Received: from black.fi.intel.com ([10.237.72.28]) by orsmga002.jf.intel.com with ESMTP; 20 Apr 2020 14:51:31 -0700 Received: by black.fi.intel.com (Postfix, from userid 1003) id 00D57403; Tue, 21 Apr 2020 00:51:22 +0300 (EEST) From: Andy Shevchenko To: Doug Berger , Florian Fainelli , bcm-kernel-feedback-list@broadcom.com, "David S. Miller" , netdev@vger.kernel.org, Jeremy Linton Cc: Andy Shevchenko Subject: [PATCH v2 5/5] net: bcmgenet: Drop too many parentheses in bcmgenet_probe() Date: Tue, 21 Apr 2020 00:51:21 +0300 Message-Id: <20200420215121.17735-6-andriy.shevchenko@linux.intel.com> X-Mailer: git-send-email 2.26.1 In-Reply-To: <20200420215121.17735-1-andriy.shevchenko@linux.intel.com> References: <20200420215121.17735-1-andriy.shevchenko@linux.intel.com> MIME-Version: 1.0 Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org No need to have parentheses around plain pointer variable or negation operator. Drop them for good. Signed-off-by: Andy Shevchenko --- drivers/net/ethernet/broadcom/genet/bcmgenet.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/ethernet/broadcom/genet/bcmgenet.c b/drivers/net/ethernet/broadcom/genet/bcmgenet.c index 2c9881032a24..20aba79becce 100644 --- a/drivers/net/ethernet/broadcom/genet/bcmgenet.c +++ b/drivers/net/ethernet/broadcom/genet/bcmgenet.c @@ -3529,7 +3529,7 @@ static int bcmgenet_probe(struct platform_device *pdev) if (device_get_phy_mode(&pdev->dev) == PHY_INTERFACE_MODE_INTERNAL) bcmgenet_power_up(priv, GENET_POWER_PASSIVE); - if ((pd) && (!IS_ERR_OR_NULL(pd->mac_address))) + if (pd && !IS_ERR_OR_NULL(pd->mac_address)) ether_addr_copy(dev->dev_addr, pd->mac_address); else if (!device_get_mac_address(&pdev->dev, dev->dev_addr, ETH_ALEN))