public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
To: Herve Codina <herve.codina@bootlin.com>
Cc: "Rafael J. Wysocki" <rafael@kernel.org>,
	Saravana Kannan <saravanak@google.com>,
	linux-kernel@vger.kernel.org,
	Allan Nielsen <allan.nielsen@microchip.com>,
	Horatiu Vultur <horatiu.vultur@microchip.com>,
	Steen Hegelund <steen.hegelund@microchip.com>,
	Thomas Petazzoni <thomas.petazzoni@bootlin.com>,
	stable@vger.kernel.org
Subject: Re: [PATCH v3 1/1] driver core: Keep the supplier fwnode consistent with the device
Date: Thu, 4 Jan 2024 16:39:49 +0100	[thread overview]
Message-ID: <2024010436-bulb-direness-5582@gregkh> (raw)
In-Reply-To: <20231114074632.192858-1-herve.codina@bootlin.com>

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 <herve.codina@bootlin.com>
> ---
> 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?

thanks,

greg k-h

  reply	other threads:[~2024-01-04 15:39 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-11-14  7:46 [PATCH v3 1/1] driver core: Keep the supplier fwnode consistent with the device Herve Codina
2024-01-04 15:39 ` Greg Kroah-Hartman [this message]
2024-01-08 13:23   ` Herve Codina
2024-03-19 14:55     ` Herve Codina

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=2024010436-bulb-direness-5582@gregkh \
    --to=gregkh@linuxfoundation.org \
    --cc=allan.nielsen@microchip.com \
    --cc=herve.codina@bootlin.com \
    --cc=horatiu.vultur@microchip.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=rafael@kernel.org \
    --cc=saravanak@google.com \
    --cc=stable@vger.kernel.org \
    --cc=steen.hegelund@microchip.com \
    --cc=thomas.petazzoni@bootlin.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox