Joe Perches
2012-Jul-17 16:19 UTC
[PATCH 01/15] Drivers: hv: Format GUIDS as per MSFT standards
On Tue, 2012-07-17 at 09:04 -0700, Greg KH wrote:> On Sat, Jul 14, 2012 at 01:34:06PM -0700, K. Y. Srinivasan wrote: > > Format GUIDS as per MSFT standard. This makes interacting with MSFT > > tool stack easier.[]> > diff --git a/drivers/hv/vmbus_drv.c b/drivers/hv/vmbus_drv.c[]> > @@ -147,7 +147,7 @@ static ssize_t vmbus_show_device_attr(struct device *dev, > > > > if (!strcmp(dev_attr->attr.name, "class_id")) { > > ret = sprintf(buf, "{%02x%02x%02x%02x-%02x%02x-%02x%02x-" > > - "%02x%02x%02x%02x%02x%02x%02x%02x}\n", > > + "%02x%02x-%02x%02x%02x%02x%02x%02x}\n", > > As Joe pointed out, please just use the printk modifier the kernel > already has for GUIDS, and don't roll your own here. That will work > properly for you, right?%pU became available in 2.6.33 I think one of their support targets is RHEL6 which I believe is 2.6.32+.
Greg KH
2012-Jul-17 16:32 UTC
[PATCH 01/15] Drivers: hv: Format GUIDS as per MSFT standards
On Tue, Jul 17, 2012 at 09:19:26AM -0700, Joe Perches wrote:> On Tue, 2012-07-17 at 09:04 -0700, Greg KH wrote: > > On Sat, Jul 14, 2012 at 01:34:06PM -0700, K. Y. Srinivasan wrote: > > > Format GUIDS as per MSFT standard. This makes interacting with MSFT > > > tool stack easier. > [] > > > diff --git a/drivers/hv/vmbus_drv.c b/drivers/hv/vmbus_drv.c > [] > > > @@ -147,7 +147,7 @@ static ssize_t vmbus_show_device_attr(struct device *dev, > > > > > > if (!strcmp(dev_attr->attr.name, "class_id")) { > > > ret = sprintf(buf, "{%02x%02x%02x%02x-%02x%02x-%02x%02x-" > > > - "%02x%02x%02x%02x%02x%02x%02x%02x}\n", > > > + "%02x%02x-%02x%02x%02x%02x%02x%02x}\n", > > > > As Joe pointed out, please just use the printk modifier the kernel > > already has for GUIDS, and don't roll your own here. That will work > > properly for you, right? > > %pU became available in 2.6.33 > > I think one of their support targets is RHEL6 which > I believe is 2.6.32+.That's nice, but it's nothing that I care about for in-kernel code, nor should anyone else. greg k-h
Maybe Matching Threads
- [PATCH 01/15] Drivers: hv: Format GUIDS as per MSFT standards
- [PATCH] Staging: hv: vmbus: Show the modalias in /sys/bus/vmbus/devices/*/
- [PATCH] Staging: hv: vmbus: Show the modalias in /sys/bus/vmbus/devices/*/
- [PATCH 00/12] Staging: hv: Cleanup vmbus driver - Phase II
- [PATCH 00/12] Staging: hv: Cleanup vmbus driver - Phase II