Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp2270974yba; Mon, 6 May 2019 03:02:14 -0700 (PDT) X-Google-Smtp-Source: APXvYqyQWYIXZyNYQkTybeeG/l5Uel7mTjyCs+guKMmpcEC5kUT3ck/DycVszJ1UklMbe3EYEOCS X-Received: by 2002:a17:902:bd8a:: with SMTP id q10mr3064746pls.155.1557136933904; Mon, 06 May 2019 03:02:13 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1557136933; cv=none; d=google.com; s=arc-20160816; b=xnZlau01DGgkAwHykkZl4tTm0LARkmdmOTyb36yX/OqDYvBgFaHZyK262fbIpi/I7O wBYGHNkl6wUqwGvGPmet8t49tJ9WWyufdNx32y6MQFZ1m0RfmZfc4NH7h8PGxfsOE6ej 0c+uT3UwwQEhAOiKiqUytXssY/ej79sJGsRQXRbTyINsh/XKZbMRxeCRn28PgZbJPwW5 ccHyPywBkB6qpvrYc0Xq+c/3JYxlyDcrP+CPUPgqmLIY04MXbsSiBT8HR+/cNAx8EQfh nGTeV70/XUufwIOrgbPREf1bRfj4fdYo2VVuY2c9TYh6BhbwRtileiZpfVO1CWkxXuEz BrYw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from; bh=2SQhWLfBUA4b3MWcaqX/6h7P7/Mx6ic3VqptJQN1s+g=; b=gxho2vIkiDUJid2OpKbE3XlHdNJyxphViczCHB5H/Qg1K4O+yyU5MIB6Y1T9QIvrar CyOpucJTOZwwT3uKpnO4MfV2985ekN4wDU8P/H9C+yflxvydf70qSCEibilbJuBKFGoD m7snQMxJ79p+56qFzNW1aYvswHqdUDQWPmf+9vteS2gg2GUn2ZxFTw+P9nEY0yJuPEF2 L2rxiPPzCUobYD9FIIQPsL+sYRmD8SlSWWhwjcpS0K8Vnr/4n0kLWYGx1abT7hXkKkSO PnNcQFaGNTaWlRYQ+4aozHBlMtBhdHSk53ciJhJsslnoGEJa4y649EspneLHdXDn6WJH xeZQ== 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 x15si14105044pln.135.2019.05.06.03.01.49; Mon, 06 May 2019 03:02:13 -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 S1726538AbfEFJ70 (ORCPT + 99 others); Mon, 6 May 2019 05:59:26 -0400 Received: from smtp-out.xnet.cz ([178.217.244.18]:36681 "EHLO smtp-out.xnet.cz" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726363AbfEFJ70 (ORCPT ); Mon, 6 May 2019 05:59:26 -0400 Received: from meh.true.cz (meh.true.cz [108.61.167.218]) (Authenticated sender: petr@true.cz) by smtp-out.xnet.cz (Postfix) with ESMTPSA id 632803859; Mon, 6 May 2019 11:59:24 +0200 (CEST) Received: by meh.true.cz (OpenSMTPD) with ESMTP id f49d01de; Mon, 6 May 2019 11:59:23 +0200 (CEST) From: =?UTF-8?q?Petr=20=C5=A0tetiar?= To: "David S. Miller" , Andrew Lunn , Vivien Didelot , Florian Fainelli Cc: Heiner Kallweit , Frank Rowand , devel@driverdev.osuosl.org, linux-kernel@vger.kernel.org, Greg Kroah-Hartman , Maxime Ripard , =?UTF-8?q?Petr=20=C5=A0tetiar?= , netdev@vger.kernel.org Subject: [PATCH net-next 2/3] net: dsa: support of_get_mac_address new ERR_PTR error Date: Mon, 6 May 2019 11:58:36 +0200 Message-Id: <1557136717-531-3-git-send-email-ynezz@true.cz> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1557136717-531-1-git-send-email-ynezz@true.cz> References: <1557136717-531-1-git-send-email-ynezz@true.cz> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org There was NVMEM support added to of_get_mac_address, so it could now return ERR_PTR encoded error values, so we need to adjust all current users of of_get_mac_address to this new fact. While at it, remove superfluous is_valid_ether_addr as the MAC address returned from of_get_mac_address is always valid and checked by is_valid_ether_addr anyway. Signed-off-by: Petr Štetiar --- net/dsa/slave.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/net/dsa/slave.c b/net/dsa/slave.c index 316bce9..2e1deef 100644 --- a/net/dsa/slave.c +++ b/net/dsa/slave.c @@ -1418,7 +1418,7 @@ int dsa_slave_create(struct dsa_port *port) NETIF_F_HW_VLAN_CTAG_FILTER; slave_dev->hw_features |= NETIF_F_HW_TC; slave_dev->ethtool_ops = &dsa_slave_ethtool_ops; - if (port->mac && is_valid_ether_addr(port->mac)) + if (!IS_ERR_OR_NULL(port->mac)) ether_addr_copy(slave_dev->dev_addr, port->mac); else eth_hw_addr_inherit(slave_dev, master); -- 1.9.1