From patchwork Thu Sep 26 06:35:10 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kunihiko Hayashi X-Patchwork-Id: 174449 Delivered-To: patch@linaro.org Received: by 2002:a92:7e96:0:0:0:0:0 with SMTP id q22csp1642969ill; Wed, 25 Sep 2019 23:35:28 -0700 (PDT) X-Google-Smtp-Source: APXvYqzoLqE1nD9RIbtwClz3pxb+5Jx3yqTlfnOe+9meh3+CjTNHhfyxjhVk1Snf8atX54mUttRv X-Received: by 2002:a17:907:20e4:: with SMTP id rh4mr1670621ejb.59.1569479728752; Wed, 25 Sep 2019 23:35:28 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1569479728; cv=none; d=google.com; s=arc-20160816; b=WKA9DzqSEvLUt2Ct4nP2lY2TYZb5LLnTrZJ5QiyE9zftD8BdMzqp9A92EQR41KPyZS RYvZKyZF/0arKj1MX7zyT0EiwDQj/+H21M2oOPfOQGjKm9CayI6BZ1Wwbzt7q69xJs9b OJmipBmuPmdC51Hpbqt5mX8uT2aI2sEMp7dvMbIP2QbHueZQAN1xinhEodQp/mE4t+36 2PLEDEKg/WaWybgQSq3htV/lVSi7rwxADguWMqYjxSiRAeu2KBHlMlfG70cCx99DyRbd IqVeHquVD9l+UQKVr4AoR2QHf0be5Yc65HILh2i1BCmEz+aRYpbVXjwOAYkqGpQ4X2C/ oQAA== 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; bh=XerpnztUadD8ULRuqD4rh5gl5FNRvd2D8FNjc7fLXlc=; b=CvY0seP2xpOVkadeOCICZFvU2nQx1UM8R+u11KKOiR7PL3Blvndx8UKmdSWxMX27gI Lx+fYbfGKm7bjCK1uOK2dwa9pU3v/oDlhkjJ1fCjkdF1boMCBIZ6GTzyOERwkNZVySOE weB694Ww8pQh4XOHaMhb/xP3LXQZgXtHq3J8+cC5BTs6MRhWG5QecIi5O1E94cZVZPRb 1gPr4ZXPhOt0rLld5OHqHsc8s0Z70EdzdFM9wCLlkSsoHXn5Cn47AjE9zvorocaXC715 1LozsY14dc8oZGz7N3GW6VxiCaIpGp1E+ebXxpy+anCsQ9s0WHa4ZAczw0PUFy5wxaHl km9w== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id i2si524618ejj.114.2019.09.25.23.35.28; Wed, 25 Sep 2019 23:35:28 -0700 (PDT) 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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2403777AbfIZGf0 (ORCPT + 26 others); Thu, 26 Sep 2019 02:35:26 -0400 Received: from mx.socionext.com ([202.248.49.38]:23324 "EHLO mx.socionext.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2388934AbfIZGf0 (ORCPT ); Thu, 26 Sep 2019 02:35:26 -0400 Received: from unknown (HELO iyokan-ex.css.socionext.com) ([172.31.9.54]) by mx.socionext.com with ESMTP; 26 Sep 2019 15:35:25 +0900 Received: from mail.mfilter.local (m-filter-2 [10.213.24.62]) by iyokan-ex.css.socionext.com (Postfix) with ESMTP id 99B90605F8; Thu, 26 Sep 2019 15:35:25 +0900 (JST) Received: from 172.31.9.51 (172.31.9.51) by m-FILTER with ESMTP; Thu, 26 Sep 2019 15:35:25 +0900 Received: from plum.e01.socionext.com (unknown [10.213.132.32]) by kinkan.css.socionext.com (Postfix) with ESMTP id 6BA071A0E9F; Thu, 26 Sep 2019 15:35:25 +0900 (JST) From: Kunihiko Hayashi To: "David S. Miller" , netdev@vger.kernel.org Cc: linux-kernel@vger.kernel.org, Kunihiko Hayashi Subject: [PATCH net] net: socionext: ave: Avoid using netdev_err() before calling register_netdev() Date: Thu, 26 Sep 2019 15:35:10 +0900 Message-Id: <1569479710-32314-1-git-send-email-hayashi.kunihiko@socionext.com> X-Mailer: git-send-email 2.7.4 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Until calling register_netdev(), ndev->dev_name isn't specified, and netdev_err() displays "(unnamed net_device)". ave 65000000.ethernet (unnamed net_device) (uninitialized): invalid phy-mode setting ave: probe of 65000000.ethernet failed with error -22 This replaces netdev_err() with dev_err() before calling register_netdev(). Signed-off-by: Kunihiko Hayashi --- drivers/net/ethernet/socionext/sni_ave.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) -- 2.7.4 diff --git a/drivers/net/ethernet/socionext/sni_ave.c b/drivers/net/ethernet/socionext/sni_ave.c index 10d0c3e..f20f6c4 100644 --- a/drivers/net/ethernet/socionext/sni_ave.c +++ b/drivers/net/ethernet/socionext/sni_ave.c @@ -1662,19 +1662,19 @@ static int ave_probe(struct platform_device *pdev) "socionext,syscon-phy-mode", 1, 0, &args); if (ret) { - netdev_err(ndev, "can't get syscon-phy-mode property\n"); + dev_err(dev, "can't get syscon-phy-mode property\n"); goto out_free_netdev; } priv->regmap = syscon_node_to_regmap(args.np); of_node_put(args.np); if (IS_ERR(priv->regmap)) { - netdev_err(ndev, "can't map syscon-phy-mode\n"); + dev_err(dev, "can't map syscon-phy-mode\n"); ret = PTR_ERR(priv->regmap); goto out_free_netdev; } ret = priv->data->get_pinmode(priv, phy_mode, args.args[0]); if (ret) { - netdev_err(ndev, "invalid phy-mode setting\n"); + dev_err(dev, "invalid phy-mode setting\n"); goto out_free_netdev; }