Commit 305a031e authored by Johan Hovold's avatar Johan Hovold Committed by Greg Kroah-Hartman

greybus: es1/es2: clean up error messages

Replace the remaining pr_err with dev_err, and drop redundant function
prefixes.
Signed-off-by: default avatarJohan Hovold <johan@hovoldconsulting.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@google.com>
parent 67b81757
......@@ -193,7 +193,8 @@ static int message_send(struct greybus_host_device *hd, u16 cport_id,
* the target CPort id before filling it in.
*/
if (!cport_id_valid(hd, cport_id)) {
pr_err("invalid destination cport 0x%02x\n", cport_id);
dev_err(&udev->dev, "invalid destination cport 0x%02x\n",
cport_id);
return -EINVAL;
}
......@@ -219,7 +220,7 @@ static int message_send(struct greybus_host_device *hd, u16 cport_id,
trace_gb_host_device_send(hd, cport_id, buffer_size);
retval = usb_submit_urb(urb, gfp_mask);
if (retval) {
pr_err("error %d submitting URB\n", retval);
dev_err(&udev->dev, "failed to submit out-urb: %d\n", retval);
spin_lock_irqsave(&es1->cport_out_urb_lock, flags);
message->hcpriv = NULL;
......@@ -363,7 +364,7 @@ static void cport_in_callback(struct urb *urb)
}
if (urb->actual_length < sizeof(*header)) {
dev_err(dev, "%s: short message received\n", __func__);
dev_err(dev, "short message received\n");
goto exit;
}
......@@ -376,15 +377,13 @@ static void cport_in_callback(struct urb *urb)
greybus_data_rcvd(hd, cport_id, urb->transfer_buffer,
urb->actual_length);
} else {
dev_err(dev, "%s: invalid cport id 0x%02x received\n",
__func__, cport_id);
dev_err(dev, "invalid cport id 0x%02x received\n", cport_id);
}
exit:
/* put our urb back in the request pool */
retval = usb_submit_urb(urb, GFP_ATOMIC);
if (retval)
dev_err(dev, "%s: error %d in submitting urb.\n",
__func__, retval);
dev_err(dev, "failed to resubmit in-urb: %d\n", retval);
}
static void cport_out_callback(struct urb *urb)
......
......@@ -298,7 +298,8 @@ static int message_send(struct greybus_host_device *hd, u16 cport_id,
* the target CPort id before filling it in.
*/
if (!cport_id_valid(hd, cport_id)) {
pr_err("invalid destination cport 0x%02x\n", cport_id);
dev_err(&udev->dev, "invalid destination cport 0x%02x\n",
cport_id);
return -EINVAL;
}
......@@ -326,7 +327,7 @@ static int message_send(struct greybus_host_device *hd, u16 cport_id,
trace_gb_host_device_send(hd, cport_id, buffer_size);
retval = usb_submit_urb(urb, gfp_mask);
if (retval) {
pr_err("error %d submitting URB\n", retval);
dev_err(&udev->dev, "failed to submit out-urb: %d\n", retval);
spin_lock_irqsave(&es1->cport_out_urb_lock, flags);
message->hcpriv = NULL;
......@@ -509,7 +510,7 @@ static void cport_in_callback(struct urb *urb)
}
if (urb->actual_length < sizeof(*header)) {
dev_err(dev, "%s: short message received\n", __func__);
dev_err(dev, "short message received\n");
goto exit;
}
......@@ -522,15 +523,13 @@ static void cport_in_callback(struct urb *urb)
greybus_data_rcvd(hd, cport_id, urb->transfer_buffer,
urb->actual_length);
} else {
dev_err(dev, "%s: invalid cport id 0x%02x received\n",
__func__, cport_id);
dev_err(dev, "invalid cport id 0x%02x received\n", cport_id);
}
exit:
/* put our urb back in the request pool */
retval = usb_submit_urb(urb, GFP_ATOMIC);
if (retval)
dev_err(dev, "%s: error %d in submitting urb.\n",
__func__, retval);
dev_err(dev, "failed to resubmit in-urb: %d\n", retval);
}
static void cport_out_callback(struct urb *urb)
......
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