* [U-Boot] [PATCH] drivers: firmware: psci: use pr_* log functions instead of printf()
@ 2017-11-29 6:04 Masahiro Yamada
2017-12-02 3:28 ` Simon Glass
2017-12-04 18:36 ` [U-Boot] " Tom Rini
0 siblings, 2 replies; 3+ messages in thread
From: Masahiro Yamada @ 2017-11-29 6:04 UTC (permalink / raw)
To: u-boot
In Linux, the warning messages are printed out by pr_warn().
We can use Linux-like log functions in tree-wide.
Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
---
drivers/firmware/psci.c | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)
diff --git a/drivers/firmware/psci.c b/drivers/firmware/psci.c
index 451fbde..cef8adc 100644
--- a/drivers/firmware/psci.c
+++ b/drivers/firmware/psci.c
@@ -13,6 +13,7 @@
#include <libfdt.h>
#include <linux/arm-smccc.h>
#include <linux/errno.h>
+#include <linux/printk.h>
#include <linux/psci.h>
psci_fn *invoke_psci_fn;
@@ -48,7 +49,7 @@ static int psci_bind(struct udevice *dev)
ret = device_bind_driver(dev, "psci-sysreset", "psci-sysreset",
NULL);
if (ret)
- debug("PSCI System Reset was not bound.\n");
+ pr_debug("PSCI System Reset was not bound.\n");
}
return 0;
@@ -62,7 +63,7 @@ static int psci_probe(struct udevice *dev)
method = fdt_stringlist_get(gd->fdt_blob, dev_of_offset(dev), "method",
0, NULL);
if (!method) {
- printf("missing \"method\" property\n");
+ pr_warn("missing \"method\" property\n");
return -ENXIO;
}
@@ -71,7 +72,7 @@ static int psci_probe(struct udevice *dev)
} else if (!strcmp("smc", method)) {
invoke_psci_fn = __invoke_psci_fn_smc;
} else {
- printf("invalid \"method\" property: %s\n", method);
+ pr_warn("invalid \"method\" property: %s\n", method);
return -EINVAL;
}
--
2.7.4
^ permalink raw reply related [flat|nested] 3+ messages in thread* [U-Boot] [PATCH] drivers: firmware: psci: use pr_* log functions instead of printf()
2017-11-29 6:04 [U-Boot] [PATCH] drivers: firmware: psci: use pr_* log functions instead of printf() Masahiro Yamada
@ 2017-12-02 3:28 ` Simon Glass
2017-12-04 18:36 ` [U-Boot] " Tom Rini
1 sibling, 0 replies; 3+ messages in thread
From: Simon Glass @ 2017-12-02 3:28 UTC (permalink / raw)
To: u-boot
On 28 November 2017 at 23:04, Masahiro Yamada
<yamada.masahiro@socionext.com> wrote:
> In Linux, the warning messages are printed out by pr_warn().
>
> We can use Linux-like log functions in tree-wide.
>
> Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
> ---
>
> drivers/firmware/psci.c | 7 ++++---
> 1 file changed, 4 insertions(+), 3 deletions(-)
Reviewed-by: Simon Glass <sjg@chromium.org>
^ permalink raw reply [flat|nested] 3+ messages in thread
* [U-Boot] drivers: firmware: psci: use pr_* log functions instead of printf()
2017-11-29 6:04 [U-Boot] [PATCH] drivers: firmware: psci: use pr_* log functions instead of printf() Masahiro Yamada
2017-12-02 3:28 ` Simon Glass
@ 2017-12-04 18:36 ` Tom Rini
1 sibling, 0 replies; 3+ messages in thread
From: Tom Rini @ 2017-12-04 18:36 UTC (permalink / raw)
To: u-boot
On Wed, Nov 29, 2017 at 03:04:40PM +0900, Masahiro Yamada wrote:
> In Linux, the warning messages are printed out by pr_warn().
>
> We can use Linux-like log functions in tree-wide.
>
> Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
> Reviewed-by: Simon Glass <sjg@chromium.org>
Applied to u-boot/master, thanks!
--
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: not available
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20171204/11f4a2b9/attachment.sig>
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2017-12-04 18:36 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-11-29 6:04 [U-Boot] [PATCH] drivers: firmware: psci: use pr_* log functions instead of printf() Masahiro Yamada
2017-12-02 3:28 ` Simon Glass
2017-12-04 18:36 ` [U-Boot] " Tom Rini
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox