From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 077AFA04B5; Thu, 17 Sep 2020 02:48:39 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 5270A1C246; Thu, 17 Sep 2020 02:48:39 +0200 (CEST) Received: from mga01.intel.com (mga01.intel.com [192.55.52.88]) by dpdk.org (Postfix) with ESMTP id 76DF91C23C for ; Thu, 17 Sep 2020 02:48:38 +0200 (CEST) IronPort-SDR: 2yng7GgIop43Hw2DsBqpplcdsisQmAx8iZwtgWBu/Ty+MGgov/mID7kO8iYtuwyiEuG50Ly+8Y JHQ8lEIAR3sA== X-IronPort-AV: E=McAfee;i="6000,8403,9746"; a="177676201" X-IronPort-AV: E=Sophos;i="5.76,434,1592895600"; d="scan'208";a="177676201" X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga006.fm.intel.com ([10.253.24.20]) by fmsmga101.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 16 Sep 2020 17:48:37 -0700 IronPort-SDR: Ao8DMYjyZoKvsuOo0485+kmuZV2gFP5fHQLZPDeOnci1PUSxH7FjOPbo5hlPTOHzjw6pyC9kF+ N+H/b5mzq0og== X-IronPort-AV: E=Sophos;i="5.76,434,1592895600"; d="scan'208";a="507367768" Received: from rmenon-desk.amr.corp.intel.com (HELO [10.166.30.253]) ([10.166.30.253]) by fmsmga006-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 16 Sep 2020 17:48:37 -0700 To: Stephen Hemminger , Pallavi Kadam Cc: dev@dpdk.org, thomas@monjalon.net, John.Alexander@datapath.co.uk, dmitry.kozliuk@gmail.com, Narcisa.Vasile@microsoft.com, talshn@nvidia.com References: <20200911015947.20044-1-pallavi.kadam@intel.com> <20200915232803.880-1-pallavi.kadam@intel.com> <20200915185409.7af0f626@hermes.lan> From: Ranjit Menon Message-ID: Date: Wed, 16 Sep 2020 17:48:36 -0700 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:68.0) Gecko/20100101 Thunderbird/68.12.0 MIME-Version: 1.0 In-Reply-To: <20200915185409.7af0f626@hermes.lan> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Content-Language: en-US Subject: Re: [dpdk-dev] [PATCH v2] bus/pci: netuio interface for windows X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" Hi, Stephen On 9/15/2020 6:54 PM, Stephen Hemminger wrote: > On Tue, 15 Sep 2020 16:28:03 -0700 > Pallavi Kadam wrote: > >> + if (IsEqualGUID((const void *)&(device_info_data->ClassGuid), >> + (const void *)&GUID_DEVCLASS_NETUIO)) > Is there anyway to get rid of casts and have the right types? > Casts are evil Unfortunately, this macro is defined inside the Windows SDK and it simply calls the C library function memcmp() which expects a (void *). Would something like this be acceptable? const void *guid = &(device_info_data->ClassGuid); const void *guid_netuio = &GUID_DEVCLASS_NETUIO; if (IsEqualGUID(guid, guid_netuio) .... ranjit m.