ACPI: use %pe for better readability of errors while printing
authorOnkarnath <onkarnath.1@samsung.com>
Tue, 13 Feb 2024 07:44:15 +0000 (13:14 +0530)
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>
Fri, 16 Feb 2024 18:31:12 +0000 (19:31 +0100)
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.

Co-developed-by: Maninder Singh <maninder1.s@samsung.com>
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>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
drivers/acpi/acpi_processor.c
drivers/acpi/acpi_watchdog.c
drivers/acpi/pci_slot.c

index 4fe2ef5..2ddd36a 100644 (file)
@@ -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
index 8e9e001..14b2415 100644 (file)
@@ -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);
 
index d6cb2c2..741bcc9 100644 (file)
@@ -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;
        }