mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Christian Eggers <ceggers@gmx.de>
To: Christian Eggers <ceggers@arri.de>, Mark Brown <broonie@kernel.org>
Cc: Liam Girdwood <lgirdwood@gmail.com>,
	Douglas Anderson <dianders@chromium.org>,
	linux-kernel@vger.kernel.org, stable@vger.kernel.org
Subject: Re: [PATCH 2/2] regulator: assert that dummy regulator has been probed before using it
Date: Mon, 10 Mar 2025 19:22:24 +0100	[thread overview]
Message-ID: <4945392.OV4Wx5bFTl@zbook-studio-g3> (raw)
In-Reply-To: <3d195bf7-de99-4fe9-87b0-291e156f083c@sirena.org.uk>

Am Montag, 10. März 2025, 18:23:02 CET schrieb Mark Brown:
> On Mon, Mar 10, 2025 at 05:33:02PM +0100, Christian Eggers wrote:
> > Due to asynchronous driver probing there is a chance that the dummy
> > regulator hasn't already been probed when first accessing it.
> > 
> >  		if (have_full_constraints()) {
> >  		
> >  			r = dummy_regulator_rdev;
> > 
> > +			BUG_ON(!r);
> > 
> >  			get_device(&r->dev);
> >  		
> >  		} else {
> >  		
> >  			dev_err(dev, "Failed to resolve %s-supply for 
%s\n",
> > 
> > @@ -2086,6 +2087,7 @@ static int regulator_resolve_supply(struct
> > regulator_dev *rdev)> 
> >  			goto out;
> >  		
> >  		}
> >  		r = dummy_regulator_rdev;
> > 
> > +		BUG_ON(!r);
> 
> This doesn't actually help anything
My idea was to help identifying the problem (if it is reintroduced again 
later).

> I'd expect this to trigger probe deferral.
I can check for this tomorrow.  But is it worth to use deferred probing
for a shared "NOP" driver which doesn't access any hardware?  Or would this 
only introduce overhead for nothing?

regards,
Christian





  reply	other threads:[~2025-03-10 18:22 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-03-10 16:33 [PATCH 1/2] regulator: dummy: force synchronous probing Christian Eggers
2025-03-10 16:33 ` [PATCH 2/2] regulator: assert that dummy regulator has been probed before using it Christian Eggers
2025-03-10 17:23   ` Mark Brown
2025-03-10 18:22     ` Christian Eggers [this message]
2025-03-10 19:39       ` 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=4945392.OV4Wx5bFTl@zbook-studio-g3 \
    --to=ceggers@gmx.de \
    --cc=broonie@kernel.org \
    --cc=ceggers@arri.de \
    --cc=dianders@chromium.org \
    --cc=lgirdwood@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=stable@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®