public inbox for linux-arm-kernel@lists.infradead.org
 help / color / mirror / Atom feed
From: Miquel Raynal <miquel.raynal@bootlin.com>
To: Sebastian Reichel <sebastian.reichel@collabora.com>
Cc: Alexandre Belloni <alexandre.belloni@bootlin.com>,
	linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org,
	Thomas Petazzoni <thomas.petazzoni@bootlin.com>,
	Claudiu Beznea <claudiu.beznea@microchip.com>,
	linux-arm-kernel@lists.infradead.org
Subject: Re: [PATCH 1/2] power: reset: at91-reset: use driver structure as status parameter
Date: Thu, 15 Jun 2023 16:04:46 +0200	[thread overview]
Message-ID: <20230615160446.60625339@xps-13> (raw)
In-Reply-To: <20230609231422.taqokbmxojbfdn2v@mercury.elektranox.org>

Hi Sebastian,

sebastian.reichel@collabora.com wrote on Sat, 10 Jun 2023 01:14:22
+0200:

> Hi,
> 
> On Fri, Jun 09, 2023 at 04:39:11PM +0200, Miquel Raynal wrote:
> > It is quite uncommon to use a driver helper with parameters like *pdev
> > and __iomem *base. It is much cleaner and close to today's standards to
> > provide the per-device driver structure and then access its
> > internals. Let's do this with at91_resete_status() before making more
> > modifications to this helper.
> > 
> > Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
> > ---
> >  drivers/power/reset/at91-reset.c | 5 ++---
> >  1 file changed, 2 insertions(+), 3 deletions(-)
> > 
> > diff --git a/drivers/power/reset/at91-reset.c b/drivers/power/reset/at91-reset.c
> > index 741e44a017c3..a8a6f3997768 100644
> > --- a/drivers/power/reset/at91-reset.c
> > +++ b/drivers/power/reset/at91-reset.c
> > @@ -149,11 +149,10 @@ static int at91_reset(struct notifier_block *this, unsigned long mode,
> >  	return NOTIFY_DONE;
> >  }
> >  
> > -static void __init at91_reset_status(struct platform_device *pdev,
> > -				     void __iomem *base)
> > +static void __init at91_reset_status(struct at91_reset *reset)
> >  {
> > +	u32 reg = readl(reset->rstc_base + AT91_RSTC_SR);
> >  	const char *reason;
> > -	u32 reg = readl(base + AT91_RSTC_SR);
> >  
> >  	switch ((reg & AT91_RSTC_RSTTYP) >> 8) {
> >  	case RESET_TYPE_GENERAL:  
> 
> You also need to update the code calling this functions, otherwise
> the series is not bisectable.

Of course, I was not paying enough attention here, sorry about that.

Thanks,
Miquèl

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

  reply	other threads:[~2023-06-15 14:05 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-06-09 14:39 [PATCH 0/2] Expose reset reason through sysfs Miquel Raynal
2023-06-09 14:39 ` [PATCH 1/2] power: reset: at91-reset: use driver structure as status parameter Miquel Raynal
2023-06-09 23:14   ` Sebastian Reichel
2023-06-15 14:04     ` Miquel Raynal [this message]
2023-06-09 14:39 ` [PATCH 2/2] power: reset: at91-reset: add sysfs interface to the power on reason Miquel Raynal
2023-06-09 23:36   ` Sebastian Reichel
2023-06-15 14:29     ` Miquel Raynal

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=20230615160446.60625339@xps-13 \
    --to=miquel.raynal@bootlin.com \
    --cc=alexandre.belloni@bootlin.com \
    --cc=claudiu.beznea@microchip.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pm@vger.kernel.org \
    --cc=sebastian.reichel@collabora.com \
    --cc=thomas.petazzoni@bootlin.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