* Re: [PATCH] common: deep-probe: write deep probe enabled message to log
2022-12-22 14:35 [PATCH] common: deep-probe: write deep probe enabled message to log Ahmad Fatoum
@ 2022-12-22 15:47 ` Marco Felsch
2022-12-22 15:53 ` Ahmad Fatoum
2022-12-22 17:04 ` Ulrich Ölmann
2023-01-04 12:16 ` Sascha Hauer
2 siblings, 1 reply; 7+ messages in thread
From: Marco Felsch @ 2022-12-22 15:47 UTC (permalink / raw)
To: Ahmad Fatoum; +Cc: barebox
Hi Ahamd,
thanks for your patch.
On 22-12-22, Ahmad Fatoum wrote:
> The "Deep probe supported due to" was not written to log and thus only
> shown on startup and not in dmesg output. Make it available in both.
>
> Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
> ---
> common/deep-probe.c | 4 +++-
> 1 file changed, 3 insertions(+), 1 deletion(-)
>
> diff --git a/common/deep-probe.c b/common/deep-probe.c
> index 1020ad93b7f7..931e5a17709d 100644
> --- a/common/deep-probe.c
> +++ b/common/deep-probe.c
> @@ -1,5 +1,7 @@
> // SPDX-License-Identifier: GPL-2.0-only
>
> +#define pr_fmt(fmt) "deep-probe: " fmt
> +
> #include <common.h>
> #include <deep-probe.h>
> #include <of.h>
> @@ -27,7 +29,7 @@ bool deep_probe_is_supported(void)
> for (; matches->compatible; matches++) {
> if (of_machine_is_compatible(matches->compatible)) {
> boardstate = DEEP_PROBE_SUPPORTED;
> - printk("Deep probe supported due to %s\n", matches->compatible);
> + pr_info("supported due to %s\n", matches->compatible);
What do you think, should we move it to pr_debug()? The feature is now
more robust and usual this information is only required for developers
not for users.
Regards,
Marco
> return true;
> }
> }
> --
> 2.30.2
>
>
>
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] common: deep-probe: write deep probe enabled message to log
2022-12-22 15:47 ` Marco Felsch
@ 2022-12-22 15:53 ` Ahmad Fatoum
2022-12-22 16:05 ` Marco Felsch
0 siblings, 1 reply; 7+ messages in thread
From: Ahmad Fatoum @ 2022-12-22 15:53 UTC (permalink / raw)
To: Marco Felsch; +Cc: barebox
Hello Macro,
On 22.12.22 16:47, Marco Felsch wrote:
> Hi Ahamd,
>
> thanks for your patch.
>
> On 22-12-22, Ahmad Fatoum wrote:
>> The "Deep probe supported due to" was not written to log and thus only
>> shown on startup and not in dmesg output. Make it available in both.
>>
>> Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
>> ---
>> common/deep-probe.c | 4 +++-
>> 1 file changed, 3 insertions(+), 1 deletion(-)
>>
>> diff --git a/common/deep-probe.c b/common/deep-probe.c
>> index 1020ad93b7f7..931e5a17709d 100644
>> --- a/common/deep-probe.c
>> +++ b/common/deep-probe.c
>> @@ -1,5 +1,7 @@
>> // SPDX-License-Identifier: GPL-2.0-only
>>
>> +#define pr_fmt(fmt) "deep-probe: " fmt
>> +
>> #include <common.h>
>> #include <deep-probe.h>
>> #include <of.h>
>> @@ -27,7 +29,7 @@ bool deep_probe_is_supported(void)
>> for (; matches->compatible; matches++) {
>> if (of_machine_is_compatible(matches->compatible)) {
>> boardstate = DEEP_PROBE_SUPPORTED;
>> - printk("Deep probe supported due to %s\n", matches->compatible);
>> + pr_info("supported due to %s\n", matches->compatible);
>
> What do you think, should we move it to pr_debug()? The feature is now
> more robust and usual this information is only required for developers
> not for users.
I just fixed a deep probe regression in the other series, so I think
we should still leave it in.
>
> Regards,
> Marco
>
>> return true;
>> }
>> }
>> --
>> 2.30.2
>>
>>
>>
>
--
Pengutronix e.K. | |
Steuerwalder Str. 21 | http://www.pengutronix.de/ |
31137 Hildesheim, Germany | Phone: +49-5121-206917-0 |
Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] common: deep-probe: write deep probe enabled message to log
2022-12-22 15:53 ` Ahmad Fatoum
@ 2022-12-22 16:05 ` Marco Felsch
0 siblings, 0 replies; 7+ messages in thread
From: Marco Felsch @ 2022-12-22 16:05 UTC (permalink / raw)
To: Ahmad Fatoum; +Cc: barebox
On 22-12-22, Ahmad Fatoum wrote:
> Hello Macro,
>
> On 22.12.22 16:47, Marco Felsch wrote:
> > Hi Ahamd,
> >
> > thanks for your patch.
> >
> > On 22-12-22, Ahmad Fatoum wrote:
> >> The "Deep probe supported due to" was not written to log and thus only
> >> shown on startup and not in dmesg output. Make it available in both.
> >>
> >> Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
> >> ---
> >> common/deep-probe.c | 4 +++-
> >> 1 file changed, 3 insertions(+), 1 deletion(-)
> >>
> >> diff --git a/common/deep-probe.c b/common/deep-probe.c
> >> index 1020ad93b7f7..931e5a17709d 100644
> >> --- a/common/deep-probe.c
> >> +++ b/common/deep-probe.c
> >> @@ -1,5 +1,7 @@
> >> // SPDX-License-Identifier: GPL-2.0-only
> >>
> >> +#define pr_fmt(fmt) "deep-probe: " fmt
> >> +
> >> #include <common.h>
> >> #include <deep-probe.h>
> >> #include <of.h>
> >> @@ -27,7 +29,7 @@ bool deep_probe_is_supported(void)
> >> for (; matches->compatible; matches++) {
> >> if (of_machine_is_compatible(matches->compatible)) {
> >> boardstate = DEEP_PROBE_SUPPORTED;
> >> - printk("Deep probe supported due to %s\n", matches->compatible);
> >> + pr_info("supported due to %s\n", matches->compatible);
> >
> > What do you think, should we move it to pr_debug()? The feature is now
> > more robust and usual this information is only required for developers
> > not for users.
>
> I just fixed a deep probe regression in the other series, so I think
> we should still leave it in.
Okay, in that case
Reviewed-by: Marco Felsch <m.felsch@pengutronix.de>
>
> >
> > Regards,
> > Marco
> >
> >> return true;
> >> }
> >> }
> >> --
> >> 2.30.2
> >>
> >>
> >>
> >
>
> --
> Pengutronix e.K. | |
> Steuerwalder Str. 21 | http://www.pengutronix.de/ |
> 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 |
> Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |
>
>
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] common: deep-probe: write deep probe enabled message to log
2022-12-22 14:35 [PATCH] common: deep-probe: write deep probe enabled message to log Ahmad Fatoum
2022-12-22 15:47 ` Marco Felsch
@ 2022-12-22 17:04 ` Ulrich Ölmann
2022-12-22 17:32 ` Ahmad Fatoum
2023-01-04 12:16 ` Sascha Hauer
2 siblings, 1 reply; 7+ messages in thread
From: Ulrich Ölmann @ 2022-12-22 17:04 UTC (permalink / raw)
To: Ahmad Fatoum; +Cc: barebox
Hi Ahmad,
On Thu, Dec 22 2022 at 15:35 +0100, Ahmad Fatoum <a.fatoum@pengutronix.de> wrote:
> The "Deep probe supported due to" was not written to log and thus only
> shown on startup and not in dmesg output. Make it available in both.
>
> Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
> ---
> common/deep-probe.c | 4 +++-
> 1 file changed, 3 insertions(+), 1 deletion(-)
>
> diff --git a/common/deep-probe.c b/common/deep-probe.c
> index 1020ad93b7f7..931e5a17709d 100644
> --- a/common/deep-probe.c
> +++ b/common/deep-probe.c
> @@ -1,5 +1,7 @@
> // SPDX-License-Identifier: GPL-2.0-only
>
> +#define pr_fmt(fmt) "deep-probe: " fmt
> +
> #include <common.h>
> #include <deep-probe.h>
> #include <of.h>
> @@ -27,7 +29,7 @@ bool deep_probe_is_supported(void)
> for (; matches->compatible; matches++) {
> if (of_machine_is_compatible(matches->compatible)) {
> boardstate = DEEP_PROBE_SUPPORTED;
> - printk("Deep probe supported due to %s\n", matches->compatible);
> + pr_info("supported due to %s\n", matches->compatible);
was it by accident that you removed the message's beginning "Deep probe "?
Best regards
Ulrich
> return true;
> }
> }
--
Pengutronix e.K. | Ulrich Ölmann |
Industrial Linux Solutions | http://www.pengutronix.de/ |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 |
Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] common: deep-probe: write deep probe enabled message to log
2022-12-22 17:04 ` Ulrich Ölmann
@ 2022-12-22 17:32 ` Ahmad Fatoum
0 siblings, 0 replies; 7+ messages in thread
From: Ahmad Fatoum @ 2022-12-22 17:32 UTC (permalink / raw)
To: Ulrich Ölmann; +Cc: barebox
Hello Ulrich,
On 22.12.22 18:04, Ulrich Ölmann wrote:
> Hi Ahmad,
>
> On Thu, Dec 22 2022 at 15:35 +0100, Ahmad Fatoum <a.fatoum@pengutronix.de> wrote:
>> The "Deep probe supported due to" was not written to log and thus only
>> shown on startup and not in dmesg output. Make it available in both.
>>
>> Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
>> ---
>> common/deep-probe.c | 4 +++-
>> 1 file changed, 3 insertions(+), 1 deletion(-)
>>
>> diff --git a/common/deep-probe.c b/common/deep-probe.c
>> index 1020ad93b7f7..931e5a17709d 100644
>> --- a/common/deep-probe.c
>> +++ b/common/deep-probe.c
>> @@ -1,5 +1,7 @@
>> // SPDX-License-Identifier: GPL-2.0-only
>>
>> +#define pr_fmt(fmt) "deep-probe: " fmt
>> +
>> #include <common.h>
>> #include <deep-probe.h>
>> #include <of.h>
>> @@ -27,7 +29,7 @@ bool deep_probe_is_supported(void)
>> for (; matches->compatible; matches++) {
>> if (of_machine_is_compatible(matches->compatible)) {
>> boardstate = DEEP_PROBE_SUPPORTED;
>> - printk("Deep probe supported due to %s\n", matches->compatible);
>> + pr_info("supported due to %s\n", matches->compatible);
>
> was it by accident that you removed the message's beginning "Deep probe "?
The pr_ family of macros run the format string through pr_fmt before passing
it along. pr_fmt is defined above to prepend "deep-probe: ". This is a convention
to maintain a uniform prefix for debug prints of a file.
As we now have the prefix, I dropped that part here to avoid the duplication.
Cheers,
Ahmad
>
> Best regards
> Ulrich
>
>
>> return true;
>> }
>> }
--
Pengutronix e.K. | |
Steuerwalder Str. 21 | http://www.pengutronix.de/ |
31137 Hildesheim, Germany | Phone: +49-5121-206917-0 |
Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] common: deep-probe: write deep probe enabled message to log
2022-12-22 14:35 [PATCH] common: deep-probe: write deep probe enabled message to log Ahmad Fatoum
2022-12-22 15:47 ` Marco Felsch
2022-12-22 17:04 ` Ulrich Ölmann
@ 2023-01-04 12:16 ` Sascha Hauer
2 siblings, 0 replies; 7+ messages in thread
From: Sascha Hauer @ 2023-01-04 12:16 UTC (permalink / raw)
To: Ahmad Fatoum; +Cc: barebox
On Thu, Dec 22, 2022 at 03:35:13PM +0100, Ahmad Fatoum wrote:
> The "Deep probe supported due to" was not written to log and thus only
> shown on startup and not in dmesg output. Make it available in both.
>
> Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
> ---
> common/deep-probe.c | 4 +++-
> 1 file changed, 3 insertions(+), 1 deletion(-)
Applied, thanks
Sascha
>
> diff --git a/common/deep-probe.c b/common/deep-probe.c
> index 1020ad93b7f7..931e5a17709d 100644
> --- a/common/deep-probe.c
> +++ b/common/deep-probe.c
> @@ -1,5 +1,7 @@
> // SPDX-License-Identifier: GPL-2.0-only
>
> +#define pr_fmt(fmt) "deep-probe: " fmt
> +
> #include <common.h>
> #include <deep-probe.h>
> #include <of.h>
> @@ -27,7 +29,7 @@ bool deep_probe_is_supported(void)
> for (; matches->compatible; matches++) {
> if (of_machine_is_compatible(matches->compatible)) {
> boardstate = DEEP_PROBE_SUPPORTED;
> - printk("Deep probe supported due to %s\n", matches->compatible);
> + pr_info("supported due to %s\n", matches->compatible);
> return true;
> }
> }
> --
> 2.30.2
>
>
>
--
Pengutronix e.K. | |
Steuerwalder Str. 21 | http://www.pengutronix.de/ |
31137 Hildesheim, Germany | Phone: +49-5121-206917-0 |
Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |
^ permalink raw reply [flat|nested] 7+ messages in thread