Re: [PATCH 2/2] reset_source: drop reset_source_set_instance()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, Aug 26, 2019 at 3:17 PM Uwe Kleine-König
<u.kleine-koenig@xxxxxxxxxxxxxx> wrote:
>
> 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@xxxxxxxxxxxxxx> 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@xxxxxxxxxxxxxx>
> > > ---
> > >  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?

Yeah, totally, that'd probably be even better.

Thanks,
Andrey Smirnov

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




[Index of Archives]     [Linux Embedded]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux