LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
From: Chunyan Zhang <zhang.lyra@gmail.com>
To: Daniel Lezcano <daniel.lezcano@linaro.org>
Cc: Thomas Gleixner <tglx@linutronix.de>,
	Saravana Kannan <saravanak@google.com>,
	Baolin Wang <baolin.wang7@gmail.com>,
	Orson Zhai <orsonzhai@gmail.com>,
	Chunyan Zhang <chunyan.zhang@unisoc.com>,
	LKML <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH v2 1/3] drivers/clocksource/timer-of: Remove __init markings
Date: Fri, 20 Aug 2021 15:45:22 +0800	[thread overview]
Message-ID: <CAAfSe-t9k1j_-XObnEhL93q3oZJs0bq3=7czrXfBO0ja=ndYTw@mail.gmail.com> (raw)
In-Reply-To: <3a173a51-2abe-c1bf-41a5-d0be15290452@linaro.org>

On Fri, 13 Aug 2021 at 21:34, Daniel Lezcano <daniel.lezcano@linaro.org> wrote:
>
> On 15/07/2021 08:54, Chunyan Zhang wrote:
> > From: Saravana Kannan <saravanak@google.com>
> >
> > This allows timer drivers to be compiled as modules.
>
> Why ?
>
> These changes will create a precedence with the timers being loaded as
> modules. A longer description is important.
>
> Also, loading the timers may be fine but unloading them is not supported
> AFAICT from the time framework. That should be described also and the
> code should make sure the unloading will be never supported in any
> module conversion.

Ok, I will change to use builtin_platform_driver() to replace
module_platform_driver(), that can make sure to support loading only.
And will add a description for that in the next version patch-2.

Thanks,
Chunyan

