* [PATCH] dm: migrate the dm_warn to use the log macro
@ 2021-07-30 10:13 Patrick Delaunay
2021-07-31 16:59 ` Simon Glass
2021-08-09 2:31 ` Simon Glass
0 siblings, 2 replies; 3+ messages in thread
From: Patrick Delaunay @ 2021-07-30 10:13 UTC (permalink / raw)
To: u-boot; +Cc: Patrick Delaunay, Simon Glass, U-Boot STM32
Migrate the dm_warn function to log macro with
LOGC_DM category and LOGL_WARNING level.
This macro allows filtering with log command and allows
output on all log backend.
Signed-off-by: Patrick Delaunay <patrick.delaunay@foss.st.com>
---
drivers/core/util.c | 11 -----------
include/dm/util.h | 2 +-
2 files changed, 1 insertion(+), 12 deletions(-)
diff --git a/drivers/core/util.c b/drivers/core/util.c
index 91e93b0cf1..5be4ee79de 100644
--- a/drivers/core/util.c
+++ b/drivers/core/util.c
@@ -11,17 +11,6 @@
#include <linux/libfdt.h>
#include <vsprintf.h>
-#if CONFIG_IS_ENABLED(DM_WARN)
-void dm_warn(const char *fmt, ...)
-{
- va_list args;
-
- va_start(args, fmt);
- vprintf(fmt, args);
- va_end(args);
-}
-#endif
-
int list_count_items(struct list_head *head)
{
struct list_head *node;
diff --git a/include/dm/util.h b/include/dm/util.h
index 138893c935..c634e470e7 100644
--- a/include/dm/util.h
+++ b/include/dm/util.h
@@ -7,7 +7,7 @@
#define __DM_UTIL_H
#if CONFIG_IS_ENABLED(DM_WARN)
-void dm_warn(const char *fmt, ...);
+#define dm_warn(fmt...) log(LOGC_DM, LOGL_WARNING, ##fmt)
#else
static inline void dm_warn(const char *fmt, ...)
{
--
2.25.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] dm: migrate the dm_warn to use the log macro
2021-07-30 10:13 [PATCH] dm: migrate the dm_warn to use the log macro Patrick Delaunay
@ 2021-07-31 16:59 ` Simon Glass
2021-08-09 2:31 ` Simon Glass
1 sibling, 0 replies; 3+ messages in thread
From: Simon Glass @ 2021-07-31 16:59 UTC (permalink / raw)
To: Patrick Delaunay; +Cc: U-Boot Mailing List, U-Boot STM32
On Fri, 30 Jul 2021 at 04:13, Patrick Delaunay
<patrick.delaunay@foss.st.com> wrote:
>
> Migrate the dm_warn function to log macro with
> LOGC_DM category and LOGL_WARNING level.
>
> This macro allows filtering with log command and allows
> output on all log backend.
>
> Signed-off-by: Patrick Delaunay <patrick.delaunay@foss.st.com>
> ---
>
> drivers/core/util.c | 11 -----------
> include/dm/util.h | 2 +-
> 2 files changed, 1 insertion(+), 12 deletions(-)
Reviewed-by: Simon Glass <sjg@chromium.org>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] dm: migrate the dm_warn to use the log macro
2021-07-30 10:13 [PATCH] dm: migrate the dm_warn to use the log macro Patrick Delaunay
2021-07-31 16:59 ` Simon Glass
@ 2021-08-09 2:31 ` Simon Glass
1 sibling, 0 replies; 3+ messages in thread
From: Simon Glass @ 2021-08-09 2:31 UTC (permalink / raw)
To: Simon Glass; +Cc: U-Boot Mailing List, Patrick Delaunay, U-Boot STM32
On Fri, 30 Jul 2021 at 04:13, Patrick Delaunay
<patrick.delaunay@foss.st.com> wrote:
>
> Migrate the dm_warn function to log macro with
> LOGC_DM category and LOGL_WARNING level.
>
> This macro allows filtering with log command and allows
> output on all log backend.
>
> Signed-off-by: Patrick Delaunay <patrick.delaunay@foss.st.com>
> ---
>
> drivers/core/util.c | 11 -----------
> include/dm/util.h | 2 +-
> 2 files changed, 1 insertion(+), 12 deletions(-)
Reviewed-by: Simon Glass <sjg@chromium.org>
Applied to u-boot-dm, thanks!
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2021-08-09 2:32 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-07-30 10:13 [PATCH] dm: migrate the dm_warn to use the log macro Patrick Delaunay
2021-07-31 16:59 ` Simon Glass
2021-08-09 2:31 ` 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.