Received: by 2002:a05:7412:98c1:b0:fa:551:50a7 with SMTP id kc1csp1620158rdb; Mon, 8 Jan 2024 05:23:18 -0800 (PST) X-Google-Smtp-Source: AGHT+IHkPamQNrGevJpiiia7Eu95l2uJc4H8WEPENt3Pp20NRFDfHVHIutlKqdKpba+C9g9e5plq X-Received: by 2002:a05:620a:21cc:b0:783:2a1a:4493 with SMTP id h12-20020a05620a21cc00b007832a1a4493mr68921qka.157.1704720197440; Mon, 08 Jan 2024 05:23:17 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1704720197; cv=none; d=google.com; s=arc-20160816; b=HSbhURHPfI89yd1zRWpcohJr+ekPc+EtgautTyDY4gikVmquNSxb4IE66mxDnvRaih pw29Cu9VSusjIClPUeadsgfmmsmR8P2VzLC16KWreKIvVhSWQ3wUXu/lmupiLzPHJAzi RSzW/Bgjt0DryHisz8jvFJR6U5psvhJ4/eUCfWOWsCMXr+VpFkAyANpf/p8PLYKmPx/Z HzD/rFgO/EFpADDMEny0drJP5q1PspriBXiygxjHFhD6lyjLnAdwPNDGKb/PVYNJgEcE AQPKZPn/fICMDfnK6T+wgRai9Atj3j3YtCo/KJRaQHROfFYAYivs3AH4fkpVhdRJN5mM uj7w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:organization:references :in-reply-to:message-id:subject:cc:to:from:date:dkim-signature; bh=FsViLUTtGI0FGj6ozi2lqrqfTfYZWRiUqJ4UdhRsYyw=; fh=mXT9Y4rOFT6DwOchJR2yFpEsgLsdXg5YnRABGHrL2cw=; b=iz38XGA2/EXDvIw1hmzFuJwPAK/XqNqAE11vdCY8kGgv69K9p8RK5hUbIVw3zYxruc pCBUk5rBipwfwq+ux4hpqJ/d37nZiAKBpt7QaoIHsQzKvfRwBNun3vEueWo5N1BLfYo5 HFuub1moyTEyFIMBp7ax59qhoYvgJMGKCbrDqw7Y4TLhb0X8u4qyTqFKzMipbsHgpUM6 6XU0AwVAJEbyLaooFBX5Mkv5CBiziR4tHDimb1+OKu/ETIBxM9iKM4jeXeUeoQunb53X 5SY37w5ixVlPl6zTznH2WXG0yuJs6TXJwoBxo6IYaq3WZQ3yZC8+wcuUqOXM5BOgQR2/ /ueg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@bootlin.com header.s=gm1 header.b=ogsUDni9; spf=pass (google.com: domain of linux-kernel+bounces-19609-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-19609-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=bootlin.com Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id s10-20020a05620a0bca00b007819059bea6si8154776qki.232.2024.01.08.05.23.17 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 08 Jan 2024 05:23:17 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-19609-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) client-ip=2604:1380:45d1:ec00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@bootlin.com header.s=gm1 header.b=ogsUDni9; spf=pass (google.com: domain of linux-kernel+bounces-19609-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-19609-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=bootlin.com 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 ny.mirrors.kernel.org (Postfix) with ESMTPS id 2BAF41C22827 for ; Mon, 8 Jan 2024 13:23:17 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 3945744C7E; Mon, 8 Jan 2024 13:23:09 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=bootlin.com header.i=@bootlin.com header.b="ogsUDni9" X-Original-To: linux-kernel@vger.kernel.org Received: from relay7-d.mail.gandi.net (relay7-d.mail.gandi.net [217.70.183.200]) (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 5F5814438A; Mon, 8 Jan 2024 13:23:05 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=bootlin.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=bootlin.com Received: by mail.gandi.net (Postfix) with ESMTPSA id DABA82000D; Mon, 8 Jan 2024 13:23:02 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=gm1; t=1704720183; 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=FsViLUTtGI0FGj6ozi2lqrqfTfYZWRiUqJ4UdhRsYyw=; b=ogsUDni9AfsiTRalY4li5F+jqN+/N+Tp9JzubNhq8uAJ6MDiHbpaBBgcJUWNVyuneKIIbw BxUKQQs6s0hqqEWEL+0UWu9Qpc2uTWzzuRmFuabl1/cvD0nzvCfJtfCuuHgQoRD7Fc999B Xa5hUMxrknJatJi0nrtqs8pP+MiLQOtnV8uEIuSrRPEB0D/UvwbA/KzJWxTTi4dp/RmXQ5 LspxUuU4nDlpqbcfyor79DHviSY4asL2mUfMlKcMVKAuuy83jXrik1UhGr+TBIOQ/MPeLz 5jIO4p4AADzQ1zuAsCUbOtiUT/D0pK/HUB5/zEz7m9iQeVbNRfr/AccReXLskg== Date: Mon, 8 Jan 2024 14:23:02 +0100 From: Herve Codina To: Greg Kroah-Hartman Cc: "Rafael J. Wysocki" , Saravana Kannan , linux-kernel@vger.kernel.org, Allan Nielsen , Horatiu Vultur , Steen Hegelund , Thomas Petazzoni , stable@vger.kernel.org Subject: Re: [PATCH v3 1/1] driver core: Keep the supplier fwnode consistent with the device Message-ID: <20240108142302.7ecd2705@bootlin.com> In-Reply-To: <2024010436-bulb-direness-5582@gregkh> References: <20231114074632.192858-1-herve.codina@bootlin.com> <2024010436-bulb-direness-5582@gregkh> Organization: Bootlin X-Mailer: Claws Mail 4.1.1 (GTK 3.24.38; x86_64-redhat-linux-gnu) 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=UTF-8 Content-Transfer-Encoding: 8bit X-GND-Sasl: herve.codina@bootlin.com Hi Greg, On Thu, 4 Jan 2024 16:39:49 +0100 Greg Kroah-Hartman wrote: > On Tue, Nov 14, 2023 at 08:46:32AM +0100, Herve Codina wrote: > > The commit 3a2dbc510c43 ("driver core: fw_devlink: Don't purge child > > fwnode's consumer links") introduces the possibility to use the > > supplier's parent device instead of the supplier itself. > > In that case the supplier fwnode used is not updated and is no more > > consistent with the supplier device used. > > > > Use the fwnode consistent with the supplier device when checking flags. > > > > Fixes: 3a2dbc510c43 ("driver core: fw_devlink: Don't purge child fwnode's consumer links") > > Cc: stable@vger.kernel.org > > Signed-off-by: Herve Codina > > --- > > Changes v2 -> v3: > > Do not update the supplier handle in order to keep the original handle > > for debug traces. > > > > Changes v1 -> v2: > > Remove sup_handle check and related pr_debug() call as sup_handle cannot be > > invalid if sup_dev is valid. > > > > drivers/base/core.c | 2 +- > > 1 file changed, 1 insertion(+), 1 deletion(-) > > > > diff --git a/drivers/base/core.c b/drivers/base/core.c > > index 4d8b315c48a1..440b52ec027f 100644 > > --- a/drivers/base/core.c > > +++ b/drivers/base/core.c > > @@ -2082,7 +2082,7 @@ static int fw_devlink_create_devlink(struct device *con, > > * supplier device indefinitely. > > */ > > if (sup_dev->links.status == DL_DEV_NO_DRIVER && > > - sup_handle->flags & FWNODE_FLAG_INITIALIZED) { > > + sup_dev->fwnode->flags & FWNODE_FLAG_INITIALIZED) { > > dev_dbg(con, > > "Not linking %pfwf - dev might never probe\n", > > sup_handle); > > -- > > 2.41.0 > > > > Is this still needed? If so, how come no one is noticing it? > I think it is. At least, I don't see anything that make this patch obsolete. Hervé