From: Ian Abbott <abbotti@mev.co.uk>
To: barebox@lists.infradead.org
Cc: Ian Abbott <abbotti@mev.co.uk>
Subject: [PATCH] clk: socfpga: fix compiler warnings for Cyclone5
Date: Mon, 8 Apr 2019 15:49:32 +0100 [thread overview]
Message-ID: <20190408144932.29201-1-abbotti@mev.co.uk> (raw)
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
next reply other threads:[~2019-04-08 14:49 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-04-08 14:49 Ian Abbott [this message]
2019-04-10 6:22 ` Sascha Hauer
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=20190408144932.29201-1-abbotti@mev.co.uk \
--to=abbotti@mev.co.uk \
--cc=barebox@lists.infradead.org \
/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
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox