Skip to content

Commit 458c447

Browse files
andy-shevliuw
authored andcommitted
hyper-v: Supply GUID pointer to printf() like functions
Drop dereference when printing the GUID with printf() like functions. This allows to hide the uuid_t internals. Signed-off-by: Andy Shevchenko <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Wei Liu <[email protected]>
1 parent 69f5705 commit 458c447

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

drivers/hv/vmbus_drv.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -201,7 +201,7 @@ static ssize_t class_id_show(struct device *dev,
201201
if (!hv_dev->channel)
202202
return -ENODEV;
203203
return sprintf(buf, "{%pUl}\n",
204-
hv_dev->channel->offermsg.offer.if_type.b);
204+
&hv_dev->channel->offermsg.offer.if_type);
205205
}
206206
static DEVICE_ATTR_RO(class_id);
207207

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

@@ -1991,7 +1991,7 @@ int vmbus_device_register(struct hv_device *child_device_obj)
19911991
int ret;
19921992

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

19961996
child_device_obj->device.bus = &hv_bus;
19971997
child_device_obj->device.parent = &hv_acpi_dev->dev;

0 commit comments

Comments
 (0)