Commit 2ecb044e authored by Darrick J. Wong's avatar Darrick J. Wong Committed by Mark M. Hoffman

hwmon: (ibmpex) Change printk to dev_{info,err} macros

Clean up printk use in ibmpex.
Signed-off-by: default avatarDarrick J. Wong <djwong@us.ibm.com>
Acked-by: default avatarJean Delvare <khali@linux-fr.org>
Signed-off-by: default avatarMark M. Hoffman <mhoffman@lightlink.com>
parent 298c7524
...@@ -140,10 +140,10 @@ static int ibmpex_send_message(struct ibmpex_bmc_data *data) ...@@ -140,10 +140,10 @@ static int ibmpex_send_message(struct ibmpex_bmc_data *data)
return 0; return 0;
out1: out1:
printk(KERN_ERR "%s: request_settime=%x\n", __FUNCTION__, err); dev_err(data->bmc_device, "request_settime=%x\n", err);
return err; return err;
out: out:
printk(KERN_ERR "%s: validate_addr=%x\n", __FUNCTION__, err); dev_err(data->bmc_device, "validate_addr=%x\n", err);
return err; return err;
} }
...@@ -161,7 +161,7 @@ static int ibmpex_ver_check(struct ibmpex_bmc_data *data) ...@@ -161,7 +161,7 @@ static int ibmpex_ver_check(struct ibmpex_bmc_data *data)
data->sensor_major = data->rx_msg_data[0]; data->sensor_major = data->rx_msg_data[0];
data->sensor_minor = data->rx_msg_data[1]; data->sensor_minor = data->rx_msg_data[1];
printk(KERN_INFO DRVNAME ": Found BMC with sensor interface " dev_info(data->bmc_device, "Found BMC with sensor interface "
"v%d.%d %d-%02d-%02d on interface %d\n", "v%d.%d %d-%02d-%02d on interface %d\n",
data->sensor_major, data->sensor_major,
data->sensor_minor, data->sensor_minor,
...@@ -212,7 +212,7 @@ static int ibmpex_query_sensor_data(struct ibmpex_bmc_data *data, int sensor) ...@@ -212,7 +212,7 @@ static int ibmpex_query_sensor_data(struct ibmpex_bmc_data *data, int sensor)
wait_for_completion(&data->read_complete); wait_for_completion(&data->read_complete);
if (data->rx_result || data->rx_msg_len < 26) { if (data->rx_result || data->rx_msg_len < 26) {
printk(KERN_ERR "Error reading sensor %d, please check.\n", dev_err(data->bmc_device, "Error reading sensor %d.\n",
sensor); sensor);
return -ENOENT; return -ENOENT;
} }
...@@ -456,8 +456,7 @@ static void ibmpex_register_bmc(int iface, struct device *dev) ...@@ -456,8 +456,7 @@ static void ibmpex_register_bmc(int iface, struct device *dev)
data = kzalloc(sizeof(*data), GFP_KERNEL); data = kzalloc(sizeof(*data), GFP_KERNEL);
if (!data) { if (!data) {
printk(KERN_ERR DRVNAME ": Insufficient memory for BMC " dev_err(dev, "Insufficient memory for BMC interface.\n");
"interface.\n");
return; return;
} }
...@@ -471,9 +470,8 @@ static void ibmpex_register_bmc(int iface, struct device *dev) ...@@ -471,9 +470,8 @@ static void ibmpex_register_bmc(int iface, struct device *dev)
err = ipmi_create_user(data->interface, &driver_data.ipmi_hndlrs, err = ipmi_create_user(data->interface, &driver_data.ipmi_hndlrs,
data, &data->user); data, &data->user);
if (err < 0) { if (err < 0) {
printk(KERN_ERR DRVNAME ": Error, unable to register user with " dev_err(dev, "Unable to register user with IPMI "
"ipmi interface %d\n", "interface %d\n", data->interface);
data->interface);
goto out; goto out;
} }
...@@ -495,8 +493,8 @@ static void ibmpex_register_bmc(int iface, struct device *dev) ...@@ -495,8 +493,8 @@ static void ibmpex_register_bmc(int iface, struct device *dev)
data->hwmon_dev = hwmon_device_register(data->bmc_device); data->hwmon_dev = hwmon_device_register(data->bmc_device);
if (IS_ERR(data->hwmon_dev)) { if (IS_ERR(data->hwmon_dev)) {
printk(KERN_ERR DRVNAME ": Error, unable to register hwmon " dev_err(data->bmc_device, "Unable to register hwmon "
"class device for interface %d\n", "device for IPMI interface %d\n",
data->interface); data->interface);
goto out_user; goto out_user;
} }
...@@ -508,7 +506,7 @@ static void ibmpex_register_bmc(int iface, struct device *dev) ...@@ -508,7 +506,7 @@ static void ibmpex_register_bmc(int iface, struct device *dev)
/* Now go find all the sensors */ /* Now go find all the sensors */
err = ibmpex_find_sensors(data); err = ibmpex_find_sensors(data);
if (err) { if (err) {
printk(KERN_ERR "Error %d allocating memory\n", err); dev_err(data->bmc_device, "Error %d finding sensors\n", err);
goto out_register; goto out_register;
} }
...@@ -561,8 +559,8 @@ static void ibmpex_msg_handler(struct ipmi_recv_msg *msg, void *user_msg_data) ...@@ -561,8 +559,8 @@ static void ibmpex_msg_handler(struct ipmi_recv_msg *msg, void *user_msg_data)
struct ibmpex_bmc_data *data = (struct ibmpex_bmc_data *)user_msg_data; struct ibmpex_bmc_data *data = (struct ibmpex_bmc_data *)user_msg_data;
if (msg->msgid != data->tx_msgid) { if (msg->msgid != data->tx_msgid) {
printk(KERN_ERR "Received msgid (%02x) and transmitted " dev_err(data->bmc_device, "Mismatch between received msgid "
"msgid (%02x) mismatch!\n", "(%02x) and transmitted msgid (%02x)!\n",
(int)msg->msgid, (int)msg->msgid,
(int)data->tx_msgid); (int)data->tx_msgid);
ipmi_free_recv_msg(msg); ipmi_free_recv_msg(msg);
......
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