diff options
author | Joe Perches <joe@perches.com> | 2018-05-09 18:15:48 +0300 |
---|---|---|
committer | Corey Minyard <cminyard@mvista.com> | 2018-09-19 00:15:33 +0300 |
commit | 25880f7d61a4f2fdda29cadae55985431df82c5c (patch) | |
tree | 49dcde8db432165b4959deb11d1ecc860edd04e4 /drivers/char/ipmi/ipmi_si_platform.c | |
parent | 445e2cbda928a3523c1c1da76788d19df52611c8 (diff) | |
download | linux-25880f7d61a4f2fdda29cadae55985431df82c5c.tar.xz |
ipmi: Use more common logging styles
Add and use #define pr_fmt/dev_fmt, and remove #define PFX
This also prefixes some messages that were not previously prefixed.
Miscellanea:
o Convert printk(KERN_<level> to pr_<level>(
o Use %s, __func__ where appropriate
Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: Corey Minyard <cminyard@mvista.com>
Diffstat (limited to 'drivers/char/ipmi/ipmi_si_platform.c')
-rw-r--r-- | drivers/char/ipmi/ipmi_si_platform.c | 20 |
1 files changed, 11 insertions, 9 deletions
diff --git a/drivers/char/ipmi/ipmi_si_platform.c b/drivers/char/ipmi/ipmi_si_platform.c index bf69927502bd..999fba24e29c 100644 --- a/drivers/char/ipmi/ipmi_si_platform.c +++ b/drivers/char/ipmi/ipmi_si_platform.c @@ -5,6 +5,10 @@ * Handling for platform devices in IPMI (ACPI, OF, and things * coming from the platform. */ + +#define pr_fmt(fmt) "ipmi_platform: " fmt +#define dev_fmt pr_fmt + #include <linux/types.h> #include <linux/module.h> #include <linux/of_device.h> @@ -15,8 +19,6 @@ #include "ipmi_si.h" #include "ipmi_dmi.h" -#define PFX "ipmi_platform: " - static bool si_tryplatform = true; #ifdef CONFIG_ACPI static bool si_tryacpi = true; @@ -158,7 +160,7 @@ static int platform_ipmi_probe(struct platform_device *pdev) memset(&io, 0, sizeof(io)); io.addr_source = addr_source; - dev_info(&pdev->dev, PFX "probing via %s\n", + dev_info(&pdev->dev, "probing via %s\n", ipmi_addr_src_to_str(addr_source)); switch (type) { @@ -236,25 +238,25 @@ static int of_ipmi_probe(struct platform_device *pdev) ret = of_address_to_resource(np, 0, &resource); if (ret) { - dev_warn(&pdev->dev, PFX "invalid address from OF\n"); + dev_warn(&pdev->dev, "invalid address from OF\n"); return ret; } regsize = of_get_property(np, "reg-size", &proplen); if (regsize && proplen != 4) { - dev_warn(&pdev->dev, PFX "invalid regsize from OF\n"); + dev_warn(&pdev->dev, "invalid regsize from OF\n"); return -EINVAL; } regspacing = of_get_property(np, "reg-spacing", &proplen); if (regspacing && proplen != 4) { - dev_warn(&pdev->dev, PFX "invalid regspacing from OF\n"); + dev_warn(&pdev->dev, "invalid regspacing from OF\n"); return -EINVAL; } regshift = of_get_property(np, "reg-shift", &proplen); if (regshift && proplen != 4) { - dev_warn(&pdev->dev, PFX "invalid regshift from OF\n"); + dev_warn(&pdev->dev, "invalid regshift from OF\n"); return -EINVAL; } @@ -326,7 +328,7 @@ static int acpi_ipmi_probe(struct platform_device *pdev) memset(&io, 0, sizeof(io)); io.addr_source = SI_ACPI; - dev_info(&pdev->dev, PFX "probing via ACPI\n"); + dev_info(&pdev->dev, "probing via ACPI\n"); io.addr_info.acpi_info.acpi_handle = handle; @@ -431,7 +433,7 @@ void ipmi_si_platform_init(void) { int rv = platform_driver_register(&ipmi_platform_driver); if (rv) - pr_err(PFX "Unable to register driver: %d\n", rv); + pr_err("Unable to register driver: %d\n", rv); } void ipmi_si_platform_shutdown(void) |