From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753013AbbKLAzz (ORCPT ); Wed, 11 Nov 2015 19:55:55 -0500 Received: from p3plsmtps2ded03.prod.phx3.secureserver.net ([208.109.80.60]:59213 "EHLO p3plsmtps2ded03.prod.phx3.secureserver.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752769AbbKLAyz (ORCPT ); Wed, 11 Nov 2015 19:54:55 -0500 x-originating-ip: 72.167.245.219 From: "K. Y. Srinivasan" To: gregkh@linuxfoundation.org, linux-kernel@vger.kernel.org, devel@linuxdriverproject.org, olaf@aepfle.de, apw@canonical.com, vkuznets@redhat.com, jasowang@redhat.com Cc: "K. Y. Srinivasan" Subject: [PATCH V2 03/12] Drivers: hv: vmbus: Use uuid_le_cmp() for comparing GUIDs Date: Wed, 11 Nov 2015 18:26:15 -0800 Message-Id: <1447295184-9051-3-git-send-email-kys@microsoft.com> X-Mailer: git-send-email 1.7.4.1 In-Reply-To: <1447295184-9051-1-git-send-email-kys@microsoft.com> References: <1447295158-9012-1-git-send-email-kys@microsoft.com> <1447295184-9051-1-git-send-email-kys@microsoft.com> Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Use uuid_le_cmp() for comparing GUIDs. Signed-off-by: K. Y. Srinivasan --- V2: Fixed the typo in both the commit log and Subject line. 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