All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/1] log: uclass_get_name() depends on CONFIG_SPL_DM
@ 2020-06-08 16:04 Heinrich Schuchardt
  2020-06-08 17:12 ` Simon Glass
  2020-07-06  1:37 ` Simon Glass
  0 siblings, 2 replies; 3+ messages in thread
From: Heinrich Schuchardt @ 2020-06-08 16:04 UTC (permalink / raw)
  To: u-boot

If CONFIG_SPL_DM=n and CONFIG_SPL_LOG=y a build error occurs:

ld.bfd: common/built-in.o: in function `log_get_cat_name':
common/log.c:48: undefined reference to `uclass_get_name'
make[1]: *** [scripts/Makefile.spl:422: spl/u-boot-spl] Error 1

Call uclass_get_name() only if DM is enabled.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
---
 common/log.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/common/log.c b/common/log.c
index c5b9b489ca..d7ce74f6b3 100644
--- a/common/log.c
+++ b/common/log.c
@@ -45,7 +45,11 @@ const char *log_get_cat_name(enum log_category_t cat)
 	if (cat >= LOGC_NONE)
 		return log_cat_name[cat - LOGC_NONE];

+#if CONFIG_IS_ENABLED(DM)
 	name = uclass_get_name((enum uclass_id)cat);
+#else
+	name = NULL;
+#endif

 	return name ? name : "<missing>";
 }
--
2.26.2

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

* [PATCH 1/1] log: uclass_get_name() depends on CONFIG_SPL_DM
  2020-06-08 16:04 [PATCH 1/1] log: uclass_get_name() depends on CONFIG_SPL_DM Heinrich Schuchardt
@ 2020-06-08 17:12 ` Simon Glass
  2020-07-06  1:37 ` Simon Glass
  1 sibling, 0 replies; 3+ messages in thread
From: Simon Glass @ 2020-06-08 17:12 UTC (permalink / raw)
  To: u-boot

Hi Heinrich,

On Mon, 8 Jun 2020 at 10:04, Heinrich Schuchardt <xypron.glpk@gmx.de> wrote:
>
> If CONFIG_SPL_DM=n and CONFIG_SPL_LOG=y a build error occurs:
>
> ld.bfd: common/built-in.o: in function `log_get_cat_name':
> common/log.c:48: undefined reference to `uclass_get_name'
> make[1]: *** [scripts/Makefile.spl:422: spl/u-boot-spl] Error 1
>
> Call uclass_get_name() only if DM is enabled.
>
> Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
> ---
>  common/log.c | 4 ++++
>  1 file changed, 4 insertions(+)

Reviewed-by: Simon Glass <sjg@chromium.org>

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

* [PATCH 1/1] log: uclass_get_name() depends on CONFIG_SPL_DM
  2020-06-08 16:04 [PATCH 1/1] log: uclass_get_name() depends on CONFIG_SPL_DM Heinrich Schuchardt
  2020-06-08 17:12 ` Simon Glass
@ 2020-07-06  1:37 ` Simon Glass
  1 sibling, 0 replies; 3+ messages in thread
From: Simon Glass @ 2020-07-06  1:37 UTC (permalink / raw)
  To: u-boot

Hi Heinrich,

On Mon, 8 Jun 2020 at 10:04, Heinrich Schuchardt <xypron.glpk@gmx.de> wrote:
>
> If CONFIG_SPL_DM=n and CONFIG_SPL_LOG=y a build error occurs:
>
> ld.bfd: common/built-in.o: in function `log_get_cat_name':
> common/log.c:48: undefined reference to `uclass_get_name'
> make[1]: *** [scripts/Makefile.spl:422: spl/u-boot-spl] Error 1
>
> Call uclass_get_name() only if DM is enabled.
>
> Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
> ---
>  common/log.c | 4 ++++
>  1 file changed, 4 insertions(+)

Reviewed-by: Simon Glass <sjg@chromium.org>

Applied to u-boot-dm/next, thanks!

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

end of thread, other threads:[~2020-07-06  1:37 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-06-08 16:04 [PATCH 1/1] log: uclass_get_name() depends on CONFIG_SPL_DM Heinrich Schuchardt
2020-06-08 17:12 ` Simon Glass
2020-07-06  1:37 ` Simon Glass

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.