Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp2952244yba; Mon, 6 May 2019 14:26:55 -0700 (PDT) X-Google-Smtp-Source: APXvYqy19BBWpYxGNluKqjNThPlpQZNNzSzfHfaG7MF3lQXbFkz2pYLCA97bIHNcIC9tBhtpq3rI X-Received: by 2002:a65:4c07:: with SMTP id u7mr33947573pgq.93.1557178015406; Mon, 06 May 2019 14:26:55 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1557178015; cv=none; d=google.com; s=arc-20160816; b=zcwniSq+e0+cWtxg0CdwSFkX0HirE1AwsnTut8+NTXRBUD/9w6axQ0I5lsc9U572hs 7qcVht/zJ51b0SUEyUHVUtfxncG8nZ3W2YN/ODReF0xHGdry8WS0ZhNbgCZzAmH1Tvti +YG/TqgXDkliF+xsTiQFdhaes1K17o/7My9LZ1NgaMPi648kbCZpb6wW8QhTPJU3iif5 NtYYDFPTp3e0qR4SaMgVfZD6v5QqMa1C4H8FTguwmYLaF0w8dJShYQzX5FZu2PTMgew+ 9tct7mJLTIN+zanEiKty8kpYLuPPfE2+DvGqGzjcBJ0FPaG9zHebsZZz5D4vngQ+zPWK kgsw== 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=jfkfak9j70MhaZOEXCL97SblfubqxWn9W+g5THemRbo=; b=PUDqvw1sSlNfA6YIs3JirxeWCF2TQQnmS421fpK/KXkiywFuFXc2+a6NYT5uUpeA0Y sbic7kjQMqVxBn6D48ZP3HUY+KIykr+vUohWzUBgGgfPTiHZK0J70Q5xhh5gDK2iXQwq V69EEkPKtCbB75VhJU1iMokzOKB/DSnQZ8As2k/dR4qn9DPWGpAWPFhq+t/A18aDFgFX G5LK9PUHHthtWB/iNO3+8KNBI4D9CKKl7pkzeBmApZ2oiZFPrNbePFuxr7vVbYVv1RAV /oJL0fIdTdytdKziKk9J5QOd+5iu5LMfLcty0NrJCr1tu5Zl7XRAnlAPqY1QW3Cqexg6 uO1A== 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 f7si4182014pgd.155.2019.05.06.14.26.39; Mon, 06 May 2019 14:26:55 -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 S1726720AbfEFVZg (ORCPT + 99 others); Mon, 6 May 2019 17:25:36 -0400 Received: from smtp-out.xnet.cz ([178.217.244.18]:38274 "EHLO smtp-out.xnet.cz" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726046AbfEFVZf (ORCPT ); Mon, 6 May 2019 17:25:35 -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 96A1D50A4; Mon, 6 May 2019 23:25:33 +0200 (CEST) Received: by meh.true.cz (OpenSMTPD) with ESMTP id d3e8320a; Mon, 6 May 2019 23:25:32 +0200 (CEST) From: =?UTF-8?q?Petr=20=C5=A0tetiar?= To: netdev@vger.kernel.org, "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?= Subject: [PATCH net-next v2 2/4] net: dsa: support of_get_mac_address new ERR_PTR error Date: Mon, 6 May 2019 23:24:45 +0200 Message-Id: <1557177887-30446-3-git-send-email-ynezz@true.cz> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1557177887-30446-1-git-send-email-ynezz@true.cz> References: <1557177887-30446-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. Fixes: d01f449c008a ("of_net: add NVMEM support to of_get_mac_address") 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..fe7b6a6 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