From: Onkarnarth <onkarnath.1@samsung.com>
To: rafael@kernel.org, lenb@kernel.org, bhelgaas@google.com,
viresh.kumar@linaro.org, mingo@redhat.com, peterz@infradead.org,
juri.lelli@redhat.com, vincent.guittot@linaro.org,
dietmar.eggemann@arm.com, rostedt@goodmis.org,
bsegall@google.com, mgorman@suse.de, bristot@redhat.com,
vschneid@redhat.com
Cc: linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org,
linux-acpi@vger.kernel.org, linux-pci@vger.kernel.org,
r.thapliyal@samsung.com, maninder1.s@samsung.com,
helgaas@kernel.org, Onkarnath <onkarnath.1@samsung.com>,
Stanislaw Gruszka <stanislaw.gruszka@linux.intel.com>
Subject: [PATCH v2 1/2] ACPI: use %pe for better readability of errors while printing
Date: Mon, 12 Feb 2024 15:54:03 +0530 [thread overview]
Message-ID: <20240212102404.1900708-1-onkarnath.1@samsung.com> (raw)
In-Reply-To: CGME20240212102417epcas5p31745b234ab239009c7ff29d0f59c1126@epcas5p3.samsung.com
From: Onkarnath <onkarnath.1@samsung.com>
As %pe is already introduced, it's better to use it in place of (%ld) for
printing errors in logs. It would enhance readability 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>
Reviewed-by: Bjorn Helgaas <helgaas@kernel.org>
---
v1->v2: Updated subject line as per file history & corrected spellings
in description.
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
next parent reply other threads:[~2024-02-12 10:35 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <CGME20240212102417epcas5p31745b234ab239009c7ff29d0f59c1126@epcas5p3.samsung.com>
2024-02-12 10:24 ` Onkarnarth [this message]
[not found] ` <CGME20240212102425epcas5p176017ab3c94d39af29bbeaa72a43a996@epcas5p1.samsung.com>
2024-02-12 10:24 ` [PATCH v2 2/2] cpufreq/schedutil: print errors with %pe for better readability of logs Onkarnarth
2024-02-12 19:29 ` [PATCH v2 1/2] ACPI: use %pe for better readability of errors while printing Bjorn Helgaas
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20240212102404.1900708-1-onkarnath.1@samsung.com \
--to=onkarnath.1@samsung.com \
--cc=bhelgaas@google.com \
--cc=bristot@redhat.com \
--cc=bsegall@google.com \
--cc=dietmar.eggemann@arm.com \
--cc=helgaas@kernel.org \
--cc=juri.lelli@redhat.com \
--cc=lenb@kernel.org \
--cc=linux-acpi@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pci@vger.kernel.org \
--cc=linux-pm@vger.kernel.org \
--cc=maninder1.s@samsung.com \
--cc=mgorman@suse.de \
--cc=mingo@redhat.com \
--cc=peterz@infradead.org \
--cc=r.thapliyal@samsung.com \
--cc=rafael@kernel.org \
--cc=rostedt@goodmis.org \
--cc=stanislaw.gruszka@linux.intel.com \
--cc=vincent.guittot@linaro.org \
--cc=viresh.kumar@linaro.org \
--cc=vschneid@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).