mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Michal Simek <michal.simek@amd.com>
To: Philipp Zabel <p.zabel@pengutronix.de>,
	Damien Le Moal <dlemoal@kernel.org>,
	Conor Dooley <conor.dooley@microchip.com>,
	Valentina Fernandez <valentina.fernandezalanis@microchip.com>,
	Daire McNamara <daire.mcnamara@microchip.com>,
	Fabrizio Castro <fabrizio.castro.jz@renesas.com>,
	Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com>
Cc: linux-kernel@vger.kernel.org, linux-riscv@lists.infradead.org,
	linux-renesas-soc@vger.kernel.org,
	linux-arm-kernel@lists.infradead.org
Subject: Re: [PATCH v2 7/8] reset: zynq: Use regmap_test_bits in zynq_reset_status
Date: Tue, 10 Nov 2026 14:16:33 +0100	[thread overview]
Message-ID: <57e9010f-93e0-4212-8464-3c577f8533c1@amd.com> (raw)
In-Reply-To: <20261109-reset-regmap-test-bits-v2-7-c886689bb85e@pengutronix.de>



On 11/9/26 17:50, Philipp Zabel wrote:
> Simplify zynq_reset_status() by using regmap_test_bits().
> No functional change.
> 
> Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
> ---
>   drivers/reset/reset-zynq.c | 8 +-------
>   1 file changed, 1 insertion(+), 7 deletions(-)
> 
> diff --git a/drivers/reset/reset-zynq.c b/drivers/reset/reset-zynq.c
> index 688b512882ec..b7a0445aafcf 100644
> --- a/drivers/reset/reset-zynq.c
> +++ b/drivers/reset/reset-zynq.c
> @@ -67,17 +67,11 @@ static int zynq_reset_status(struct reset_controller_dev *rcdev,
>   
>   	int bank = id / BITS_PER_LONG;
>   	int offset = id % BITS_PER_LONG;
> -	int ret;
> -	u32 reg;
>   
>   	pr_debug("%s: %s reset bank %u offset %u\n", KBUILD_MODNAME, __func__,
>   		 bank, offset);
>   
> -	ret = regmap_read(priv->slcr, priv->offset + (bank * 4), &reg);
> -	if (ret)
> -		return ret;
> -
> -	return !!(reg & BIT(offset));
> +	return regmap_test_bits(priv->slcr, priv->offset + (bank * 4), BIT(offset));
>   }
>   
>   static const struct reset_control_ops zynq_reset_ops = {
> 

Tested-by: Michal Simek <michal.simek@amd.com>

Thanks,
Michal

  reply	other threads:[~2026-11-10 13:16 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-09 16:50 [PATCH v2 0/8] reset: Use regmap_test_bits to simplify status callbacks Philipp Zabel
2026-11-09 16:50 ` [PATCH v2 1/8] reset: a10sr: Use regmap_test_bits in a10sr_reset_status Philipp Zabel
2026-11-09 16:50 ` [PATCH v2 2/8] reset: reset-intel-gw: Use regmap_reset_bits in intel_reset_status Philipp Zabel
2026-11-09 16:50 ` [PATCH v2 3/8] reset: k210: Use regmap_test_bits in k210_rst_status Philipp Zabel
2026-11-09 16:50 ` [PATCH v2 4/8] reset: lantiq: Use regmap_test_bits in lantiq_rcu_reset_status Philipp Zabel
2026-11-09 16:50 ` [PATCH v2 5/8] reset: mpfs: Use regmap_test_bits in mpfs_status Philipp Zabel
2026-11-09 16:50 ` [PATCH v2 6/8] reset: rzv2h-usb2phy: Use regmap_test_bits in rzv2h_usbphy_reset_status Philipp Zabel
2026-11-09 16:50 ` [PATCH v2 7/8] reset: zynq: Use regmap_test_bits in zynq_reset_status Philipp Zabel
2026-11-10 13:16   ` Michal Simek [this message]
2026-11-09 16:50 ` [PATCH v2 8/8] reset: tn48m: Use regmap_test_bits in tn48m_control_status Philipp Zabel

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=57e9010f-93e0-4212-8464-3c577f8533c1@amd.com \
    --to=michal.simek@amd.com \
    --cc=conor.dooley@microchip.com \
    --cc=daire.mcnamara@microchip.com \
    --cc=dlemoal@kernel.org \
    --cc=fabrizio.castro.jz@renesas.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-renesas-soc@vger.kernel.org \
    --cc=linux-riscv@lists.infradead.org \
    --cc=p.zabel@pengutronix.de \
    --cc=prabhakar.mahadev-lad.rj@bp.renesas.com \
    --cc=valentina.fernandezalanis@microchip.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

all inboxes | Powered by JetHome®