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=-5.6 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS,USER_AGENT_SANE_1 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 CBF73C2D0A3 for ; Mon, 9 Nov 2020 17:41:24 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 69F19205CA for ; Mon, 9 Nov 2020 17:41:24 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=kernel.org header.i=@kernel.org header.b="weCjyh02" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1732326AbgKIRlX (ORCPT ); Mon, 9 Nov 2020 12:41:23 -0500 Received: from mail.kernel.org ([198.145.29.99]:42164 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731476AbgKIRlW (ORCPT ); Mon, 9 Nov 2020 12:41:22 -0500 Received: from localhost (fw-tnat.cambridge.arm.com [217.140.96.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id A276521D93; Mon, 9 Nov 2020 17:41:21 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1604943682; bh=jltC+bDWwlOBb3k+Lvr3JSR+3XveeKXCX1xQmKSLgQw=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=weCjyh02JTUiDSJx+tgvVS4Q1Z4WDTGoYFDi2S8mBUL3rbrib5togaKtxZ5mcNkOY 7fO6b/qvY+fhk/OiEIPUuQboLa2hqQH9iHS1V+GU9paet0OUOzEOGdu621uDZHdDTJ LLoTSytEbhg07OMGI56JrINl99ayhNtlsG9ecy98= Date: Mon, 9 Nov 2020 17:41:08 +0000 From: Mark Brown To: Rob Herring Cc: Saravana Kannan , Greg Kroah-Hartman , "Rafael J . Wysocki" , Daniel Mentz , LKML , Frank Rowand Subject: Re: [PATCH RFC] driver core: Ensure DT devices always have fwnode set Message-ID: <20201109174108.GK6380@sirena.org.uk> References: <20201106150747.31273-1-broonie@kernel.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="ibq+fG+Ci5ONsaof" Content-Disposition: inline In-Reply-To: X-Cookie: This fortune is false. User-Agent: Mutt/1.10.1 (2018-07-13) Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org --ibq+fG+Ci5ONsaof Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On Mon, Nov 09, 2020 at 11:25:39AM -0600, Rob Herring wrote: > On Fri, Nov 6, 2020 at 1:09 PM Saravana Kannan wrote: > > And all the subsystems that create their own device from an of_node > > should use of_set_device_of_node() to set the device's of_node. That > > way, all this is done in a consistent manner across subsystems and > > avoid all of the of_get/put() and OF_POPULATED set/clear strewn all > > over the subsystems. > Perhaps a fwnode call in device_add instead that implements the above > and anything else needed for each type of fwnode. It might even be > possible with that to get rid of most of I'd suggested doing it with a callout as well in the original thread that sparked my proposal - my patch was just the most minimal implementation to fix the current problem. > of_platform_device_create_pdata() and of_device_add(). IIRC, those > were pretty much copies of the core code. > That would also be less fragile than having a coccinelle script. --ibq+fG+Ci5ONsaof Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQEzBAABCgAdFiEEreZoqmdXGLWf4p/qJNaLcl1Uh9AFAl+pfzMACgkQJNaLcl1U h9BwuAf+Ifvb6jENdSABE4ZiMAMqCgybbePbrFprkqHG4M7jIiXqRSigNor+ptQS 3GFjy2IiR5+LgRW58IThVh97j3Ju4sCIGXZvlV1ixs2HfMDL58cuVkIOEL8Q9zqC WF0gBQlyO1rhgxbj48fD1czx5I8q5jxcNdophbDNOHNB2vNcr8yXbZyPZLdsD8Dh N2sfmi9Kls1yfhqzh7B9XU2nS/D4h5afIpfQNz9TEQSg2Ka3otnLdysQUQkim+6S BxOLUbSxeB+r0IXGSJqjEZYnWREojywWymdHUpXk4w57b0G10bh2CFWmAKNbCEqV IjUNKcURgrgns5KHUKXXA4NtVLOHmg== =jsPy -----END PGP SIGNATURE----- --ibq+fG+Ci5ONsaof--