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 9F7BFA04B1; Thu, 17 Sep 2020 03:20:18 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 5690D1D173; Thu, 17 Sep 2020 03:20:17 +0200 (CEST) Received: from mga07.intel.com (mga07.intel.com [134.134.136.100]) by dpdk.org (Postfix) with ESMTP id AC5701D15F for ; Thu, 17 Sep 2020 03:20:15 +0200 (CEST) IronPort-SDR: creVFmlLkizNtRGwIVmUCkjzoXBsuToLkp8qARj2sjIR9FALfkO3ZegSVrcot3DAosQvzUytHa qM1czQy9oHxw== X-IronPort-AV: E=McAfee;i="6000,8403,9746"; a="223781675" X-IronPort-AV: E=Sophos;i="5.76,434,1592895600"; d="scan'208";a="223781675" X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga001.jf.intel.com ([10.7.209.18]) by orsmga105.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 16 Sep 2020 18:20:14 -0700 IronPort-SDR: ToIPijnYlzfb2sYzgCo5E7Z1hgqplG6Nx1zwZvjhJHZ2qnJ+w65EpUNjuZyyuPEqxGgeJtX+b6 hs1uHWebDsAg== X-IronPort-AV: E=Sophos;i="5.76,434,1592895600"; d="scan'208";a="380363438" Received: from rmenon-desk.amr.corp.intel.com (HELO [10.166.30.253]) ([10.166.30.253]) by orsmga001-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 16 Sep 2020 18:20:14 -0700 From: Ranjit Menon 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> Message-ID: <920e6463-48a7-5b66-907a-670969087f85@intel.com> Date: Wed, 16 Sep 2020 18:20:13 -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: Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit 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" On 9/16/2020 5:48 PM, Ranjit Menon wrote: > 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) > > .... Actually, ignore what I wrote above! It's a void * - it doesn't need a cast. We'll fix this in V3. ranjit m.