linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] clk: efm32: fix build warning
@ 2014-09-08 15:19 Arnd Bergmann
  2014-09-08 17:48 ` Uwe Kleine-König
  0 siblings, 1 reply; 4+ messages in thread
From: Arnd Bergmann @ 2014-09-08 15:19 UTC (permalink / raw)
  To: linux-arm-kernel

The normal prototype for of clk init functions is to return void,
while efm32gg_cmu_init return an int, resulting in this harmless
build warning:

drivers/clk/clk-efm32gg.c:81:189: warning: comparison of distinct pointer types lacks a cast [enabled by default]
 CLK_OF_DECLARE(efm32ggcmu, "efm32gg,cmu", efm32gg_cmu_init);

This changes the return type to avoid the warning.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>

diff --git a/drivers/clk/clk-efm32gg.c b/drivers/clk/clk-efm32gg.c
index bac2ddf49d02..73a8d0ff530c 100644
--- a/drivers/clk/clk-efm32gg.c
+++ b/drivers/clk/clk-efm32gg.c
@@ -22,7 +22,7 @@ static struct clk_onecell_data clk_data = {
 	.clk_num = ARRAY_SIZE(clk),
 };
 
-static int __init efm32gg_cmu_init(struct device_node *np)
+static void __init efm32gg_cmu_init(struct device_node *np)
 {
 	int i;
 	void __iomem *base;
@@ -33,7 +33,7 @@ static int __init efm32gg_cmu_init(struct device_node *np)
 	base = of_iomap(np, 0);
 	if (!base) {
 		pr_warn("Failed to map address range for efm32gg,cmu node\n");
-		return -EADDRNOTAVAIL;
+		return;
 	}
 
 	clk[clk_HFXO] = clk_register_fixed_rate(NULL, "HFXO", NULL,
@@ -76,6 +76,6 @@ static int __init efm32gg_cmu_init(struct device_node *np)
 	clk[clk_HFPERCLKDAC0] = clk_register_gate(NULL, "HFPERCLK.DAC0",
 			"HFXO", 0, base + CMU_HFPERCLKEN0, 17, 0, NULL);
 
-	return of_clk_add_provider(np, of_clk_src_onecell_get, &clk_data);
+	of_clk_add_provider(np, of_clk_src_onecell_get, &clk_data);
 }
 CLK_OF_DECLARE(efm32ggcmu, "efm32gg,cmu", efm32gg_cmu_init);

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

* [PATCH] clk: efm32: fix build warning
  2014-09-08 15:19 [PATCH] clk: efm32: fix build warning Arnd Bergmann
@ 2014-09-08 17:48 ` Uwe Kleine-König
  2014-09-08 18:18   ` Arnd Bergmann
  0 siblings, 1 reply; 4+ messages in thread
From: Uwe Kleine-König @ 2014-09-08 17:48 UTC (permalink / raw)
  To: linux-arm-kernel

On Mon, Sep 08, 2014 at 05:19:40PM +0200, Arnd Bergmann wrote:
> The normal prototype for of clk init functions is to return void,
> while efm32gg_cmu_init return an int, resulting in this harmless
> build warning:
> 
> drivers/clk/clk-efm32gg.c:81:189: warning: comparison of distinct pointer types lacks a cast [enabled by default]
>  CLK_OF_DECLARE(efm32ggcmu, "efm32gg,cmu", efm32gg_cmu_init);
> 
> This changes the return type to avoid the warning.
> 
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
I already sent the exact same patch some time ago, even the sha1 sums in
the diff match.

	Subject: [PATCH] clk/efm32gg: fix dt init prototype
	Message-Id: <1406558301-17866-1-git-send-email-u.kleine-koenig@pengutronix.de>
	Date: Mon, 28 Jul 2014 16:38:21 +0200

Thanks
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] clk: efm32: fix build warning
  2014-09-08 17:48 ` Uwe Kleine-König
@ 2014-09-08 18:18   ` Arnd Bergmann
  2014-09-09 20:52     ` Mike Turquette
  0 siblings, 1 reply; 4+ messages in thread
From: Arnd Bergmann @ 2014-09-08 18:18 UTC (permalink / raw)
  To: linux-arm-kernel

On Monday 08 September 2014 19:48:05 Uwe Kleine-K?nig wrote:
> On Mon, Sep 08, 2014 at 05:19:40PM +0200, Arnd Bergmann wrote:
> > The normal prototype for of clk init functions is to return void,
> > while efm32gg_cmu_init return an int, resulting in this harmless
> > build warning:
> > 
> > drivers/clk/clk-efm32gg.c:81:189: warning: comparison of distinct pointer types lacks a cast [enabled by default]
> >  CLK_OF_DECLARE(efm32ggcmu, "efm32gg,cmu", efm32gg_cmu_init);
> > 
> > This changes the return type to avoid the warning.
> > 
> > Signed-off-by: Arnd Bergmann <arnd@arndb.de>
> I already sent the exact same patch some time ago, even the sha1 sums in
> the diff match.
> 
>         Subject: [PATCH] clk/efm32gg: fix dt init prototype
>         Message-Id: <1406558301-17866-1-git-send-email-u.kleine-koenig@pengutronix.de>
>         Date: Mon, 28 Jul 2014 16:38:21 +0200
> 

Ok, good to see that we came to the same conclusion.

Mike, could you please try to get Uwe's patch into 3.17?

	Arnd

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

* [PATCH] clk: efm32: fix build warning
  2014-09-08 18:18   ` Arnd Bergmann
@ 2014-09-09 20:52     ` Mike Turquette
  0 siblings, 0 replies; 4+ messages in thread
From: Mike Turquette @ 2014-09-09 20:52 UTC (permalink / raw)
  To: linux-arm-kernel

Quoting Arnd Bergmann (2014-09-08 11:18:57)
> On Monday 08 September 2014 19:48:05 Uwe Kleine-K?nig wrote:
> > On Mon, Sep 08, 2014 at 05:19:40PM +0200, Arnd Bergmann wrote:
> > > The normal prototype for of clk init functions is to return void,
> > > while efm32gg_cmu_init return an int, resulting in this harmless
> > > build warning:
> > > 
> > > drivers/clk/clk-efm32gg.c:81:189: warning: comparison of distinct pointer types lacks a cast [enabled by default]
> > >  CLK_OF_DECLARE(efm32ggcmu, "efm32gg,cmu", efm32gg_cmu_init);
> > > 
> > > This changes the return type to avoid the warning.
> > > 
> > > Signed-off-by: Arnd Bergmann <arnd@arndb.de>
> > I already sent the exact same patch some time ago, even the sha1 sums in
> > the diff match.
> > 
> >         Subject: [PATCH] clk/efm32gg: fix dt init prototype
> >         Message-Id: <1406558301-17866-1-git-send-email-u.kleine-koenig@pengutronix.de>
> >         Date: Mon, 28 Jul 2014 16:38:21 +0200
> > 
> 
> Ok, good to see that we came to the same conclusion.
> 
> Mike, could you please try to get Uwe's patch into 3.17?

Done. Added your reviewed-by tag as well.

Regards,
Mike

> 
>         Arnd

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

end of thread, other threads:[~2014-09-09 20:52 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-09-08 15:19 [PATCH] clk: efm32: fix build warning Arnd Bergmann
2014-09-08 17:48 ` Uwe Kleine-König
2014-09-08 18:18   ` Arnd Bergmann
2014-09-09 20:52     ` Mike Turquette

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