Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp3379539yba; Mon, 29 Apr 2019 00:56:29 -0700 (PDT) X-Google-Smtp-Source: APXvYqwc6FrQDhUWHU0wGiQaX4Q2OuHB11wuzXw14wEPpgq0/sYa8DB3aqFRWMJruibXVmzDDtBk X-Received: by 2002:a62:4115:: with SMTP id o21mr61438899pfa.153.1556524589027; Mon, 29 Apr 2019 00:56:29 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1556524589; cv=none; d=google.com; s=arc-20160816; b=bvaT3pZBg+4J6vzPEEMbRnPkISEDC8aI5tomhI/OqDEnkcZ8hSj+HUb1ORBYoUQx5l ciPJ82i3Q9QmbdCH15KbQ/h1hXo1IJXWqrlHI2DGailWtJkP1KIDFiqA60lASYKAWm0i T7uCJZD9AifwqxRLxlX+QDarryaVKGBTjRG2tWlOESXoX89sCMzs/RfLxGiC3V5om2Hx vPpKrO9vh05tCCbZgTvGkrZcQ4OzcKVc+JbtTCLuEBFirdJB/xcWpGBQsuNoGV9hV6zl kiYR7idg4oLvaAXgoCGkSfHQmhEofuGTFB2iEYIqBXEc1yvHhnvco2QZXzdwb92VdnZY 3stQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:content-disposition :mime-version:references:reply-to:message-id:subject:cc:to:from:date; bh=BAOIK8xjZ5S+venwV35lh17gcBi+U/DuGekrdZcNMWY=; b=FB7fhhqqH7gFQo1iRIkLw1JgmGx5Bha1Ziaprhk0rK88y7ohgooeAzsHhyhfA1SWJM OB6Y6cQ9ggq3LN+auld8SzqOfC4v9n80TOvoR9uh63BD+l+RslWPs9d4F+Bq9aElneLE udlBE1u+nhqnmqn9G0yjlX72UeFWqzM52ckv0pMUQ9/yRjHIYygx4a0n6mrm0WeoRJ8I o1rABiUyhFhxmc3HcOW/cJ8mUVnhN8fL+6QXwM7UHF8ti/FOXb0Xrwqz6NFJ5EpOnQsW SK0674HwZnMkf7uUBVz7/Y/P65xbvfYq20YfNxuUQ/dctn2iBfvqhg9d6WGnX5GRDgQO U6fQ== 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 b15si33905841pfb.231.2019.04.29.00.56.14; Mon, 29 Apr 2019 00:56:29 -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 S1727614AbfD2HzU (ORCPT + 99 others); Mon, 29 Apr 2019 03:55:20 -0400 Received: from smtp-out.xnet.cz ([178.217.244.18]:47746 "EHLO smtp-out.xnet.cz" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727409AbfD2HzT (ORCPT ); Mon, 29 Apr 2019 03:55:19 -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 170E057D9; Mon, 29 Apr 2019 09:55:16 +0200 (CEST) Received: from localhost (meh.true.cz [local]) by meh.true.cz (OpenSMTPD) with ESMTPA id efaae547; Mon, 29 Apr 2019 09:55:14 +0200 (CEST) Date: Mon, 29 Apr 2019 09:55:14 +0200 From: Petr =?utf-8?Q?=C5=A0tetiar?= To: Andrew Lunn Cc: netdev@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, Nicolas Ferre , "David S. Miller" , Florian Fainelli , Heiner Kallweit , Rob Herring , Frank Rowand , Srinivas Kandagatla , Maxime Ripard , Alban Bedel Subject: Re: [PATCH v2 3/4] net: macb: Drop nvmem_get_mac_address usage Message-ID: <20190429075514.GB346@meh.true.cz> Reply-To: Petr =?utf-8?Q?=C5=A0tetiar?= References: <1556456002-13430-1-git-send-email-ynezz@true.cz> <1556456002-13430-4-git-send-email-ynezz@true.cz> <20190428165637.GJ23059@lunn.ch> <20190428210814.GA346@meh.true.cz> <20190428213640.GB10772@lunn.ch> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20190428213640.GB10772@lunn.ch> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Andrew Lunn [2019-04-28 23:36:40]: Hi Andrew, > > so if I understand this correctly, it probably means, that this approach with > > modified of_get_mac_address is dead end as current of_get_mac_address users > > don't expect and handle possible -EPROBE_DEFER error, so I would need to > > change all the current users, which is nonsense. > > I would not say it is dead, it just needs a bit more work. ok, that's good news, I've probably just misunderstood your concern about the random MAC address in case when platform/nvmem subsystem returns -EPROBE_DEFER. > The current users should always be checking for a NULL pointer. You > just need to change that to !IS_ERR(). You can then return > ERR_PTR(-PROBE_DEFER) from the NVMEM operation. I'm more then happy to address this in v3, but I'm still curious, what is it going to change in the current state of the tree. My understanding of -PROBE_DEFER is, that it needs to be propagated back from the driver's probe callback/hook to the upper device/driver subsystem in order to be moved to the list of pending drivers and considered for probe later again. This is not going to happen in any of the current drivers, thus it will probably still always result in random MAC address in case of -EPROBE_DEFER error from the nvmem subsystem. -- ynezz