]> git.karo-electronics.de Git - linux-beck.git/commitdiff
greybus: fix sparse warning in manifest.c
authorGreg Kroah-Hartman <gregkh@google.com>
Wed, 3 Feb 2016 05:31:19 +0000 (21:31 -0800)
committerGreg Kroah-Hartman <gregkh@google.com>
Wed, 3 Feb 2016 18:38:54 +0000 (10:38 -0800)
The cport id field is a le16, so treat it as such when comparing it to
something else.

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

index 5ca36c9001beddcb3605b39ebd41771ac19dd1f9..4e3c4cab0fc48bcab727d31ef991102e02b0e6dd 100644 (file)
@@ -256,7 +256,7 @@ static u32 gb_manifest_parse_cports(struct gb_bundle *bundle)
                 */
                list_for_each_entry(tmp, &list, links) {
                        desc_cport = tmp->data;
-                       if (cport_id == desc_cport->id) {
+                       if (cport_id == le16_to_cpu(desc_cport->id)) {
                                dev_err(&bundle->dev,
                                                "duplicate CPort %u found\n",
                                                cport_id);