* [PATCH] clk: socfpga: fix compiler warnings for Cyclone5
@ 2019-04-08 14:49 Ian Abbott
2019-04-10 6:22 ` Sascha Hauer
0 siblings, 1 reply; 2+ messages in thread
From: Ian Abbott @ 2019-04-08 14:49 UTC (permalink / raw)
To: barebox; +Cc: Ian Abbott
When building for Cyclone5 SoCFPGA, the socfpga_a10_pll_init(),
socfpga_a10_perith_init() and socfpga_a10_gate_init() functions are
defined as dummy functions returning ERR_PTR(-ENOSYS). They are defined
with external linkage. With '-Wmissing-prototypes' GCC warns about
externally linked function definitions with no preceding prototype.
Define them as 'static inline' to avoid the compiler warnings.
(Note: Arria10 uses non-dummy versions of these functions declared
'extern' but defined elsewhere.)
Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
---
drivers/clk/socfpga/clk.h | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/drivers/clk/socfpga/clk.h b/drivers/clk/socfpga/clk.h
index 6d6c28344..cea3fcf5e 100644
--- a/drivers/clk/socfpga/clk.h
+++ b/drivers/clk/socfpga/clk.h
@@ -41,15 +41,15 @@ struct clk *socfpga_a10_pll_init(struct device_node *node);
struct clk *socfpga_a10_periph_init(struct device_node *node);
struct clk *socfpga_a10_gate_init(struct device_node *node);
#else
-struct clk *socfpga_a10_pll_init(struct device_node *node)
+static inline struct clk *socfpga_a10_pll_init(struct device_node *node)
{
return ERR_PTR(-ENOSYS);
}
-struct clk *socfpga_a10_periph_init(struct device_node *node)
+static inline struct clk *socfpga_a10_periph_init(struct device_node *node)
{
return ERR_PTR(-ENOSYS);
}
-struct clk *socfpga_a10_gate_init(struct device_node *node)
+static inline struct clk *socfpga_a10_gate_init(struct device_node *node)
{
return ERR_PTR(-ENOSYS);
}
--
2.20.1
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH] clk: socfpga: fix compiler warnings for Cyclone5
2019-04-08 14:49 [PATCH] clk: socfpga: fix compiler warnings for Cyclone5 Ian Abbott
@ 2019-04-10 6:22 ` Sascha Hauer
0 siblings, 0 replies; 2+ messages in thread
From: Sascha Hauer @ 2019-04-10 6:22 UTC (permalink / raw)
To: Ian Abbott; +Cc: barebox
On Mon, Apr 08, 2019 at 03:49:32PM +0100, Ian Abbott wrote:
> When building for Cyclone5 SoCFPGA, the socfpga_a10_pll_init(),
> socfpga_a10_perith_init() and socfpga_a10_gate_init() functions are
> defined as dummy functions returning ERR_PTR(-ENOSYS). They are defined
> with external linkage. With '-Wmissing-prototypes' GCC warns about
> externally linked function definitions with no preceding prototype.
> Define them as 'static inline' to avoid the compiler warnings.
>
> (Note: Arria10 uses non-dummy versions of these functions declared
> 'extern' but defined elsewhere.)
>
> Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
> ---
> drivers/clk/socfpga/clk.h | 6 +++---
> 1 file changed, 3 insertions(+), 3 deletions(-)
Applied, thanks
Sascha
--
Pengutronix e.K. | |
Industrial Linux Solutions | http://www.pengutronix.de/ |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 |
Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2019-04-10 6:22 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-04-08 14:49 [PATCH] clk: socfpga: fix compiler warnings for Cyclone5 Ian Abbott
2019-04-10 6:22 ` Sascha Hauer
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox