Drivers: hv: vmbus: Use uuid_le_cmp() for comparing GUIDs
authorK. Y. Srinivasan <kys@microsoft.com>
Tue, 15 Dec 2015 00:01:44 +0000 (16:01 -0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 15 Dec 2015 03:15:05 +0000 (19:15 -0800)
Use uuid_le_cmp() for comparing GUIDs.

Signed-off-by: K. Y. Srinivasan <kys@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/hv/channel_mgmt.c
drivers/hv/vmbus_drv.c

index 38470aa4387f099f09b5883551cf6983049d9181..dc4fb0bccb8d87970f625238872e7f5f0f6ee72a 100644 (file)
@@ -408,8 +408,7 @@ static void init_vp_index(struct vmbus_channel *channel, const uuid_le *type_gui
        struct cpumask *alloced_mask;
 
        for (i = IDE; i < MAX_PERF_CHN; i++) {
-               if (!memcmp(type_guid->b, &hp_devs[i].guid,
-                                sizeof(uuid_le))) {
+               if (!uuid_le_cmp(*type_guid, hp_devs[i].guid)) {
                        perf_chn = true;
                        break;
                }
index 7078b5f143a245c7a4805743f883b465f3262694..9e0e25c394f5db810e4b138158bdf5443f00cc2a 100644 (file)
@@ -533,7 +533,7 @@ static const uuid_le null_guid;
 
 static inline bool is_null_guid(const uuid_le *guid)
 {
-       if (memcmp(guid, &null_guid, sizeof(uuid_le)))
+       if (uuid_le_cmp(*guid, null_guid))
                return false;
        return true;
 }
@@ -547,7 +547,7 @@ static const struct hv_vmbus_device_id *hv_vmbus_get_id(
                                        const uuid_le *guid)
 {
        for (; !is_null_guid(&id->guid); id++)
-               if (!memcmp(&id->guid, guid, sizeof(uuid_le)))
+               if (!uuid_le_cmp(id->guid, *guid))
                        return id;
 
        return NULL;