Message ID | 1418674072-15259-1-git-send-email-khilman@kernel.org |
---|---|
State | Accepted |
Delegated to: | Tom Rini |
Headers | show |
On 15 December 2014 at 13:07, Kevin Hilman <khilman@kernel.org> wrote: > From: Kevin Hilman <khilman@linaro.org> > > When CONFIG_TRACE is disabled, linking fails with: > > common/built-in.o:(.data.init_sequence_f+0x8): undefined reference to `trace_early_init' > > To fix, wrap trace init calls with #ifdef CONFIG_TRACE. > > While at it, remove the static inline version of the init call from > trace.h as suggested by Simon Glass, since it doesnt work. > > Cc: Simon Glass <sjg@chromium.org> > Cc: Tom Rini <trini@ti.com> > Signed-off-by: Kevin Hilman <khilman@linaro.org> > --- > Applies to v2015.01-rc3 > > v3: Actually remove the static inlines this time. :/ > > common/board_f.c | 2 ++ > include/trace.h | 7 ------- > 2 files changed, 2 insertions(+), 7 deletions(-) Acked-by: Simon Glass <sjg@chromium.org>
On Mon, Dec 15, 2014 at 12:07:52PM -0800, Kevin Hilman wrote: > From: Kevin Hilman <khilman@linaro.org> > > When CONFIG_TRACE is disabled, linking fails with: > > common/built-in.o:(.data.init_sequence_f+0x8): undefined reference to `trace_early_init' > > To fix, wrap trace init calls with #ifdef CONFIG_TRACE. > > While at it, remove the static inline version of the init call from > trace.h as suggested by Simon Glass, since it doesnt work. > > Cc: Simon Glass <sjg@chromium.org> > Cc: Tom Rini <trini@ti.com> > Signed-off-by: Kevin Hilman <khilman@linaro.org> > Acked-by: Simon Glass <sjg@chromium.org> Applied to u-boot/master, thanks!
diff --git a/common/board_f.c b/common/board_f.c index 98c9c728ce73..cfd77f865361 100644 --- a/common/board_f.c +++ b/common/board_f.c @@ -813,7 +813,9 @@ static init_fnc_t init_sequence_f[] = { #endif setup_mon_len, setup_fdt, +#ifdef CONFIG_TRACE trace_early_init, +#endif initf_malloc, #if defined(CONFIG_MPC85xx) || defined(CONFIG_MPC86xx) /* TODO: can this go into arch_cpu_init()? */ diff --git a/include/trace.h b/include/trace.h index 871327fb358a..09a38d782fc0 100644 --- a/include/trace.h +++ b/include/trace.h @@ -89,14 +89,7 @@ int trace_list_calls(void *buff, int buff_size, unsigned int *needed); */ void trace_set_enabled(int enabled); -#ifdef CONFIG_TRACE_EARLY int trace_early_init(void); -#else -static inline int trace_early_init(void) -{ - return 0; -} -#endif /** * Init the trace system