* [PATCH 1/2] drivers: acpi: use %pe for better readability of errors while printing
[not found] <CGME20240206051218epcas5p3fddd971ec73f6ee6a2b0a5ec2709c0f7@epcas5p3.samsung.com>
@ 2024-02-06 5:11 ` Onkarnarth
2024-02-06 5:11 ` [PATCH 2/2] kernel: sched: print errors with %pe for better readability of logs Onkarnarth
` (2 more replies)
0 siblings, 3 replies; 6+ messages in thread
From: Onkarnarth @ 2024-02-06 5:11 UTC (permalink / raw)
To: rafael, lenb, bhelgaas, viresh.kumar, mingo, peterz, juri.lelli,
vincent.guittot, dietmar.eggemann, rostedt, bsegall, mgorman,
bristot, vschneid
Cc: linux-pm, linux-kernel, linux-acpi, linux-pci, r.thapliyal,
maninder1.s, Onkarnath
From: Onkarnath <onkarnath.1@samsung.com>
As %pe is already introduced, its better to use it inplace of (%ld) for
printing errors in logs. It would enhance redability of logs.
Signed-off-by: Maninder Singh <maninder1.s@samsung.com>
Signed-off-by: Onkarnath <onkarnath.1@samsung.com>
---
drivers/acpi/acpi_processor.c | 2 +-
drivers/acpi/acpi_watchdog.c | 2 +-
drivers/acpi/pci_slot.c | 2 +-
3 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/drivers/acpi/acpi_processor.c b/drivers/acpi/acpi_processor.c
index 4fe2ef54088c..2ddd36a21850 100644
--- a/drivers/acpi/acpi_processor.c
+++ b/drivers/acpi/acpi_processor.c
@@ -161,7 +161,7 @@ static void cpufreq_add_device(const char *name)
pdev = platform_device_register_simple(name, PLATFORM_DEVID_NONE, NULL, 0);
if (IS_ERR(pdev))
- pr_info("%s device creation failed: %ld\n", name, PTR_ERR(pdev));
+ pr_info("%s device creation failed: %pe\n", name, pdev);
}
#ifdef CONFIG_X86
diff --git a/drivers/acpi/acpi_watchdog.c b/drivers/acpi/acpi_watchdog.c
index 8e9e001da38f..14b24157799c 100644
--- a/drivers/acpi/acpi_watchdog.c
+++ b/drivers/acpi/acpi_watchdog.c
@@ -179,7 +179,7 @@ void __init acpi_watchdog_init(void)
pdev = platform_device_register_simple("wdat_wdt", PLATFORM_DEVID_NONE,
resources, nresources);
if (IS_ERR(pdev))
- pr_err("Device creation failed: %ld\n", PTR_ERR(pdev));
+ pr_err("Device creation failed: %pe\n", pdev);
kfree(resources);
diff --git a/drivers/acpi/pci_slot.c b/drivers/acpi/pci_slot.c
index d6cb2c27a23b..741bcc9d6d6a 100644
--- a/drivers/acpi/pci_slot.c
+++ b/drivers/acpi/pci_slot.c
@@ -111,7 +111,7 @@ register_slot(acpi_handle handle, u32 lvl, void *context, void **rv)
snprintf(name, sizeof(name), "%llu", sun);
pci_slot = pci_create_slot(pci_bus, device, name, NULL);
if (IS_ERR(pci_slot)) {
- pr_err("pci_create_slot returned %ld\n", PTR_ERR(pci_slot));
+ pr_err("pci_create_slot returned %pe\n", pci_slot);
kfree(slot);
return AE_OK;
}
--
2.25.1
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [PATCH 2/2] kernel: sched: print errors with %pe for better readability of logs
2024-02-06 5:11 ` [PATCH 1/2] drivers: acpi: use %pe for better readability of errors while printing Onkarnarth
@ 2024-02-06 5:11 ` Onkarnarth
2024-02-06 9:23 ` Stanislaw Gruszka
2024-02-06 9:48 ` Valentin Schneider
2024-02-06 9:22 ` [PATCH 1/2] drivers: acpi: use %pe for better readability of errors while printing Stanislaw Gruszka
2024-02-06 15:32 ` Bjorn Helgaas
2 siblings, 2 replies; 6+ messages in thread
From: Onkarnarth @ 2024-02-06 5:11 UTC (permalink / raw)
To: rafael, lenb, bhelgaas, viresh.kumar, mingo, peterz, juri.lelli,
vincent.guittot, dietmar.eggemann, rostedt, bsegall, mgorman,
bristot, vschneid
Cc: linux-pm, linux-kernel, linux-acpi, linux-pci, r.thapliyal,
maninder1.s, Onkarnath
From: Onkarnath <onkarnath.1@samsung.com>
instead of printing errros as a number(%ld), it's better to print in string
format for better readability of logs.
Signed-off-by: Onkarnath <onkarnath.1@samsung.com>
---
kernel/sched/cpufreq_schedutil.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/kernel/sched/cpufreq_schedutil.c b/kernel/sched/cpufreq_schedutil.c
index eece6244f9d2..2c42eaa56fa3 100644
--- a/kernel/sched/cpufreq_schedutil.c
+++ b/kernel/sched/cpufreq_schedutil.c
@@ -671,7 +671,7 @@ static int sugov_kthread_create(struct sugov_policy *sg_policy)
"sugov:%d",
cpumask_first(policy->related_cpus));
if (IS_ERR(thread)) {
- pr_err("failed to create sugov thread: %ld\n", PTR_ERR(thread));
+ pr_err("failed to create sugov thread: %pe\n", thread);
return PTR_ERR(thread);
}
--
2.25.1
^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [PATCH 1/2] drivers: acpi: use %pe for better readability of errors while printing
2024-02-06 5:11 ` [PATCH 1/2] drivers: acpi: use %pe for better readability of errors while printing Onkarnarth
2024-02-06 5:11 ` [PATCH 2/2] kernel: sched: print errors with %pe for better readability of logs Onkarnarth
@ 2024-02-06 9:22 ` Stanislaw Gruszka
2024-02-06 15:32 ` Bjorn Helgaas
2 siblings, 0 replies; 6+ messages in thread
From: Stanislaw Gruszka @ 2024-02-06 9:22 UTC (permalink / raw)
To: Onkarnarth
Cc: rafael, lenb, bhelgaas, viresh.kumar, mingo, peterz, juri.lelli,
vincent.guittot, dietmar.eggemann, rostedt, bsegall, mgorman,
bristot, vschneid, linux-pm, linux-kernel, linux-acpi, linux-pci,
r.thapliyal, maninder1.s
On Tue, Feb 06, 2024 at 10:41:19AM +0530, Onkarnarth wrote:
> From: Onkarnath <onkarnath.1@samsung.com>
>
> As %pe is already introduced, its better to use it inplace of (%ld) for
> printing errors in logs. It would enhance redability of logs.
>
> Signed-off-by: Maninder Singh <maninder1.s@samsung.com>
> Signed-off-by: Onkarnath <onkarnath.1@samsung.com>
Reviewed-by: Stanislaw Gruszka <stanislaw.gruszka@linux.intel.com>
> ---
> drivers/acpi/acpi_processor.c | 2 +-
> drivers/acpi/acpi_watchdog.c | 2 +-
> drivers/acpi/pci_slot.c | 2 +-
> 3 files changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/acpi/acpi_processor.c b/drivers/acpi/acpi_processor.c
> index 4fe2ef54088c..2ddd36a21850 100644
> --- a/drivers/acpi/acpi_processor.c
> +++ b/drivers/acpi/acpi_processor.c
> @@ -161,7 +161,7 @@ static void cpufreq_add_device(const char *name)
>
> pdev = platform_device_register_simple(name, PLATFORM_DEVID_NONE, NULL, 0);
> if (IS_ERR(pdev))
> - pr_info("%s device creation failed: %ld\n", name, PTR_ERR(pdev));
> + pr_info("%s device creation failed: %pe\n", name, pdev);
> }
>
> #ifdef CONFIG_X86
> diff --git a/drivers/acpi/acpi_watchdog.c b/drivers/acpi/acpi_watchdog.c
> index 8e9e001da38f..14b24157799c 100644
> --- a/drivers/acpi/acpi_watchdog.c
> +++ b/drivers/acpi/acpi_watchdog.c
> @@ -179,7 +179,7 @@ void __init acpi_watchdog_init(void)
> pdev = platform_device_register_simple("wdat_wdt", PLATFORM_DEVID_NONE,
> resources, nresources);
> if (IS_ERR(pdev))
> - pr_err("Device creation failed: %ld\n", PTR_ERR(pdev));
> + pr_err("Device creation failed: %pe\n", pdev);
>
> kfree(resources);
>
> diff --git a/drivers/acpi/pci_slot.c b/drivers/acpi/pci_slot.c
> index d6cb2c27a23b..741bcc9d6d6a 100644
> --- a/drivers/acpi/pci_slot.c
> +++ b/drivers/acpi/pci_slot.c
> @@ -111,7 +111,7 @@ register_slot(acpi_handle handle, u32 lvl, void *context, void **rv)
> snprintf(name, sizeof(name), "%llu", sun);
> pci_slot = pci_create_slot(pci_bus, device, name, NULL);
> if (IS_ERR(pci_slot)) {
> - pr_err("pci_create_slot returned %ld\n", PTR_ERR(pci_slot));
> + pr_err("pci_create_slot returned %pe\n", pci_slot);
> kfree(slot);
> return AE_OK;
> }
> --
> 2.25.1
>
>
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH 2/2] kernel: sched: print errors with %pe for better readability of logs
2024-02-06 5:11 ` [PATCH 2/2] kernel: sched: print errors with %pe for better readability of logs Onkarnarth
@ 2024-02-06 9:23 ` Stanislaw Gruszka
2024-02-06 9:48 ` Valentin Schneider
1 sibling, 0 replies; 6+ messages in thread
From: Stanislaw Gruszka @ 2024-02-06 9:23 UTC (permalink / raw)
To: Onkarnarth
Cc: rafael, lenb, bhelgaas, viresh.kumar, mingo, peterz, juri.lelli,
vincent.guittot, dietmar.eggemann, rostedt, bsegall, mgorman,
bristot, vschneid, linux-pm, linux-kernel, linux-acpi, linux-pci,
r.thapliyal, maninder1.s
On Tue, Feb 06, 2024 at 10:41:20AM +0530, Onkarnarth wrote:
> From: Onkarnath <onkarnath.1@samsung.com>
>
> instead of printing errros as a number(%ld), it's better to print in string
> format for better readability of logs.
>
> Signed-off-by: Onkarnath <onkarnath.1@samsung.com>
Reviewed-by: Stanislaw Gruszka <stanislaw.gruszka@linux.intel.com>
> ---
> kernel/sched/cpufreq_schedutil.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/kernel/sched/cpufreq_schedutil.c b/kernel/sched/cpufreq_schedutil.c
> index eece6244f9d2..2c42eaa56fa3 100644
> --- a/kernel/sched/cpufreq_schedutil.c
> +++ b/kernel/sched/cpufreq_schedutil.c
> @@ -671,7 +671,7 @@ static int sugov_kthread_create(struct sugov_policy *sg_policy)
> "sugov:%d",
> cpumask_first(policy->related_cpus));
> if (IS_ERR(thread)) {
> - pr_err("failed to create sugov thread: %ld\n", PTR_ERR(thread));
> + pr_err("failed to create sugov thread: %pe\n", thread);
> return PTR_ERR(thread);
> }
>
> --
> 2.25.1
>
>
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH 2/2] kernel: sched: print errors with %pe for better readability of logs
2024-02-06 5:11 ` [PATCH 2/2] kernel: sched: print errors with %pe for better readability of logs Onkarnarth
2024-02-06 9:23 ` Stanislaw Gruszka
@ 2024-02-06 9:48 ` Valentin Schneider
1 sibling, 0 replies; 6+ messages in thread
From: Valentin Schneider @ 2024-02-06 9:48 UTC (permalink / raw)
To: Onkarnarth, rafael, lenb, bhelgaas, viresh.kumar, mingo, peterz,
juri.lelli, vincent.guittot, dietmar.eggemann, rostedt, bsegall,
mgorman, bristot
Cc: linux-pm, linux-kernel, linux-acpi, linux-pci, r.thapliyal,
maninder1.s, Onkarnath
On 06/02/24 10:41, Onkarnarth wrote:
> From: Onkarnath <onkarnath.1@samsung.com>
>
> instead of printing errros as a number(%ld), it's better to print in string
> format for better readability of logs.
>
> Signed-off-by: Onkarnath <onkarnath.1@samsung.com>
I quick ripgrep tells me this is the only culprit in sched, so:
Reviewed-by: Valentin Schneider <vschneid@redhat.com>
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH 1/2] drivers: acpi: use %pe for better readability of errors while printing
2024-02-06 5:11 ` [PATCH 1/2] drivers: acpi: use %pe for better readability of errors while printing Onkarnarth
2024-02-06 5:11 ` [PATCH 2/2] kernel: sched: print errors with %pe for better readability of logs Onkarnarth
2024-02-06 9:22 ` [PATCH 1/2] drivers: acpi: use %pe for better readability of errors while printing Stanislaw Gruszka
@ 2024-02-06 15:32 ` Bjorn Helgaas
2 siblings, 0 replies; 6+ messages in thread
From: Bjorn Helgaas @ 2024-02-06 15:32 UTC (permalink / raw)
To: Onkarnarth
Cc: rafael, lenb, bhelgaas, viresh.kumar, mingo, peterz, juri.lelli,
vincent.guittot, dietmar.eggemann, rostedt, bsegall, mgorman,
bristot, vschneid, linux-pm, linux-kernel, linux-acpi, linux-pci,
r.thapliyal, maninder1.s
On Tue, Feb 06, 2024 at 10:41:19AM +0530, Onkarnarth wrote:
> From: Onkarnath <onkarnath.1@samsung.com>
>
> As %pe is already introduced, its better to use it inplace of (%ld) for
> printing errors in logs. It would enhance redability of logs.
s/its/it's/
s/inplace/in place/
s/redability/readability/
In the subject line, run "git log --oneline drivers/acpi" and pick
something that fits with the history instead of just encoding the file
path. Same for the sched patch.
Bjorn
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2024-02-06 15:32 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <CGME20240206051218epcas5p3fddd971ec73f6ee6a2b0a5ec2709c0f7@epcas5p3.samsung.com>
2024-02-06 5:11 ` [PATCH 1/2] drivers: acpi: use %pe for better readability of errors while printing Onkarnarth
2024-02-06 5:11 ` [PATCH 2/2] kernel: sched: print errors with %pe for better readability of logs Onkarnarth
2024-02-06 9:23 ` Stanislaw Gruszka
2024-02-06 9:48 ` Valentin Schneider
2024-02-06 9:22 ` [PATCH 1/2] drivers: acpi: use %pe for better readability of errors while printing Stanislaw Gruszka
2024-02-06 15:32 ` Bjorn Helgaas
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox