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.5 required=3.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,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 742B6C433ED for ; Wed, 28 Apr 2021 11:53:22 +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 398E061418 for ; Wed, 28 Apr 2021 11:53:20 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 398E061418 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=walle.cc 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 4FVcTV4Npkz30D5 for ; Wed, 28 Apr 2021 21:53:18 +1000 (AEST) Authentication-Results: lists.ozlabs.org; dkim=fail reason="signature verification failed" (1024-bit key; secure) header.d=walle.cc header.i=@walle.cc header.a=rsa-sha256 header.s=mail2016061301 header.b=TeuOHOIo; dkim-atps=neutral Authentication-Results: lists.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=walle.cc (client-ip=176.9.125.105; helo=ssl.serverraum.org; envelope-from=michael@walle.cc; receiver=) Authentication-Results: lists.ozlabs.org; dkim=pass (1024-bit key; secure) header.d=walle.cc header.i=@walle.cc header.a=rsa-sha256 header.s=mail2016061301 header.b=TeuOHOIo; dkim-atps=neutral Received: from ssl.serverraum.org (ssl.serverraum.org [176.9.125.105]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 4FVWWP0s7qz2xg6 for ; Wed, 28 Apr 2021 18:09:36 +1000 (AEST) Received: from ssl.serverraum.org (web.serverraum.org [172.16.0.2]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ssl.serverraum.org (Postfix) with ESMTPSA id 3392E2224F; Wed, 28 Apr 2021 10:09:17 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=walle.cc; s=mail2016061301; t=1619597371; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=M9NlOCpW1MZNsl/vA/TRzY5PiytDAsgS7p11KntpwDc=; b=TeuOHOIozerVUFBEq+kXl+E4fsEw1MWqgROl2oA8Sc/xKOT0oXpynCQIkw1papfFwz22RM ZqopdTbGj/RRv3+sDFrM+3v84W6DRuM04o8XbE5Tyx09iWpSYtyaTodlAwmk1PVwQpm/hS zB6aEh6Z4dXpMFJB4kyQVt3Zk/Jvibs= MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII; format=flowed Content-Transfer-Encoding: 7bit Date: Wed, 28 Apr 2021 10:09:17 +0200 From: Michael Walle To: Benjamin Herrenschmidt Subject: Re: [PATCH net-next v4 2/2] of: net: fix of_get_mac_addr_nvmem() for non-platform devices In-Reply-To: <3677398ebb77f334abb4899770db633d9658fe82.camel@kernel.crashing.org> References: <20210412174718.17382-1-michael@walle.cc> <20210412174718.17382-3-michael@walle.cc> <730d603b12e590c56770309b4df2bd668f7afbe3.camel@kernel.crashing.org> <8157eba9317609294da80472622deb28@walle.cc> <108f268a35843368466004f7fe5f9f88@walle.cc> <3677398ebb77f334abb4899770db633d9658fe82.camel@kernel.crashing.org> User-Agent: Roundcube Webmail/1.4.11 Message-ID: <452795c5254b65cfba6e52cfc94d92bd@walle.cc> X-Sender: michael@walle.cc X-Mailman-Approved-At: Wed, 28 Apr 2021 21:52:52 +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 , =?UTF-8?Q?J=C3=A9r=C3=B4me_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, Rob Herring , "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" Am 2021-04-27 01:44, schrieb Benjamin Herrenschmidt: > On Mon, 2021-04-26 at 12:54 +0200, Michael Walle wrote: >> (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. Sure. What I meant was the following: eth_get_mac_address(struct net_device *ndev) vs. eth_get_mac_address(struct device *dev, u8 *mac_buf) The first would assume the destination is ndev->dev_addr (which is true for most of the calls, but not all). -michael