Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp3769579yba; Tue, 7 May 2019 06:50:52 -0700 (PDT) X-Google-Smtp-Source: APXvYqwLzgyLlLUG0iCJKYGWe8hneibCaVGexzwKP+IGXZC5xKVKfrA2yFImIN9bKGjaO27vFfHN X-Received: by 2002:a62:62c1:: with SMTP id w184mr17154363pfb.95.1557237052584; Tue, 07 May 2019 06:50:52 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1557237052; cv=none; d=google.com; s=arc-20160816; b=GUAtJuFhXUMaBQ36GRfH8omLPPiN2BwJAusIBL+BB+HCPcbY0n99sn69CfYVK12dp6 brw3F6t9AEq7bthzBYF1iYV7iagqCerRuywUv8Cy3SE+CVxoB1fw41kpeT7MYT9PZ/Ud o9rDWu9xnIA9sS1ACtFGgkpDt5x8cPLKPG9icYwXZt6gr0cp+5m58rDwnQ5ZY6XSOv6w qtYMKFPDbmM+03UkETOUQJ6XEdc6ie5Qr3HDtTi03b7pjKxjTOPvZhO/3JhVqqIDuU02 UnkqO00wVIjaaMyfO14U/GtjUFYLpOeeT5U52TwXd6SpPftXyVJjH0qabni8E+odsfEd 0gBA== 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:cc:to:subject :message-id:date:from:in-reply-to:references:mime-version :dkim-signature; bh=euemdhHUFLuSuId1RNfwYjKhHGbhd9gRXwryEuN0UN8=; b=rTHL0JCrLRLDUmAODfsBJPeyIJNKc5MBsptqwiv9jDHpyg6C3nwaozLtVejZ95cVMh XOEYSD3pzN74BJlgRahPy1P3tKAJV0+oRdOj3RbP4PUF8NDHj5jHX8uGGIPNXErcFcOx G9EhpNE8Q/jb2jjLkfbzTvEza1j6zy2o+qZbDJIvPXPgtzttgLhEyJhrc/Sh2RB9bj5e 2iHccO4/+bDEreYFjS/7KLZO4A/53nBOGHWguZNZGXyVEF+gQxB7njIOs2rSJ73h9MZ1 bfO4KAFc695k3CUclkJZNQ9RitqtWSjSc5mToLqx0weno6diUkyRgX1a81A01b5cL5rE 8YTg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=Gya7RSBv; 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 g10si18301397pgs.397.2019.05.07.06.50.36; Tue, 07 May 2019 06:50:52 -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; dkim=pass header.i=@gmail.com header.s=20161025 header.b=Gya7RSBv; 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 S1726769AbfEGNti (ORCPT + 99 others); Tue, 7 May 2019 09:49:38 -0400 Received: from mail-ed1-f68.google.com ([209.85.208.68]:34904 "EHLO mail-ed1-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726295AbfEGNth (ORCPT ); Tue, 7 May 2019 09:49:37 -0400 Received: by mail-ed1-f68.google.com with SMTP id p26so945765edr.2; Tue, 07 May 2019 06:49:36 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc:content-transfer-encoding; bh=euemdhHUFLuSuId1RNfwYjKhHGbhd9gRXwryEuN0UN8=; b=Gya7RSBvbDj7ToTPgKhS6yAIXnCX8xm9zep18SKqSe5SUR1WW0paYN3kFGCHu+Kkc6 ed5/OlwGHIenGWvC2wror9do3NnU4n6hMDqJ9hhQIFXCqqpBuNOJlH/Sxv80yb+L2bd9 lb1lX8u+qVasahpBpBZSi05ly0k0RJSJERSs4c3mmP3wACKt9/72T111HdqTKG2i8LvS z0JVla1ixYxsPpQa7pX20R3l2eEFD/SPABChWG1k0BeuRneH66i1LEwiEHexmnXsy3Ru WY2GS7QigIoHDmXHaQsPCmIhPo3FeM470q7zLGlrAzLaY9G86yp31edMj5hIw2rex6Z3 O4GA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc:content-transfer-encoding; bh=euemdhHUFLuSuId1RNfwYjKhHGbhd9gRXwryEuN0UN8=; b=eCF5CXmGoIBZ7SKGtuNtpbiC9eVqFOPI+tRbQw/LYUTc9+15Uk8p9D10UyosSmju5y LXZaQ2lTnQI6FzsSXJAVG8GokOfwcXYhTttnr7duKs/OJ7T0w6kKKWM5YoQfBnRNc0Pj bv0Dw7yqdnS+OzK8Imbvb3eeGRiS9StpSKYvyh0q11wYl2jpiDZB56jAyGYZ4t/40vA5 foE60fiKo/OOVl2NIzaYtXqPM4UmA1wJNEDuXV8tHoEcMRqC80tdx024ZrzYl9jRSqCj Y094lPHvlEM7iOeopnCGuwHBL2mULkvwyztF9TrDAhJL77Z95g9RnflpTi0nQbZ6T0BP uCNg== X-Gm-Message-State: APjAAAWIvmQy94ggctd5FeKgT6lEKzE/ginqv0ZJIVI/rmWcB8EGa1oa CPlXGnVAkPAwrYhRJ9sysgugGsmjc9XMI3bgIKo= X-Received: by 2002:a17:906:6410:: with SMTP id d16mr24602660ejm.75.1557236975656; Tue, 07 May 2019 06:49:35 -0700 (PDT) MIME-Version: 1.0 References: <1557177887-30446-1-git-send-email-ynezz@true.cz> <1557177887-30446-3-git-send-email-ynezz@true.cz> In-Reply-To: <1557177887-30446-3-git-send-email-ynezz@true.cz> From: Vladimir Oltean Date: Tue, 7 May 2019 16:49:24 +0300 Message-ID: Subject: Re: [PATCH net-next v2 2/4] net: dsa: support of_get_mac_address new ERR_PTR error To: =?UTF-8?Q?Petr_=C5=A0tetiar?= Cc: netdev , "David S. Miller" , Andrew Lunn , Vivien Didelot , Florian Fainelli , Heiner Kallweit , Frank Rowand , devel@driverdev.osuosl.org, linux-kernel@vger.kernel.org, Greg Kroah-Hartman , Maxime Ripard Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, 7 May 2019 at 00:26, Petr =C5=A0tetiar wrote: > > 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 =C5=A0tetiar > --- > 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 |=3D NETIF_F_HW_TC; > slave_dev->ethtool_ops =3D &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 > Tested-by: Vladimir Oltean