mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Johan Hovold <johan@kernel.org>
To: Mark Brown <broonie@kernel.org>
Cc: Liam Girdwood <lgirdwood@gmail.com>, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] regulator: bq257xx: drop confusing configuration of_node
Date: Wed, 3 Jun 2026 16:43:12 +0200	[thread overview]
Message-ID: <aiA9gAm6oMhBD8Am@hovoldconsulting.com> (raw)
In-Reply-To: <20260408125347.189345-1-johan@kernel.org>

On Wed, Apr 08, 2026 at 02:53:47PM +0200, Johan Hovold wrote:
> The driver reuses the OF node of the parent multi-function device but
> still sets the of_node field of the regulator configuration to any prior
> OF node.
> 
> Since the MFD child device does not have an OF node set until probe is
> called, this field is set to NULL on first probe and to the reused OF
> node if the driver is later rebound.
> 
> As the device_set_of_node_from_dev() helper drops a reference to any
> prior OF node before taking a reference to the new one this can
> apparently also confuse LLMs like Sashiko which flags it as a potential
> use-after-free (which it is not).
> 
> Drop the confusing and redundant configuration of_node assignment.
> 
> Link: https://sashiko.dev/#/patchset/20260408073055.5183-1-johan%40kernel.org
> Signed-off-by: Johan Hovold <johan@kernel.org>
> ---
> 
> This is a follow-up to the reused OF node imbalance series:
> 
> 	https://lore.kernel.org/lkml/20260408073055.5183-1-johan@kernel.org/
> 
> to address a false-positive Sashiko report.

Can this one be picked up now?

Johan

  parent reply	other threads:[~2026-06-03 14:43 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-04-08 12:53 Johan Hovold
2026-04-08 13:18 ` Mark Brown
2026-04-08 13:19   ` Mark Brown
2026-06-03 14:43 ` Johan Hovold [this message]
2026-06-03 19:14   ` Mark Brown
2026-06-04  6:55     ` Johan Hovold
2026-06-04 10:03       ` Mark Brown

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=aiA9gAm6oMhBD8Am@hovoldconsulting.com \
    --to=johan@kernel.org \
    --cc=broonie@kernel.org \
    --cc=lgirdwood@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    /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

all inboxes | Powered by JetHome®