Skip to content

Commit

Permalink
hyper-v: Supply GUID pointer to printf() like functions
Browse files Browse the repository at this point in the history
Drop dereference when printing the GUID with printf() like functions.
This allows to hide the uuid_t internals.

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Link: https://lore.kernel.org/r/20200423134505.78221-2-andriy.shevchenko@linux.intel.com
Signed-off-by: Wei Liu <wei.liu@kernel.org>
  • Loading branch information
Andy Shevchenko authored and Wei Liu committed May 20, 2020
1 parent 69f5705 commit 458c447
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions drivers/hv/vmbus_drv.c
Original file line number Diff line number Diff line change
Expand Up @@ -201,7 +201,7 @@ static ssize_t class_id_show(struct device *dev,
if (!hv_dev->channel)
return -ENODEV;
return sprintf(buf, "{%pUl}\n",
hv_dev->channel->offermsg.offer.if_type.b);
&hv_dev->channel->offermsg.offer.if_type);
}
static DEVICE_ATTR_RO(class_id);

Expand All @@ -213,7 +213,7 @@ static ssize_t device_id_show(struct device *dev,
if (!hv_dev->channel)
return -ENODEV;
return sprintf(buf, "{%pUl}\n",
hv_dev->channel->offermsg.offer.if_instance.b);
&hv_dev->channel->offermsg.offer.if_instance);
}
static DEVICE_ATTR_RO(device_id);

Expand Down Expand Up @@ -1991,7 +1991,7 @@ int vmbus_device_register(struct hv_device *child_device_obj)
int ret;

dev_set_name(&child_device_obj->device, "%pUl",
child_device_obj->channel->offermsg.offer.if_instance.b);
&child_device_obj->channel->offermsg.offer.if_instance);

child_device_obj->device.bus = &hv_bus;
child_device_obj->device.parent = &hv_acpi_dev->dev;
Expand Down

0 comments on commit 458c447

Please sign in to comment.