]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
sunxi: Silence warning about non-static inline function
authorSamuel Holland <samuel@sholland.org>
Thu, 7 May 2020 23:02:33 +0000 (18:02 -0500)
committerJagan Teki <jagan@amarulasolutions.com>
Mon, 1 Jun 2020 17:08:08 +0000 (22:38 +0530)
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>
Reviewed-by: Jagan Teki <jagan@amarulasolutions.com>
arch/arm/mach-sunxi/dram_sunxi_dw.c

index 5d84798ca4389d90ac8c1124e707fa2183cea626..a462538521966572997e09c42ca0585cfb01152c 100644 (file)
@@ -79,15 +79,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;