From mboxrd@z Thu Jan 1 00:00:00 1970 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=-3.8 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=no 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 C129AC433B4 for ; Tue, 27 Apr 2021 01:08:07 +0000 (UTC) Received: from lists.ozlabs.org (lists.ozlabs.org [112.213.38.117]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id E69A061152 for ; Tue, 27 Apr 2021 01:08:06 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org E69A061152 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=kernel.crashing.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=linuxppc-dev-bounces+linuxppc-dev=archiver.kernel.org@lists.ozlabs.org Received: from boromir.ozlabs.org (localhost [IPv6:::1]) by lists.ozlabs.org (Postfix) with ESMTP id 4FTkCT2Lm8z30Gd for ; Tue, 27 Apr 2021 11:08:05 +1000 (AEST) Authentication-Results: lists.ozlabs.org; spf=permerror (SPF Permanent Error: Unknown mechanism found: ip:192.40.192.88/32) smtp.mailfrom=kernel.crashing.org (client-ip=63.228.1.57; helo=gate.crashing.org; envelope-from=benh@kernel.crashing.org; receiver=) Received: from gate.crashing.org (gate.crashing.org [63.228.1.57]) by lists.ozlabs.org (Postfix) with ESMTP id 4FThfq3cvfz2yQv for ; Tue, 27 Apr 2021 09:58:10 +1000 (AEST) Received: from ip6-localhost (localhost.localdomain [127.0.0.1]) by gate.crashing.org (8.14.1/8.14.1) with ESMTP id 13QNi8nL025548; Mon, 26 Apr 2021 18:44:08 -0500 Message-ID: <3677398ebb77f334abb4899770db633d9658fe82.camel@kernel.crashing.org> Subject: Re: [PATCH net-next v4 2/2] of: net: fix of_get_mac_addr_nvmem() for non-platform devices From: Benjamin Herrenschmidt To: Michael Walle , Rob Herring Date: Tue, 27 Apr 2021 09:44:07 +1000 In-Reply-To: <108f268a35843368466004f7fe5f9f88@walle.cc> References: <20210412174718.17382-1-michael@walle.cc> <20210412174718.17382-3-michael@walle.cc> <730d603b12e590c56770309b4df2bd668f7afbe3.camel@kernel.crashing.org> <8157eba9317609294da80472622deb28@walle.cc> <108f268a35843368466004f7fe5f9f88@walle.cc> Content-Type: text/plain; charset="UTF-8" User-Agent: Evolution 3.36.4-0ubuntu1 MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Mailman-Approved-At: Tue, 27 Apr 2021 11:07:43 +1000 X-BeenThere: linuxppc-dev@lists.ozlabs.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Andrew Lunn , Paul Mackerras , =?UTF-8?Q?Rafa=C5=82_Mi=C5=82ecki?= , Nobuhiro Iwamatsu , "moderated list:ARM/STM32 ARCHITECTURE" , Jerome Brunet , Neil Armstrong , Michal Simek , Jose Abreu , NXP Linux Team , Mark Lee , Vadym Kochan , Sascha Hauer , Lorenzo Bianconi , linux-omap , Greg Kroah-Hartman , linux-wireless , linux-kernel@vger.kernel.org, Pengutronix Kernel Team , Vladimir Oltean , Claudiu Beznea , =?ISO-8859-1?Q?J=E9r=F4me?= Pouiller , Kunihiko Hayashi , Chris Snook , Frank Rowand , Gregory Clement , Madalin Bucur , Martin Blumenstingl , Murali Karicheri , Yisen Zhuang , Alexandre Torgue , Wingman Kwok , Sean Wang , Maxime Ripard , Claudiu Manoil , "open list:ARM/Amlogic Meson..." , Kalle Valo , Mirko Lindner , Fugang Duan , Bryan Whitehead , QCA ath9k Development , Microchip Linux Driver Support , Taras Chornyi , Maxime Coquelin , Kevin Hilman , Heiner Kallweit , Andreas Larsson , Giuseppe Cavallaro , Fabio Estevam , Stanislaw Gruszka , Florian Fainelli , linux-staging@lists.linux.dev, Chen-Yu Tsai , "maintainer:BROADCOM BCM7XXX ARM ARCHITECTURE" , linux-arm-kernel , Grygorii Strashko , Byungho An , Radhey Shyam Pandey , Vladimir Zapolskiy , John Crispin , Salil Mehta , Sergei Shtylyov , linux-oxnas@groups.io, Shawn Guo , "David S . Miller" , Helmut Schaa , Thomas Petazzoni , "open list:MEDIA DRIVERS FOR RENESAS - FCP" , Ryder Lee , Russell King , Hauke Mehrtens , Jakub Kicinski , Vivien Didelot , Sunil Goutham , Sebastian Hesselbarth , devicetree@vger.kernel.org, "moderated list:ARM/Mediatek SoC support" , Matthias Brugger , Jernej Skrabec , netdev , Nicolas Ferre , Li Yang , Stephen Hemminger , Vinod Koul , Joyce Ooi , linuxppc-dev , Felix Fietkau Errors-To: linuxppc-dev-bounces+linuxppc-dev=archiver.kernel.org@lists.ozlabs.org Sender: "Linuxppc-dev" On Mon, 2021-04-26 at 12:54 +0200, Michael Walle wrote: > Before I'll try to come up with a patch for this, I'd like to get > your opinion on it. > > (1) replacing of_get_mac_address(node) with eth_get_mac_address(dev) > might sometimes lead to confusing comments like in > drivers/net/ethernet/allwinner/sun4i-emac.c: > > /* Read MAC-address from DT */ > ret = of_get_mac_address(np, ndev->dev_addr); You could leave it or turn it into "from platform", doesn't matter... > (2) What do you think of eth_get_mac_address(ndev). That is, the Not sure what you mean, eth_platform_get_mac_address() takes the address as an argument. I think what you want is a consolidated nvmem_get_mac_address + eth_platform_get_mac_address that takes a device, which would have no requirement of the bus_type at all. Cheers, Ben.