Commit 9abcfaaa authored by Corey Minyard's avatar Corey Minyard

ipmi:dmi: Use pr_fmt in the IPMI DMI code

It make things a little neater and saves some memory.
Signed-off-by: default avatarCorey Minyard <cminyard@mvista.com>
parent dd3535b9
...@@ -4,6 +4,9 @@ ...@@ -4,6 +4,9 @@
* allow autoloading of the IPMI drive based on SMBIOS entries. * allow autoloading of the IPMI drive based on SMBIOS entries.
*/ */
#define pr_fmt(fmt) "%s" fmt, "ipmi:dmi: "
#define dev_fmt pr_fmt
#include <linux/ipmi.h> #include <linux/ipmi.h>
#include <linux/init.h> #include <linux/init.h>
#include <linux/dmi.h> #include <linux/dmi.h>
...@@ -71,7 +74,7 @@ static void __init dmi_add_platform_ipmi(unsigned long base_addr, ...@@ -71,7 +74,7 @@ static void __init dmi_add_platform_ipmi(unsigned long base_addr,
si_type = SI_SMIC; si_type = SI_SMIC;
break; break;
default: default:
pr_err("ipmi:dmi: Invalid IPMI type: %d\n", type); pr_err("Invalid IPMI type: %d\n", type);
return; return;
} }
...@@ -83,7 +86,7 @@ static void __init dmi_add_platform_ipmi(unsigned long base_addr, ...@@ -83,7 +86,7 @@ static void __init dmi_add_platform_ipmi(unsigned long base_addr,
info = kmalloc(sizeof(*info), GFP_KERNEL); info = kmalloc(sizeof(*info), GFP_KERNEL);
if (!info) { if (!info) {
pr_warn("ipmi:dmi: Could not allocate dmi info\n"); pr_warn("Could not allocate dmi info\n");
} else { } else {
info->si_type = si_type; info->si_type = si_type;
info->flags = flags; info->flags = flags;
...@@ -95,7 +98,7 @@ static void __init dmi_add_platform_ipmi(unsigned long base_addr, ...@@ -95,7 +98,7 @@ static void __init dmi_add_platform_ipmi(unsigned long base_addr,
pdev = platform_device_alloc(name, ipmi_dmi_nr); pdev = platform_device_alloc(name, ipmi_dmi_nr);
if (!pdev) { if (!pdev) {
pr_err("ipmi:dmi: Error allocation IPMI platform device\n"); pr_err("Error allocation IPMI platform device\n");
return; return;
} }
pdev->driver_override = kasprintf(GFP_KERNEL, "%s", pdev->driver_override = kasprintf(GFP_KERNEL, "%s",
...@@ -141,22 +144,20 @@ static void __init dmi_add_platform_ipmi(unsigned long base_addr, ...@@ -141,22 +144,20 @@ static void __init dmi_add_platform_ipmi(unsigned long base_addr,
rv = platform_device_add_resources(pdev, r, num_r); rv = platform_device_add_resources(pdev, r, num_r);
if (rv) { if (rv) {
dev_err(&pdev->dev, dev_err(&pdev->dev, "Unable to add resources: %d\n", rv);
"ipmi:dmi: Unable to add resources: %d\n", rv);
goto err; goto err;
} }
add_properties: add_properties:
rv = platform_device_add_properties(pdev, p); rv = platform_device_add_properties(pdev, p);
if (rv) { if (rv) {
dev_err(&pdev->dev, dev_err(&pdev->dev, "Unable to add properties: %d\n", rv);
"ipmi:dmi: Unable to add properties: %d\n", rv);
goto err; goto err;
} }
rv = platform_device_add(pdev); rv = platform_device_add(pdev);
if (rv) { if (rv) {
dev_err(&pdev->dev, "ipmi:dmi: Unable to add device: %d\n", rv); dev_err(&pdev->dev, "Unable to add device: %d\n", rv);
goto err; goto err;
} }
...@@ -263,7 +264,7 @@ static void __init dmi_decode_ipmi(const struct dmi_header *dm) ...@@ -263,7 +264,7 @@ static void __init dmi_decode_ipmi(const struct dmi_header *dm)
offset = 16; offset = 16;
break; break;
default: default:
pr_err("ipmi:dmi: Invalid offset: 0\n"); pr_err("Invalid offset: 0\n");
return; return;
} }
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment