linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Dmitry Osipenko <digetx@gmail.com>
To: "Michał Mirosław" <mirq-linux@rere.qmqm.pl>,
	"Liam Girdwood" <lgirdwood@gmail.com>,
	"Mark Brown" <broonie@kernel.org>,
	"Support Opensource" <support.opensource@diasemi.com>
Cc: linux-kernel@vger.kernel.org, patches@opensource.cirrus.com
Subject: Re: [PATCH 1/3] regulator: don't require mutex for regulator_notifier_call_chain()
Date: Sun, 6 Sep 2020 14:55:18 +0300	[thread overview]
Message-ID: <df4d51cb-4a03-c460-b317-1a2bd635f1b5@gmail.com> (raw)
In-Reply-To: <5a0da9017c69a4dbc3f9b50f44476fce80a73387.1597032945.git.mirq-linux@rere.qmqm.pl>

10.08.2020 07:33, Michał Mirosław пишет:
> Since 3801b86aa482 ("regulator: Refactor supply implementation
> to work as regular consumers") we no longer cascade notifications
> and so notifier head's built-in rwsem is enough to protect the
> notifier chain. Remove the requirement to fix one case where
> rdev->mutex might be forced to be taken recursively.
> 
> Signed-off-by: Michał Mirosław <mirq-linux@rere.qmqm.pl>
> ---
>  drivers/regulator/core.c | 5 +----
>  1 file changed, 1 insertion(+), 4 deletions(-)
> 
> diff --git a/drivers/regulator/core.c b/drivers/regulator/core.c
> index b0662927487c..f4035167e7ba 100644
> --- a/drivers/regulator/core.c
> +++ b/drivers/regulator/core.c
> @@ -4658,14 +4658,11 @@ EXPORT_SYMBOL_GPL(regulator_bulk_free);
>   * @data: callback-specific data.
>   *
>   * Called by regulator drivers to notify clients a regulator event has
> - * occurred. We also notify regulator clients downstream.
> - * Note lock must be held by caller.
> + * occurred.
>   */
>  int regulator_notifier_call_chain(struct regulator_dev *rdev,
>  				  unsigned long event, void *data)
>  {
> -	lockdep_assert_held_once(&rdev->mutex.base);
> -
>  	_notifier_call_chain(rdev, event, data);
>  	return NOTIFY_DONE;
>  
> 

Reviewed-by: Dmitry Osipenko <digetx@gmail.com>

  reply	other threads:[~2020-09-06 11:55 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-08-10  4:33 [PATCH 0/3] regulator: unexport regulator_lock/unlock() Michał Mirosław
2020-08-10  4:33 ` [PATCH 2/3] regulator: remove locking around regulator_notifier_call_chain() Michał Mirosław
2020-08-10 14:17   ` Adam Thomson
2020-09-06 11:58   ` Dmitry Osipenko
2020-08-10  4:33 ` [PATCH 1/3] regulator: don't require mutex for regulator_notifier_call_chain() Michał Mirosław
2020-09-06 11:55   ` Dmitry Osipenko [this message]
2020-08-10  4:33 ` [PATCH 3/3] regulator: unexport regulator_lock/unlock() Michał Mirosław
2020-09-06 11:59   ` Dmitry Osipenko
2020-09-06  0:07 ` [PATCH 0/3] " Michał Mirosław
     [not found] ` <159950194954.52863.7080307258573052895.b4-ty@kernel.org>
2020-09-15 18:55   ` Michał Mirosław
2020-09-16 10:36     ` Mark Brown
2020-09-19 21:28       ` [PATCH v2] " Michał Mirosław

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=df4d51cb-4a03-c460-b317-1a2bd635f1b5@gmail.com \
    --to=digetx@gmail.com \
    --cc=broonie@kernel.org \
    --cc=lgirdwood@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mirq-linux@rere.qmqm.pl \
    --cc=patches@opensource.cirrus.com \
    --cc=support.opensource@diasemi.com \
    --subject='Re: [PATCH 1/3] regulator: don'\''t require mutex for regulator_notifier_call_chain()' \
    /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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).