From af3ff643ea91ba64dd8d0b1cbed54d44512f96cd Mon Sep 17 00:00:00 2001 From: "K. Y. Srinivasan" Date: Mon, 14 Dec 2015 16:01:43 -0800 Subject: Drivers: hv: vmbus: Use uuid_le type consistently Consistently use uuid_le type in the Hyper-V driver code. Signed-off-by: K. Y. Srinivasan Signed-off-by: Greg Kroah-Hartman --- drivers/hv/channel_mgmt.c | 2 +- drivers/hv/vmbus_drv.c | 10 +++++----- 2 files changed, 6 insertions(+), 6 deletions(-) (limited to 'drivers/hv') diff --git a/drivers/hv/channel_mgmt.c b/drivers/hv/channel_mgmt.c index a77646b4fcc8..38470aa4387f 100644 --- a/drivers/hv/channel_mgmt.c +++ b/drivers/hv/channel_mgmt.c @@ -408,7 +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, + if (!memcmp(type_guid->b, &hp_devs[i].guid, sizeof(uuid_le))) { perf_chn = true; break; diff --git a/drivers/hv/vmbus_drv.c b/drivers/hv/vmbus_drv.c index c01b689e39b1..7078b5f143a2 100644 --- a/drivers/hv/vmbus_drv.c +++ b/drivers/hv/vmbus_drv.c @@ -531,7 +531,7 @@ static int vmbus_uevent(struct device *device, struct kobj_uevent_env *env) static const uuid_le null_guid; -static inline bool is_null_guid(const __u8 *guid) +static inline bool is_null_guid(const uuid_le *guid) { if (memcmp(guid, &null_guid, sizeof(uuid_le))) return false; @@ -544,9 +544,9 @@ static inline bool is_null_guid(const __u8 *guid) */ static const struct hv_vmbus_device_id *hv_vmbus_get_id( const struct hv_vmbus_device_id *id, - const __u8 *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))) return id; @@ -563,7 +563,7 @@ static int vmbus_match(struct device *device, struct device_driver *driver) struct hv_driver *drv = drv_to_hv_drv(driver); struct hv_device *hv_dev = device_to_hv_device(device); - if (hv_vmbus_get_id(drv->id_table, hv_dev->dev_type.b)) + if (hv_vmbus_get_id(drv->id_table, &hv_dev->dev_type)) return 1; return 0; @@ -580,7 +580,7 @@ static int vmbus_probe(struct device *child_device) struct hv_device *dev = device_to_hv_device(child_device); const struct hv_vmbus_device_id *dev_id; - dev_id = hv_vmbus_get_id(drv->id_table, dev->dev_type.b); + dev_id = hv_vmbus_get_id(drv->id_table, &dev->dev_type); if (drv->probe) { ret = drv->probe(dev, dev_id); if (ret != 0) -- cgit v1.2.3