linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Philipp Zabel <p.zabel@pengutronix.de>
To: Serge Semin <Sergey.Semin@baikalelectronics.ru>,
	Stephen Boyd <sboyd@kernel.org>,
	Michael Turquette <mturquette@baylibre.com>,
	Dmitry Osipenko <digetx@gmail.com>,
	Mark Brown <broonie@kernel.org>
Cc: Serge Semin <fancer.lancer@gmail.com>,
	Alexey Malahov <Alexey.Malahov@baikalelectronics.ru>,
	Pavel Parkhomenko <Pavel.Parkhomenko@baikalelectronics.ru>,
	Thomas Bogendoerfer <tsbogend@alpha.franken.de>,
	linux-clk@vger.kernel.org, linux-mips@vger.kernel.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH RESEND v5 1/8] reset: Fix devm bulk optional exclusive control getter
Date: Wed, 29 Jun 2022 16:02:43 +0200	[thread overview]
Message-ID: <c6794e78b9425c84f090d3058b93319bbb17e10f.camel@pengutronix.de> (raw)
In-Reply-To: <20220624141853.7417-2-Sergey.Semin@baikalelectronics.ru>

Hi Serge,

On Fr, 2022-06-24 at 17:18 +0300, Serge Semin wrote:
> Most likely due to copy-paste mistake the device managed version of the
> denoted reset control getter has been implemented with invalid semantic,
> which can be immediately spotted by having "WARN_ON(shared && acquired)"
> warning in the system log as soon as the method is called. Anyway let's
> fix it by altering the boolean arguments passed to the
> __devm_reset_control_bulk_get() method from
> - shared = true, optional = false, acquired = true
> to
> + shared = false, optional = true, acquired = true
> That's what they were supposed to be in the first place (see the non-devm
> version of the same method: reset_control_bulk_get_optional_exclusive()).
> 
> Fixes: 48d71395896d ("reset: Add reset_control_bulk API")
> Signed-off-by: Serge Semin <Sergey.Semin@baikalelectronics.ru>
> 
> ---
> 
> Changelog v4:
> - This is a new patch added on v4 lap of the series.
> ---
>  include/linux/reset.h | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/include/linux/reset.h b/include/linux/reset.h
> index 8a21b5756c3e..514ddf003efc 100644
> --- a/include/linux/reset.h
> +++ b/include/linux/reset.h
> @@ -731,7 +731,7 @@ static inline int __must_check
>  devm_reset_control_bulk_get_optional_exclusive(struct device *dev, int num_rstcs,
>  					       struct reset_control_bulk_data *rstcs)
>  {
> -	return __devm_reset_control_bulk_get(dev, num_rstcs, rstcs, true, false, true);
> +	return __devm_reset_control_bulk_get(dev, num_rstcs, rstcs, false, true, true);
>  }

You are right, thank you. I'll take this as a sign that the internal
functions should probably switch from collecting ever more boolean
arguments to a flags parameter, similar to enum gpiod_flags.

I'll pick this up separately into the reset/fixes branch.

regards
Philipp

  parent reply	other threads:[~2022-06-29 14:03 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-06-24 14:18 [PATCH RESEND v5 0/8] clk/resets: baikal-t1: Add DDR/PCIe resets and xGMAC/SATA fixes Serge Semin
2022-06-24 14:18 ` [PATCH RESEND v5 1/8] reset: Fix devm bulk optional exclusive control getter Serge Semin
2022-06-26 22:35   ` Dmitry Osipenko
2022-06-27 22:20     ` Serge Semin
2022-06-29 14:02   ` Philipp Zabel [this message]
2022-06-29 15:06     ` Serge Semin
2022-06-24 14:18 ` [PATCH RESEND v5 2/8] clk: vc5: Fix 5P49V6901 outputs disabling when enabling FOD Serge Semin
2022-06-24 14:18 ` [PATCH RESEND v5 3/8] clk: baikal-t1: Fix invalid xGMAC PTP clock divider Serge Semin
2022-06-24 14:18 ` [PATCH RESEND v5 4/8] clk: baikal-t1: Add shared xGMAC ref/ptp clocks internal parent Serge Semin
2022-06-24 14:18 ` [PATCH RESEND v5 5/8] clk: baikal-t1: Add SATA internal ref clock buffer Serge Semin
2022-06-24 14:18 ` [PATCH RESEND v5 6/8] clk: baikal-t1: Move reset-controls code into a dedicated module Serge Semin
2022-06-29 15:12   ` Philipp Zabel
2022-07-05 22:07     ` Serge Semin
2022-07-06  9:16       ` Philipp Zabel
2022-07-06 22:10         ` Serge Semin
2022-07-08 19:32           ` Serge Semin
2022-06-24 14:18 ` [PATCH RESEND v5 7/8] clk: baikal-t1: Add DDR/PCIe directly controlled resets support Serge Semin
2022-06-29 15:16   ` Philipp Zabel
2022-07-05 22:11     ` Serge Semin
2022-06-24 14:18 ` [PATCH RESEND v5 8/8] clk: baikal-t1: Convert to platform device driver Serge Semin

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=c6794e78b9425c84f090d3058b93319bbb17e10f.camel@pengutronix.de \
    --to=p.zabel@pengutronix.de \
    --cc=Alexey.Malahov@baikalelectronics.ru \
    --cc=Pavel.Parkhomenko@baikalelectronics.ru \
    --cc=Sergey.Semin@baikalelectronics.ru \
    --cc=broonie@kernel.org \
    --cc=digetx@gmail.com \
    --cc=fancer.lancer@gmail.com \
    --cc=linux-clk@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mips@vger.kernel.org \
    --cc=mturquette@baylibre.com \
    --cc=sboyd@kernel.org \
    --cc=tsbogend@alpha.franken.de \
    /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;
as well as URLs for NNTP newsgroup(s).