Received: by 2002:ab2:3319:0:b0:1ef:7a0f:c32d with SMTP id i25csp605917lqc; Fri, 8 Mar 2024 06:57:13 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCWTQvMoHKrgtCNXp847fx2OIvwmTruXQHjS5Uhy9Mg/3TuBwwE+YYHLxH4NX+gkMfcmKXjkDSFefEHQGVLENy+fvTBnDslM0arQWKjtUA== X-Google-Smtp-Source: AGHT+IEpwoejFao+Utp5bYvGQpphHo2Rewr7ZJnWEhbL2RwXRRtFpv34NiJ0fMiVXscUgZ4bnd2G X-Received: by 2002:a17:90b:30c6:b0:29a:5c44:2d03 with SMTP id hi6-20020a17090b30c600b0029a5c442d03mr210911pjb.27.1709909833698; Fri, 08 Mar 2024 06:57:13 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1709909833; cv=pass; d=google.com; s=arc-20160816; b=Fmy9YTpB1VPZpbU7P5Fa6yBL88WOb/LmBnKtRcHsev+K/vmZ2H2Ze9//rdZLfB5FSw FCF2z8B5EwCJ3iUBWWMpWkumAABXg2Q3EedtP9aaTsYQNY7iO5I1J/RfjbwCfEtxaoPQ rQkZ4IN0azOLwklBlNObHImrXxMlgk3/ei2yp9sc9p9MM8mi2F6SGm6gt7sO7MuQKvoE KX8VuG/q0nxhyjb7yniKz3gd6NS919Bj2JxHdEQvMhz3el9OjHMWMMgL6mFlIgxMNqzO ShYpXZoTJNxbtZQ0rvvzPfpZGNjOIAA6fQXSt6upTC9Ztth3BzKa4Z5kP1Cbv9fnrxuq x7iA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-disposition:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:message-id:subject:cc :to:from:date; bh=Og+IlqjyP0t847hBssXE/O8cbPtT+rZK9u1piRvjxvw=; fh=reZtNz+DMH6/izKwHojlHdEmb4/0xBh8lIEud0lHErU=; b=O0OP6IIylIY4vhhWI61mZcXzm0vkJdhu4o2EP6MujZ1llk9xYtTWNJeSjdIToaTrJ6 t/0gcAc5igpruoG79GnTZl61U4lMpBwKtXy51n4supaBwoqrCTZTFzhmSJIHvnbHsXRP o0jYZjk0F4sRSMGgpVa6ulUTCrsEzP5XyHmWcL7QOL60bNDACArggF2fBxAAOTH4jIua umJTFDGqJsc4lhBC7boPzkz0KHu8H0TZJnG7YbXKNGIq1ceP7pZ/SAd9z5O3iRnYOLEX hf9p9Ir3cR+GRIbN71w1sVo9qTauOHYAETEDXpzjkv5mg3zb9WAQup+2y9zbi+AHYqoQ 5SBg==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; arc=pass (i=1 spf=pass spfdomain=makrotopia.org); spf=pass (google.com: domain of linux-kernel+bounces-97198-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-97198-linux.lists.archive=gmail.com@vger.kernel.org" Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [147.75.48.161]) by mx.google.com with ESMTPS id v12-20020a17090ae98c00b0029ba854c844si2212737pjy.19.2024.03.08.06.57.13 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 08 Mar 2024 06:57:13 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-97198-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) client-ip=147.75.48.161; Authentication-Results: mx.google.com; arc=pass (i=1 spf=pass spfdomain=makrotopia.org); spf=pass (google.com: domain of linux-kernel+bounces-97198-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-97198-linux.lists.archive=gmail.com@vger.kernel.org" Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sy.mirrors.kernel.org (Postfix) with ESMTPS id 19757B21280 for ; Fri, 8 Mar 2024 14:57:10 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 782AF250F3; Fri, 8 Mar 2024 14:56:32 +0000 (UTC) Received: from pidgin.makrotopia.org (pidgin.makrotopia.org [185.142.180.65]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 5216625759; Fri, 8 Mar 2024 14:56:28 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=185.142.180.65 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709909792; cv=none; b=Wg+FdqksQBTKXFRkrXQ0Eh6SmJJE7swi2+vJPeyflOeyAR8g8hl/kzP5HUur2ORfVtYVwAsZm3eKZ9q8Ve72P0olC7vGL+qxyD10MDVslV4ZU3RjdukQU0u2B6kyvz/Q7hHYWwWrjA69R0pzFZc4oBFI9SmWz0C22/r7YZSKEjA= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709909792; c=relaxed/simple; bh=duHRboSBY4Ddw2Uqw5pOeQO8eFmgv5M1iTXUTHLZn3g=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=Bh6k2BL3PHZsbbVv5nyoJgmBzVxG9q2NzqUChFvetpUrOsziZP3QrN3A9QEwEb+Lz3QP7wusi12URLWzNjarqVCwOcqDcM+JMx70OyUYJYnyfPUcHlze8Z6eqpvcKJAsruFW6QxdRPLbLEEPjDgv0nsiMzHruH7gNeYZdcxQH0w= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=makrotopia.org; spf=pass smtp.mailfrom=makrotopia.org; arc=none smtp.client-ip=185.142.180.65 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=makrotopia.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=makrotopia.org Received: from local by pidgin.makrotopia.org with esmtpsa (TLS1.3:TLS_AES_256_GCM_SHA384:256) (Exim 4.96.2) (envelope-from ) id 1ribdU-0000Wt-1o; Fri, 08 Mar 2024 14:55:48 +0000 Date: Fri, 8 Mar 2024 14:55:44 +0000 From: Daniel Golle To: Avri Altman Cc: Rob Herring , Krzysztof Kozlowski , Conor Dooley , Ulf Hansson , Jens Axboe , Dave Chinner , Jan Kara , Thomas =?iso-8859-1?Q?Wei=DFschuh?= , Christian Brauner , Li Lingfeng , Damien Le Moal , Min Li , Adrian Hunter , Hannes Reinecke , Christian Loehle , Bean Huo , Yeqi Fu , Victor Shih , Christophe JAILLET , "Ricardo B. Marliere" , Greg Kroah-Hartman , "devicetree@vger.kernel.org" , "linux-kernel@vger.kernel.org" , "linux-mmc@vger.kernel.org" , "linux-block@vger.kernel.org" , Diping Zhang , Jianhui Zhao , Jieying Zeng , Chad Monroe , Adam Fox , John Crispin Subject: Re: [RFC PATCH v2 6/8] mmc: core: set card fwnode_handle Message-ID: References: <055787bb6085c32907ee1772522a6bfa49d5d2ef.1709667858.git.daniel@makrotopia.org> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: On Fri, Mar 08, 2024 at 08:04:54AM +0000, Avri Altman wrote: > > > Set fwnode in case it isn't set yet and of_node is present. > > > > Signed-off-by: Daniel Golle > > --- > > drivers/mmc/core/bus.c | 2 ++ > > 1 file changed, 2 insertions(+) > > > > diff --git a/drivers/mmc/core/bus.c b/drivers/mmc/core/bus.c index > > 0ddaee0eae54f..e1c5fc1b3ce4b 100644 > > --- a/drivers/mmc/core/bus.c > > +++ b/drivers/mmc/core/bus.c > > @@ -364,6 +364,8 @@ int mmc_add_card(struct mmc_card *card) > > > > mmc_add_card_debugfs(card); > > card->dev.of_node = mmc_of_find_child_device(card->host, 0); > > + if (card->dev.of_node && !card->dev.fwnode) > > + card->dev.fwnode = &card->dev.of_node->fwnode; > Should this be restricted to eMMC only, or is it fine to be called for SD as well? It's always odd to have of_node set and fwnode unset. And also SD cards can be referenced in device tree, resulting in of_node being set but fwnode being unpopulated, which is no more or less weird than for an eMMC. So imho it should always be called and shouldn't hurt.