mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: "Uwe Kleine-König" <u.kleine-koenig@pengutronix.de>
To: Andrey Smirnov <andrew.smirnov@gmail.com>
Cc: Barebox List <barebox@lists.infradead.org>
Subject: Re: [PATCH 2/2] reset_source: drop reset_source_set_instance()
Date: Mon, 26 Aug 2019 22:12:42 +0200	[thread overview]
Message-ID: <20190826201242.dmpkwahnmcbiumbf@pengutronix.de> (raw)
In-Reply-To: <CAHQ1cqF-UUKs3ysuMQvBxbENpGeRxn=8u-bZcmU6=PmFv3n=-w@mail.gmail.com>

On Mon, Aug 26, 2019 at 12:24:12PM -0700, Andrey Smirnov wrote:
> On Sun, Aug 25, 2019 at 7:55 AM Uwe Kleine-König
> <u.kleine-koenig@pengutronix.de> wrote:
> >
> > The semantic of reset_source_set_instance() required a separate call to
> > reset_source_set() (or reset_source_set_priority()) and checked right
> > usage only using the type. Make the set of functions a bit easier to use
> > by dropping reset_source_set_instance() and instead introduce a function
> > that can set all relevant parameters (source, priority and instance) in
> > one go.
> >
> > Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
> > ---
> >  arch/arm/mach-imx/imx.c       |  4 +---
> >  common/reset_source.c         | 15 ++++-----------
> >  drivers/watchdog/stm32_iwdg.c |  3 +--
> >  include/reset_source.h        | 20 +++++++++++---------
> >  4 files changed, 17 insertions(+), 25 deletions(-)
> >
> > diff --git a/arch/arm/mach-imx/imx.c b/arch/arm/mach-imx/imx.c
> > index 63914d306e6f..43b540b39771 100644
> > --- a/arch/arm/mach-imx/imx.c
> > +++ b/arch/arm/mach-imx/imx.c
> > @@ -199,9 +199,7 @@ void imx_set_reset_reason(void __iomem *srsr,
> >                 }
> >         }
> >
> > -       reset_source_set_priority(type,
> > -                                 RESET_SOURCE_DEFAULT_PRIORITY);
> > -       reset_source_set_instance(type, instance);
> > +       reset_source_set_prinst(type, RESET_SOURCE_DEFAULT_PRIORITY, instance);
> 
> Any change we can call this function
> reset_source_set_priority_instance() or reset_source_set_all() instead
> of "prinst"?

Did you see my v2 series? It's still prinst there, but maybe some
instances can be moved to the device variant there.

Having said that, I don't care much. I considered to make
reset_source_set() the variant with all parameters and rename the
current reset_source_set() to reset_source_set_type(). Would that make
sense to you?

Best regards
Uwe

-- 
Pengutronix e.K.                           | Uwe Kleine-König            |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |

_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

  reply	other threads:[~2019-08-26 22:17 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-08-25 14:55 [PATCH 1/2] reset_source: use instance = -1 as default Uwe Kleine-König
2019-08-25 14:55 ` [PATCH 2/2] reset_source: drop reset_source_set_instance() Uwe Kleine-König
2019-08-26 19:24   ` Andrey Smirnov
2019-08-26 20:12     ` Uwe Kleine-König [this message]
2019-08-27  4:52       ` Andrey Smirnov

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=20190826201242.dmpkwahnmcbiumbf@pengutronix.de \
    --to=u.kleine-koenig@pengutronix.de \
    --cc=andrew.smirnov@gmail.com \
    --cc=barebox@lists.infradead.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