* [PATCH] sunxi: Silence warning about non-static inline function
@ 2020-05-07 23:02 Samuel Holland
2020-06-01 16:56 ` Jagan Teki
0 siblings, 1 reply; 2+ messages in thread
From: Samuel Holland @ 2020-05-07 23:02 UTC (permalink / raw)
To: u-boot
When compiling with CONFIG_SPL_SERIAL=n, gcc warns about
mbus_configure_port not being marked as static:
In file included from include/common.h:34,
from arch/arm/mach-sunxi/dram_sunxi_dw.c:11:
include/log.h:185:4: warning: 'printf' is static but used in inline function 'mbus_configure_port' which is not static
185 | printf(pr_fmt(fmt), ##args); \
| ^~~~~~
include/log.h:192:2: note: in expansion of macro 'debug_cond'
192 | debug_cond(_DEBUG, fmt, ##args)
| ^~~~~~~~~~
arch/arm/mach-sunxi/dram_sunxi_dw.c:100:2: note: in expansion of macro 'debug'
100 | debug("MBUS port %d cfg0 %08x cfg1 %08x\n", port, cfg0, cfg1);
| ^~~~~
Fix this by updating the function accordingly.
Signed-off-by: Samuel Holland <samuel@sholland.org>
---
arch/arm/mach-sunxi/dram_sunxi_dw.c | 18 +++++++++---------
1 file changed, 9 insertions(+), 9 deletions(-)
diff --git a/arch/arm/mach-sunxi/dram_sunxi_dw.c b/arch/arm/mach-sunxi/dram_sunxi_dw.c
index 85e7a1874e..f8d4b32e37 100644
--- a/arch/arm/mach-sunxi/dram_sunxi_dw.c
+++ b/arch/arm/mach-sunxi/dram_sunxi_dw.c
@@ -76,15 +76,15 @@ enum {
MBUS_QOS_HIGHEST
};
-inline void mbus_configure_port(u8 port,
- bool bwlimit,
- bool priority,
- u8 qos, /* MBUS_QOS_LOWEST .. MBUS_QOS_HIGEST */
- u8 waittime, /* 0 .. 0xf */
- u8 acs, /* 0 .. 0xff */
- u16 bwl0, /* 0 .. 0xffff, bandwidth limit in MB/s */
- u16 bwl1,
- u16 bwl2)
+static inline void mbus_configure_port(u8 port,
+ bool bwlimit,
+ bool priority,
+ u8 qos, /* MBUS_QOS_LOWEST .. MBUS_QOS_HIGEST */
+ u8 waittime, /* 0 .. 0xf */
+ u8 acs, /* 0 .. 0xff */
+ u16 bwl0, /* 0 .. 0xffff, bandwidth limit in MB/s */
+ u16 bwl1,
+ u16 bwl2)
{
struct sunxi_mctl_com_reg * const mctl_com =
(struct sunxi_mctl_com_reg *)SUNXI_DRAM_COM_BASE;
--
2.24.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* [PATCH] sunxi: Silence warning about non-static inline function
2020-05-07 23:02 [PATCH] sunxi: Silence warning about non-static inline function Samuel Holland
@ 2020-06-01 16:56 ` Jagan Teki
0 siblings, 0 replies; 2+ messages in thread
From: Jagan Teki @ 2020-06-01 16:56 UTC (permalink / raw)
To: u-boot
On Fri, May 8, 2020 at 4:31 AM Samuel Holland <samuel@sholland.org> wrote:
>
> When compiling with CONFIG_SPL_SERIAL=n, gcc warns about
> mbus_configure_port not being marked as static:
>
> In file included from include/common.h:34,
> from arch/arm/mach-sunxi/dram_sunxi_dw.c:11:
> include/log.h:185:4: warning: 'printf' is static but used in inline function 'mbus_configure_port' which is not static
> 185 | printf(pr_fmt(fmt), ##args); \
> | ^~~~~~
> include/log.h:192:2: note: in expansion of macro 'debug_cond'
> 192 | debug_cond(_DEBUG, fmt, ##args)
> | ^~~~~~~~~~
> arch/arm/mach-sunxi/dram_sunxi_dw.c:100:2: note: in expansion of macro 'debug'
> 100 | debug("MBUS port %d cfg0 %08x cfg1 %08x\n", port, cfg0, cfg1);
> | ^~~~~
>
> Fix this by updating the function accordingly.
>
> Signed-off-by: Samuel Holland <samuel@sholland.org>
> ---
Applied to u-boot-sunxi/master
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2020-06-01 16:56 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-05-07 23:02 [PATCH] sunxi: Silence warning about non-static inline function Samuel Holland
2020-06-01 16:56 ` Jagan Teki
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.