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 @@
* 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/init.h>
#include <linux/dmi.h>
......@@ -71,7 +74,7 @@ static void __init dmi_add_platform_ipmi(unsigned long base_addr,
si_type = SI_SMIC;
break;
default:
pr_err("ipmi:dmi: Invalid IPMI type: %d\n", type);
pr_err("Invalid IPMI type: %d\n", type);
return;
}
......@@ -83,7 +86,7 @@ static void __init dmi_add_platform_ipmi(unsigned long base_addr,
info = kmalloc(sizeof(*info), GFP_KERNEL);
if (!info) {
pr_warn("ipmi:dmi: Could not allocate dmi info\n");
pr_warn("Could not allocate dmi info\n");
} else {
info->si_type = si_type;
info->flags = flags;
......@@ -95,7 +98,7 @@ static void __init dmi_add_platform_ipmi(unsigned long base_addr,
pdev = platform_device_alloc(name, ipmi_dmi_nr);
if (!pdev) {
pr_err("ipmi:dmi: Error allocation IPMI platform device\n");
pr_err("Error allocation IPMI platform device\n");
return;
}
pdev->driver_override = kasprintf(GFP_KERNEL, "%s",
......@@ -141,22 +144,20 @@ static void __init dmi_add_platform_ipmi(unsigned long base_addr,
rv = platform_device_add_resources(pdev, r, num_r);
if (rv) {
dev_err(&pdev->dev,
"ipmi:dmi: Unable to add resources: %d\n", rv);
dev_err(&pdev->dev, "Unable to add resources: %d\n", rv);
goto err;
}
add_properties:
rv = platform_device_add_properties(pdev, p);
if (rv) {
dev_err(&pdev->dev,
"ipmi:dmi: Unable to add properties: %d\n", rv);
dev_err(&pdev->dev, "Unable to add properties: %d\n", rv);
goto err;
}
rv = platform_device_add(pdev);
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;
}
......@@ -263,7 +264,7 @@ static void __init dmi_decode_ipmi(const struct dmi_header *dm)
offset = 16;
break;
default:
pr_err("ipmi:dmi: Invalid offset: 0\n");
pr_err("Invalid offset: 0\n");
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