RE: [PATCH 03/11] Drivers: hv: vmbus: Use the macro for comparing GUIDs

From: KY Srinivasan
Date: Wed Nov 11 2015 - 12:32:37 EST




> -----Original Message-----
> From: Andy Shevchenko [mailto:andy.shevchenko@xxxxxxxxx]
> Sent: Wednesday, November 11, 2015 12:35 AM
> To: KY Srinivasan <kys@xxxxxxxxxxxxx>
> Cc: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx>; linux-
> kernel@xxxxxxxxxxxxxxx; devel@xxxxxxxxxxxxxxxxxxxxxx; olaf@xxxxxxxxx;
> Robo Bot <apw@xxxxxxxxxxxxx>; Vitaly Kuznetsov <vkuznets@xxxxxxxxxx>;
> jasowang@xxxxxxxxxx
> Subject: Re: [PATCH 03/11] Drivers: hv: vmbus: Use the macro for comparing
> GUIDs
>
> On Wed, Nov 11, 2015 at 3:59 AM, K. Y. Srinivasan <kys@xxxxxxxxxxxxx>
> wrote:
> > Use the uuid_le_cmp() macro for comparing GUIDs.
>
> It's not a macro as I see.

Yes; Joe Perches notified me of this in a private email yesterday. I will resend
the series with the correction.

Regards,

K. Y
>
> >
> > Signed-off-by: K. Y. Srinivasan <kys@xxxxxxxxxxxxx>
> > ---
> > drivers/hv/channel_mgmt.c | 3 +--
> > drivers/hv/vmbus_drv.c | 4 ++--
> > 2 files changed, 3 insertions(+), 4 deletions(-)
> >
> > diff --git a/drivers/hv/channel_mgmt.c b/drivers/hv/channel_mgmt.c
> > index 38470aa..dc4fb0b 100644
> > --- a/drivers/hv/channel_mgmt.c
> > +++ b/drivers/hv/channel_mgmt.c
> > @@ -408,8 +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,
> > - sizeof(uuid_le))) {
> > + if (!uuid_le_cmp(*type_guid, hp_devs[i].guid)) {
> > perf_chn = true;
> > break;
> > }
> > diff --git a/drivers/hv/vmbus_drv.c b/drivers/hv/vmbus_drv.c
> > index 7078b5f..9e0e25c 100644
> > --- a/drivers/hv/vmbus_drv.c
> > +++ b/drivers/hv/vmbus_drv.c
> > @@ -533,7 +533,7 @@ static const uuid_le null_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 true;
> > }
> > @@ -547,7 +547,7 @@ static const struct hv_vmbus_device_id
> *hv_vmbus_get_id(
> > const uuid_le *guid)
> > {
> > 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 NULL;
> > --
> > 1.7.4.1
> >
> > --
> > To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
> > the body of a message to majordomo@xxxxxxxxxxxxxxx
> > More majordomo info at
> https://na01.safelinks.protection.outlook.com/?url=http%3a%2f%2fvger.ker
> nel.org%2fmajordomo-
> info.html&data=01%7c01%7ckys%40microsoft.com%7c730ce627896149ae2d6
> d08d2ea73039a%7c72f988bf86f141af91ab2d7cd011db47%7c1&sdata=3f8KxU
> u1SM928DtlFxJiyHnifGWMm9r%2be40HauvTWVA%3d
> > Please read the FAQ at
> https://na01.safelinks.protection.outlook.com/?url=http%3a%2f%2fwww.tu
> x.org%2flkml%2f&data=01%7c01%7ckys%40microsoft.com%7c730ce6278961
> 49ae2d6d08d2ea73039a%7c72f988bf86f141af91ab2d7cd011db47%7c1&sdata
> =p3r3Vl9LjnE5MKlmWjYtf1NOfaccWI4bWFDxh%2bOIXoY%3d
>
>
>
> --
> With Best Regards,
> Andy Shevchenko