>
> > Signed-off-by: Saravana Kannan <saravanak@google.com>
> > Signed-off-by: Chunyan Zhang <chunyan.zhang@unisoc.com>
> > ---
> >  drivers/clocksource/timer-of.c | 17 +++++++++--------
> >  drivers/clocksource/timer-of.h |  4 ++--
> >  2 files changed, 11 insertions(+), 10 deletions(-)
> >
> > diff --git a/drivers/clocksource/timer-of.c b/drivers/clocksource/timer-of.c
> > index 529cc6a51cdb..7f108978fd51 100644
> > --- a/drivers/clocksource/timer-of.c
> > +++ b/drivers/clocksource/timer-of.c
> > @@ -19,7 +19,7 @@
> >   *
> >   * Free the irq resource
> >   */
> > -static __init void timer_of_irq_exit(struct of_timer_irq *of_irq)
> > +static void timer_of_irq_exit(struct of_timer_irq *of_irq)
> >  {
> >       struct timer_of *to = container_of(of_irq, struct timer_of, of_irq);
> >
> > @@ -47,7 +47,7 @@ static __init void timer_of_irq_exit(struct of_timer_irq *of_irq)
> >   *
> >   * Returns 0 on success, < 0 otherwise
> >   */
> > -static __init int timer_of_irq_init(struct device_node *np,
> > +static int timer_of_irq_init(struct device_node *np,
> >                                   struct of_timer_irq *of_irq)
> >  {
> >       int ret;
> > @@ -91,7 +91,7 @@ static __init int timer_of_irq_init(struct device_node *np,
> >   *
> >   * Disables and releases the refcount on the clk
> >   */
> > -static __init void timer_of_clk_exit(struct of_timer_clk *of_clk)
> > +static void timer_of_clk_exit(struct of_timer_clk *of_clk)
> >  {
> >       of_clk->rate = 0;
> >       clk_disable_unprepare(of_clk->clk);
> > @@ -107,7 +107,7 @@ static __init void timer_of_clk_exit(struct of_timer_clk *of_clk)
> >   *
> >   * Returns 0 on success, < 0 otherwise
> >   */
> > -static __init int timer_of_clk_init(struct device_node *np,
> > +static int timer_of_clk_init(struct device_node *np,
> >                                   struct of_timer_clk *of_clk)
> >  {
> >       int ret;
> > @@ -146,12 +146,12 @@ static __init int timer_of_clk_init(struct device_node *np,
> >       goto out;
> >  }
> >
> > -static __init void timer_of_base_exit(struct of_timer_base *of_base)
> > +static void timer_of_base_exit(struct of_timer_base *of_base)
> >  {
> >       iounmap(of_base->base);
> >  }
> >
> > -static __init int timer_of_base_init(struct device_node *np,
> > +static int timer_of_base_init(struct device_node *np,
> >                                    struct of_timer_base *of_base)
> >  {
> >       of_base->base = of_base->name ?
> > @@ -165,7 +165,7 @@ static __init int timer_of_base_init(struct device_node *np,
> >       return 0;
> >  }
> >
> > -int __init timer_of_init(struct device_node *np, struct timer_of *to)
> > +int timer_of_init(struct device_node *np, struct timer_of *to)
> >  {
> >       int ret = -EINVAL;
> >       int flags = 0;
> > @@ -209,6 +209,7 @@ int __init timer_of_init(struct device_node *np, struct timer_of *to)
> >               timer_of_base_exit(&to->of_base);
> >       return ret;
> >  }
> > +EXPORT_SYMBOL_GPL(timer_of_init);
> >
> >  /**
> >   * timer_of_cleanup - release timer_of resources
> > @@ -217,7 +218,7 @@ int __init timer_of_init(struct device_node *np, struct timer_of *to)
> >   * Release the resources that has been used in timer_of_init().
> >   * This function should be called in init error cases
> >   */
> > -void __init timer_of_cleanup(struct timer_of *to)
> > +void timer_of_cleanup(struct timer_of *to)
> >  {
> >       if (to->flags & TIMER_OF_IRQ)
> >               timer_of_irq_exit(&to->of_irq);
> > diff --git a/drivers/clocksource/timer-of.h b/drivers/clocksource/timer-of.h
> > index a5478f3e8589..1b8cfac5900a 100644
> > --- a/drivers/clocksource/timer-of.h
> > +++ b/drivers/clocksource/timer-of.h
> > @@ -66,9 +66,9 @@ static inline unsigned long timer_of_period(struct timer_of *to)
> >       return to->of_clk.period;
> >  }
> >
> > -extern int __init timer_of_init(struct device_node *np,
> > +extern int timer_of_init(struct device_node *np,
> >                               struct timer_of *to);
> >
> > -extern void __init timer_of_cleanup(struct timer_of *to);
> > +extern void timer_of_cleanup(struct timer_of *to);
> >
> >  #endif
> >
>
>
> --
> <http://www.linaro.org/> Linaro.org │ Open source software for ARM SoCs
>
> Follow Linaro:  <http://www.facebook.com/pages/Linaro> Facebook |
> <http://twitter.com/#!/linaroorg> Twitter |
> <http://www.linaro.org/linaro-blog/> Blog

  reply	other threads:[~2021-08-20  7:46 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-07-15  6:54 [PATCH v2 0/3] Add module build support for timer driver Chunyan Zhang
2021-07-15  6:54 ` [PATCH v2 1/3] drivers/clocksource/timer-of: Remove __init markings Chunyan Zhang
2021-08-01  6:17   ` kernel test robot
2021-08-12  6:39     ` Chunyan Zhang
2021-08-12  7:58       ` [kbuild-all] " Chen, Rong A
2021-08-12 14:49       ` Thomas Gleixner
2021-08-13  2:29         ` Chunyan Zhang
2021-08-13 13:33   ` Daniel Lezcano
2021-08-20  7:45     ` Chunyan Zhang [this message]
2021-07-15  6:54 ` [PATCH v2 2/3] clocksource/drivers/timer-of: Add boilerplate macros for timer module driver Chunyan Zhang
2021-07-15  6:54 ` [PATCH v2 3/3] clocksource/drivers/sprd: Add module support to Unisoc timer Chunyan Zhang
2021-08-13 16:00   ` Daniel Lezcano
2021-08-13 17:44     ` Saravana Kannan
2021-08-20  7:46     ` Chunyan Zhang

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='CAAfSe-t9k1j_-XObnEhL93q3oZJs0bq3=7czrXfBO0ja=ndYTw@mail.gmail.com' \
    --to=zhang.lyra@gmail.com \
    --cc=baolin.wang7@gmail.com \
    --cc=chunyan.zhang@unisoc.com \
    --cc=daniel.lezcano@linaro.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=orsonzhai@gmail.com \
    --cc=saravanak@google.com \
    --cc=tglx@linutronix.de \
    --subject='Re: [PATCH v2 1/3] drivers/clocksource/timer-of: Remove __init markings' \
    /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

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).