linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] clocksource: dw_apb_timer_of: Mark a few more functions as __init
@ 2013-10-01  8:38 Uwe Kleine-König
  2013-10-01  9:01 ` Baruch Siach
  2013-10-02 10:22 ` Daniel Lezcano
  0 siblings, 2 replies; 4+ messages in thread
From: Uwe Kleine-König @ 2013-10-01  8:38 UTC (permalink / raw)
  To: linux-arm-kernel

These are all only called by dw_apb_timer_init which is an __init
function, too

Signed-off-by: Uwe Kleine-K?nig <u.kleine-koenig@pengutronix.de>
---
 drivers/clocksource/dw_apb_timer_of.c | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/drivers/clocksource/dw_apb_timer_of.c b/drivers/clocksource/dw_apb_timer_of.c
index 4cbae4f..993cdde 100644
--- a/drivers/clocksource/dw_apb_timer_of.c
+++ b/drivers/clocksource/dw_apb_timer_of.c
@@ -23,7 +23,7 @@
 #include <linux/clk.h>
 #include <linux/sched_clock.h>
 
-static void timer_get_base_and_rate(struct device_node *np,
+static void __init timer_get_base_and_rate(struct device_node *np,
 				    void __iomem **base, u32 *rate)
 {
 	struct clk *timer_clk;
@@ -55,11 +55,11 @@ static void timer_get_base_and_rate(struct device_node *np,
 
 try_clock_freq:
 	if (of_property_read_u32(np, "clock-freq", rate) &&
-		of_property_read_u32(np, "clock-frequency", rate))
+	    of_property_read_u32(np, "clock-frequency", rate))
 		panic("No clock nor clock-frequency property for %s", np->name);
 }
 
-static void add_clockevent(struct device_node *event_timer)
+static void __init add_clockevent(struct device_node *event_timer)
 {
 	void __iomem *iobase;
 	struct dw_apb_clock_event_device *ced;
@@ -82,7 +82,7 @@ static void add_clockevent(struct device_node *event_timer)
 static void __iomem *sched_io_base;
 static u32 sched_rate;
 
-static void add_clocksource(struct device_node *source_timer)
+static void __init add_clocksource(struct device_node *source_timer)
 {
 	void __iomem *iobase;
 	struct dw_apb_clocksource *cs;
@@ -117,7 +117,7 @@ static const struct of_device_id sptimer_ids[] __initconst = {
 	{ /* Sentinel */ },
 };
 
-static void init_sched_clock(void)
+static void __init init_sched_clock(void)
 {
 	struct device_node *sched_timer;
 
-- 
1.8.4.rc3

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* [PATCH] clocksource: dw_apb_timer_of: Mark a few more functions as __init
  2013-10-01  8:38 [PATCH] clocksource: dw_apb_timer_of: Mark a few more functions as __init Uwe Kleine-König
@ 2013-10-01  9:01 ` Baruch Siach
  2013-10-01  9:11   ` Uwe Kleine-König
  2013-10-02 10:22 ` Daniel Lezcano
  1 sibling, 1 reply; 4+ messages in thread
From: Baruch Siach @ 2013-10-01  9:01 UTC (permalink / raw)
  To: linux-arm-kernel

Hi Uwe,

On Tue, Oct 01, 2013 at 10:38:12AM +0200, Uwe Kleine-K?nig wrote:
> These are all only called by dw_apb_timer_init which is an __init
> function, too
> 
> Signed-off-by: Uwe Kleine-K?nig <u.kleine-koenig@pengutronix.de>
> ---
>  drivers/clocksource/dw_apb_timer_of.c | 10 +++++-----
>  1 file changed, 5 insertions(+), 5 deletions(-)
> 
> diff --git a/drivers/clocksource/dw_apb_timer_of.c b/drivers/clocksource/dw_apb_timer_of.c
> index 4cbae4f..993cdde 100644
> --- a/drivers/clocksource/dw_apb_timer_of.c
> +++ b/drivers/clocksource/dw_apb_timer_of.c
> @@ -23,7 +23,7 @@
>  #include <linux/clk.h>
>  #include <linux/sched_clock.h>
>  
> -static void timer_get_base_and_rate(struct device_node *np,
> +static void __init timer_get_base_and_rate(struct device_node *np,
>  				    void __iomem **base, u32 *rate)
>  {
>  	struct clk *timer_clk;
> @@ -55,11 +55,11 @@ static void timer_get_base_and_rate(struct device_node *np,
>  
>  try_clock_freq:
>  	if (of_property_read_u32(np, "clock-freq", rate) &&
> -		of_property_read_u32(np, "clock-frequency", rate))
> +	    of_property_read_u32(np, "clock-frequency", rate))

Unintended whitespace change?

baruch

>  		panic("No clock nor clock-frequency property for %s", np->name);
>  }
>  
> -static void add_clockevent(struct device_node *event_timer)
> +static void __init add_clockevent(struct device_node *event_timer)
>  {
>  	void __iomem *iobase;
>  	struct dw_apb_clock_event_device *ced;
> @@ -82,7 +82,7 @@ static void add_clockevent(struct device_node *event_timer)
>  static void __iomem *sched_io_base;
>  static u32 sched_rate;
>  
> -static void add_clocksource(struct device_node *source_timer)
> +static void __init add_clocksource(struct device_node *source_timer)
>  {
>  	void __iomem *iobase;
>  	struct dw_apb_clocksource *cs;
> @@ -117,7 +117,7 @@ static const struct of_device_id sptimer_ids[] __initconst = {
>  	{ /* Sentinel */ },
>  };
>  
> -static void init_sched_clock(void)
> +static void __init init_sched_clock(void)
>  {
>  	struct device_node *sched_timer;
>  
> -- 
> 1.8.4.rc3

-- 
     http://baruch.siach.name/blog/                  ~. .~   Tk Open Systems
=}------------------------------------------------ooO--U--Ooo------------{=
   - baruch at tkos.co.il - tel: +972.2.679.5364, http://www.tkos.co.il -

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [PATCH] clocksource: dw_apb_timer_of: Mark a few more functions as __init
  2013-10-01  9:01 ` Baruch Siach
@ 2013-10-01  9:11   ` Uwe Kleine-König
  0 siblings, 0 replies; 4+ messages in thread
From: Uwe Kleine-König @ 2013-10-01  9:11 UTC (permalink / raw)
  To: linux-arm-kernel

Hello Baruch,

On Tue, Oct 01, 2013 at 12:01:08PM +0300, Baruch Siach wrote:
> On Tue, Oct 01, 2013 at 10:38:12AM +0200, Uwe Kleine-K?nig wrote:
> > These are all only called by dw_apb_timer_init which is an __init
> > function, too
> > 
> > Signed-off-by: Uwe Kleine-K?nig <u.kleine-koenig@pengutronix.de>
> > ---
> >  drivers/clocksource/dw_apb_timer_of.c | 10 +++++-----
> >  1 file changed, 5 insertions(+), 5 deletions(-)
> > 
> > diff --git a/drivers/clocksource/dw_apb_timer_of.c b/drivers/clocksource/dw_apb_timer_of.c
> > index 4cbae4f..993cdde 100644
> > --- a/drivers/clocksource/dw_apb_timer_of.c
> > +++ b/drivers/clocksource/dw_apb_timer_of.c
> > @@ -23,7 +23,7 @@
> >  #include <linux/clk.h>
> >  #include <linux/sched_clock.h>
> >  
> > -static void timer_get_base_and_rate(struct device_node *np,
> > +static void __init timer_get_base_and_rate(struct device_node *np,
> >  				    void __iomem **base, u32 *rate)
> >  {
> >  	struct clk *timer_clk;
> > @@ -55,11 +55,11 @@ static void timer_get_base_and_rate(struct device_node *np,
> >  
> >  try_clock_freq:
> >  	if (of_property_read_u32(np, "clock-freq", rate) &&
> > -		of_property_read_u32(np, "clock-frequency", rate))
> > +	    of_property_read_u32(np, "clock-frequency", rate))
> 
> Unintended whitespace change?
Well no, it was intended and I wanted to mention it in the commit log,
but forgot about it. It read:

	if (something &&
		somethingelse)
		dosomething;

which is hard to read.

Best regards
Uwe

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

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [PATCH] clocksource: dw_apb_timer_of: Mark a few more functions as __init
  2013-10-01  8:38 [PATCH] clocksource: dw_apb_timer_of: Mark a few more functions as __init Uwe Kleine-König
  2013-10-01  9:01 ` Baruch Siach
@ 2013-10-02 10:22 ` Daniel Lezcano
  1 sibling, 0 replies; 4+ messages in thread
From: Daniel Lezcano @ 2013-10-02 10:22 UTC (permalink / raw)
  To: linux-arm-kernel

On 10/01/2013 10:38 AM, Uwe Kleine-K?nig wrote:
> These are all only called by dw_apb_timer_init which is an __init
> function, too
>
> Signed-off-by: Uwe Kleine-K?nig <u.kleine-koenig@pengutronix.de>
> ---

Applied to my tree for 3.13

Thanks
   -- Daniel

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

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2013-10-02 10:22 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-10-01  8:38 [PATCH] clocksource: dw_apb_timer_of: Mark a few more functions as __init Uwe Kleine-König
2013-10-01  9:01 ` Baruch Siach
2013-10-01  9:11   ` Uwe Kleine-König
2013-10-02 10:22 ` Daniel Lezcano

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