Commit 4ae92508 authored by K. Y. Srinivasan's avatar K. Y. Srinivasan Committed by Greg Kroah-Hartman

Drivers: hv: vmbus: Use uuid_le_cmp() for comparing GUIDs

Use uuid_le_cmp() for comparing GUIDs.
Signed-off-by: default avatarK. Y. Srinivasan <kys@microsoft.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent af3ff643
...@@ -408,8 +408,7 @@ static void init_vp_index(struct vmbus_channel *channel, const uuid_le *type_gui ...@@ -408,8 +408,7 @@ static void init_vp_index(struct vmbus_channel *channel, const uuid_le *type_gui
struct cpumask *alloced_mask; struct cpumask *alloced_mask;
for (i = IDE; i < MAX_PERF_CHN; i++) { for (i = IDE; i < MAX_PERF_CHN; i++) {
if (!memcmp(type_guid->b, &hp_devs[i].guid, if (!uuid_le_cmp(*type_guid, hp_devs[i].guid)) {
sizeof(uuid_le))) {
perf_chn = true; perf_chn = true;
break; break;
} }
......
...@@ -533,7 +533,7 @@ static const uuid_le null_guid; ...@@ -533,7 +533,7 @@ static const uuid_le null_guid;
static inline bool is_null_guid(const uuid_le *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 false;
return true; return true;
} }
...@@ -547,7 +547,7 @@ static const struct hv_vmbus_device_id *hv_vmbus_get_id( ...@@ -547,7 +547,7 @@ static const struct hv_vmbus_device_id *hv_vmbus_get_id(
const uuid_le *guid) const uuid_le *guid)
{ {
for (; !is_null_guid(&id->guid); id++) 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 id;
return NULL; return NULL;
......
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