]> asedeno.scripts.mit.edu Git - linux.git/commitdiff
greybus: use decimal notation for interface and cport ids
authorJohan Hovold <johan@hovoldconsulting.com>
Wed, 11 Nov 2015 09:07:07 +0000 (10:07 +0100)
committerGreg Kroah-Hartman <gregkh@google.com>
Wed, 11 Nov 2015 17:18:28 +0000 (09:18 -0800)
Fix up the few places where hexadecimal rather than decimal notation was
used for interface and cport ids.

Note that this includes the endo sysfs-attribute for the AP interface
id.

Signed-off-by: Johan Hovold <johan@hovoldconsulting.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
drivers/staging/greybus/endo.c
drivers/staging/greybus/interface.c
drivers/staging/greybus/svc.c

index df4afb232c5e8577cf888956dafe78b3dcd323d7..775dbcea539b6ac6bbf420a663ad9a72d71ab339 100644 (file)
@@ -89,7 +89,7 @@ static ssize_t ap_intf_id_show(struct device *dev,
 {
        struct gb_endo *endo = to_gb_endo(dev);
 
-       return sprintf(buf, "0x%02x\n", endo->ap_intf_id);
+       return sprintf(buf, "%u\n", endo->ap_intf_id);
 }
 static DEVICE_ATTR_RO(ap_intf_id);
 
index b864f6879ffb74adda27b27bf17f36694b3e0c9d..4c96adc56139da582da62307934365a9c4cb27cd 100644 (file)
@@ -157,8 +157,7 @@ struct gb_interface *gb_interface_create(struct gb_host_device *hd,
 
        retval = device_add(&intf->dev);
        if (retval) {
-               pr_err("failed to add interface device for id 0x%02hhx\n",
-                      interface_id);
+               pr_err("failed to add interface %u\n", interface_id);
                goto free_intf;
        }
 
index c2633e25d43b3348f5199aa6a84f1cd536a4f48d..acf08e774791e18b601d9f8e0eac053cc3b38d20 100644 (file)
@@ -268,7 +268,7 @@ void gb_svc_connection_destroy(struct gb_svc *svc, u8 intf1_id, u16 cport1_id,
        ret = gb_operation_sync(connection, GB_SVC_TYPE_CONN_DESTROY,
                                &request, sizeof(request), NULL, 0);
        if (ret)
-               pr_err("failed to destroy connection (%hhx:%hx %hhx:%hx) %d\n",
+               pr_err("failed to destroy connection (%hhu:%hu %hhu:%hu) %d\n",
                       intf1_id, cport1_id, intf2_id, cport2_id, ret);
 }
 EXPORT_SYMBOL_GPL(gb_svc_connection_destroy);
@@ -300,7 +300,7 @@ static void gb_svc_route_destroy(struct gb_svc *svc, u8 intf1_id, u8 intf2_id)
        ret = gb_operation_sync(svc->connection, GB_SVC_TYPE_ROUTE_DESTROY,
                                &request, sizeof(request), NULL, 0);
        if (ret)
-               pr_err("failed to destroy route (%hhx %hhx) %d\n",
+               pr_err("failed to destroy route (%hhu %hhu) %d\n",
                        intf1_id, intf2_id, ret);
 }