Commit 100e9000 authored by Johan Hovold's avatar Johan Hovold Committed by Greg Kroah-Hartman

greybus: use decimal notation for interfaces, bundles and cports

Fix up the last few places where hexadecimal rather than decimal
notation was used for interface, bundle and cport ids.
Signed-off-by: default avatarJohan Hovold <johan@hovoldconsulting.com>
Reviewed-by: default avatarViresh Kumar <viresh.kumar@linaro.org>
Reviewed-by: default avatarBryan O'Donoghue <bryan.odonoghue@linaro.org>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@google.com>
parent 7adeaae7
...@@ -98,7 +98,7 @@ struct gb_bundle *gb_bundle_create(struct gb_interface *intf, u8 bundle_id, ...@@ -98,7 +98,7 @@ struct gb_bundle *gb_bundle_create(struct gb_interface *intf, u8 bundle_id,
* the interface bundle list locked here. * the interface bundle list locked here.
*/ */
if (gb_bundle_find(intf, bundle_id)) { if (gb_bundle_find(intf, bundle_id)) {
pr_err("duplicate bundle id 0x%02x\n", bundle_id); pr_err("duplicate bundle id %u\n", bundle_id);
return NULL; return NULL;
} }
...@@ -122,8 +122,7 @@ struct gb_bundle *gb_bundle_create(struct gb_interface *intf, u8 bundle_id, ...@@ -122,8 +122,7 @@ struct gb_bundle *gb_bundle_create(struct gb_interface *intf, u8 bundle_id,
retval = device_add(&bundle->dev); retval = device_add(&bundle->dev);
if (retval) { if (retval) {
pr_err("failed to add bundle device for id 0x%02x\n", pr_err("failed to add bundle device for id %u\n", bundle_id);
bundle_id);
put_device(&bundle->dev); put_device(&bundle->dev);
return NULL; return NULL;
} }
......
...@@ -133,7 +133,7 @@ gb_connection_create(struct gb_host_device *hd, int hd_cport_id, ...@@ -133,7 +133,7 @@ gb_connection_create(struct gb_host_device *hd, int hd_cport_id,
* about holding the connection lock. * about holding the connection lock.
*/ */
if (bundle && gb_connection_intf_find(bundle->intf, cport_id)) { if (bundle && gb_connection_intf_find(bundle->intf, cport_id)) {
dev_err(&bundle->dev, "cport 0x%04x already connected\n", dev_err(&bundle->dev, "cport %u already connected\n",
cport_id); cport_id);
return NULL; return NULL;
} }
......
...@@ -348,8 +348,7 @@ static int message_send(struct gb_host_device *hd, u16 cport_id, ...@@ -348,8 +348,7 @@ static int message_send(struct gb_host_device *hd, u16 cport_id,
* the target CPort id before filling it in. * the target CPort id before filling it in.
*/ */
if (!cport_id_valid(hd, cport_id)) { if (!cport_id_valid(hd, cport_id)) {
dev_err(&udev->dev, "invalid destination cport 0x%02x\n", dev_err(&udev->dev, "invalid cport %u\n", cport_id);
cport_id);
return -EINVAL; return -EINVAL;
} }
...@@ -470,8 +469,7 @@ static int latency_tag_enable(struct gb_host_device *hd, u16 cport_id) ...@@ -470,8 +469,7 @@ static int latency_tag_enable(struct gb_host_device *hd, u16 cport_id)
struct usb_device *udev = es2->usb_dev; struct usb_device *udev = es2->usb_dev;
if (!cport_id_valid(hd, cport_id)) { if (!cport_id_valid(hd, cport_id)) {
dev_err(&udev->dev, "invalid destination cport 0x%02x\n", dev_err(&udev->dev, "invalid cport %u\n", cport_id);
cport_id);
return -EINVAL; return -EINVAL;
} }
...@@ -494,8 +492,7 @@ static int latency_tag_disable(struct gb_host_device *hd, u16 cport_id) ...@@ -494,8 +492,7 @@ static int latency_tag_disable(struct gb_host_device *hd, u16 cport_id)
struct usb_device *udev = es2->usb_dev; struct usb_device *udev = es2->usb_dev;
if (!cport_id_valid(hd, cport_id)) { if (!cport_id_valid(hd, cport_id)) {
dev_err(&udev->dev, "invalid destination cport 0x%02x\n", dev_err(&udev->dev, "invalid cport %u\n", cport_id);
cport_id);
return -EINVAL; return -EINVAL;
} }
...@@ -632,7 +629,7 @@ static void cport_in_callback(struct urb *urb) ...@@ -632,7 +629,7 @@ static void cport_in_callback(struct urb *urb)
greybus_data_rcvd(hd, cport_id, urb->transfer_buffer, greybus_data_rcvd(hd, cport_id, urb->transfer_buffer,
urb->actual_length); urb->actual_length);
} else { } else {
dev_err(dev, "invalid cport id 0x%02x received\n", cport_id); dev_err(dev, "invalid cport id %u received\n", cport_id);
} }
exit: exit:
/* put our urb back in the request pool */ /* put our urb back in the request pool */
......
...@@ -41,7 +41,7 @@ DECLARE_EVENT_CLASS(gb_message, ...@@ -41,7 +41,7 @@ DECLARE_EVENT_CLASS(gb_message,
__entry->payload_size = message->payload_size; __entry->payload_size = message->payload_size;
), ),
TP_printk("greybus:%s op=%04x if_id=%04x hd_id=%04x l=%zu", TP_printk("greybus:%s op=%04x if_id=%u hd_id=%u l=%zu",
__get_str(name), __entry->op_id, __entry->intf_cport_id, __get_str(name), __entry->op_id, __entry->intf_cport_id,
__entry->hd_cport_id, __entry->payload_size) __entry->hd_cport_id, __entry->payload_size)
); );
...@@ -125,7 +125,7 @@ DECLARE_EVENT_CLASS(gb_host_device, ...@@ -125,7 +125,7 @@ DECLARE_EVENT_CLASS(gb_host_device,
__entry->payload_size = payload_size; __entry->payload_size = payload_size;
), ),
TP_printk("greybus:%s if_id=%04x l=%zu", __get_str(name), TP_printk("greybus:%s if_id=%u l=%zu", __get_str(name),
__entry->intf_cport_id, __entry->payload_size) __entry->intf_cport_id, __entry->payload_size)
); );
......
...@@ -323,7 +323,7 @@ static u32 gb_manifest_parse_bundles(struct gb_interface *intf) ...@@ -323,7 +323,7 @@ static u32 gb_manifest_parse_bundles(struct gb_interface *intf)
/* Nothing else should have its class set to control class */ /* Nothing else should have its class set to control class */
if (class == GREYBUS_CLASS_CONTROL) { if (class == GREYBUS_CLASS_CONTROL) {
dev_err(&intf->dev, dev_err(&intf->dev,
"bundle 0x%02x cannot use control class\n", "bundle %u cannot use control class\n",
bundle_id); bundle_id);
goto cleanup; goto cleanup;
} }
......
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