linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] [BUG] clk: rockchip: don't mark clock names as initconst
@ 2016-01-01 13:42 Arnd Bergmann
  2016-01-01 17:06 ` Heiko Stübner
  0 siblings, 1 reply; 5+ messages in thread
From: Arnd Bergmann @ 2016-01-01 13:42 UTC (permalink / raw)
  To: linux-arm-kernel

The latest changes to the rockchip clk implementation cause
tons of warnings and/or errors (depending on the configuration):

WARNING: vmlinux.o(.data+0x125394): Section mismatch in reference from the variable __compound_literal.125 to the (unknown reference) .init.rodata:(unknown)

The reason is a compount literal in a macro that refers to an
object in the .init.rodata section:

 #define COMPOSITE_FRACMUX(_id, cname, pname, f, mo, df, go, gs, gf, ch) \
        {                                                       \
		...
                .child          = &(struct rockchip_clk_branch)ch, \
        }

'ch' here is placed in .data, and I could find no way to override that
using an attribute or pragma because there is no identifier associated
with it.

This patch avoids the warning by placing the names in .rodata rather than
.init.rodata. However, it is not an ideal solution because we really
want all those data structures to be discarded along with the initdata.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Fixes: 8ca1ca8f6039 ("clk: rockchip: handle mux dependency of fractional dividers")

diff --git a/drivers/clk/rockchip/clk.h b/drivers/clk/rockchip/clk.h
index 3f71ee5d1bc9..5cadf5e3fb16 100644
--- a/drivers/clk/rockchip/clk.h
+++ b/drivers/clk/rockchip/clk.h
@@ -244,7 +244,7 @@ struct clk *rockchip_clk_register_inverter(const char *name,
 				void __iomem *reg, int shift, int flags,
 				spinlock_t *lock);
 
-#define PNAME(x) static const char *const x[] __initconst
+#define PNAME(x) static const char *const x[]
 
 enum rockchip_clk_branch_type {
 	branch_composite,

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

end of thread, other threads:[~2016-01-02 21:42 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-01-01 13:42 [PATCH] [BUG] clk: rockchip: don't mark clock names as initconst Arnd Bergmann
2016-01-01 17:06 ` Heiko Stübner
2016-01-01 21:50   ` Arnd Bergmann
2016-01-01 22:05     ` Heiko Stübner
2016-01-02 21:42       ` Michael 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).