From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 3F866A00C5; Tue, 15 Feb 2022 18:30:43 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 0406C410F7; Tue, 15 Feb 2022 18:30:43 +0100 (CET) Received: from mga14.intel.com (mga14.intel.com [192.55.52.115]) by mails.dpdk.org (Postfix) with ESMTP id 3B373410F3 for ; Tue, 15 Feb 2022 18:30:41 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1644946241; x=1676482241; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=UpZsPtd5oPIZVllKWMiyF/k0Dj5LaytbIchCBMC1ZoM=; b=KC539Np52YkQ1yjDl0Vm1LJF8fZ0EZuWSrWY/D0Wt4VYmRMDDciPkR+7 HbFUn9d9dxSX83bQZQe4G5tDsfP7hYeF5/rP44KTMNQUPvrVin31FzSSC BkG5EpslUxI4LViNmx+GhwVHTr+dfm7PNhlOT54NC/LQOuoKXQkjWKUL5 5cd+ez5OqU7N1eMR8g2GAFxdJMUfPJdtJ0VLRKfI2ul1XJhiHGVhEQHUm nUJEO96FDonXpGyj/B2L1wDxydK3FhCpBk9SIOVIY9D/ha/nDD8O+vjak D7X4rdBfgXHV3hMW73Dc7dQo5cFlkLGoJnBgSDZ6P+Asi3xaJ+FQDdnpK Q==; X-IronPort-AV: E=McAfee;i="6200,9189,10259"; a="250608771" X-IronPort-AV: E=Sophos;i="5.88,371,1635231600"; d="scan'208";a="250608771" Received: from orsmga001.jf.intel.com ([10.7.209.18]) by fmsmga103.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 15 Feb 2022 09:30:40 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.88,371,1635231600"; d="scan'208";a="570927394" Received: from silpixa00399126.ir.intel.com ([10.237.223.192]) by orsmga001.jf.intel.com with ESMTP; 15 Feb 2022 09:30:38 -0800 From: Bruce Richardson To: dev@dpdk.org Cc: Bruce Richardson , Thomas Monjalon , Ferruh Yigit , Andrew Rybchenko Subject: [PATCH 1/3] ethdev: fix missing cast for C++ compatibility Date: Tue, 15 Feb 2022 17:30:27 +0000 Message-Id: <20220215173029.1893710-2-bruce.richardson@intel.com> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20220215173029.1893710-1-bruce.richardson@intel.com> References: <20220215173029.1893710-1-bruce.richardson@intel.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org C++ does not allow implicit conversion to/from void*, so we need an explicit cast to allow the driver sdk header to be included from C++ code. Signed-off-by: Bruce Richardson --- lib/ethdev/ethdev_pci.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/lib/ethdev/ethdev_pci.h b/lib/ethdev/ethdev_pci.h index 71aa4b2e98..d2bc3fe5e0 100644 --- a/lib/ethdev/ethdev_pci.h +++ b/lib/ethdev/ethdev_pci.h @@ -46,8 +46,9 @@ rte_eth_copy_pci_info(struct rte_eth_dev *eth_dev, } static inline int -eth_dev_pci_specific_init(struct rte_eth_dev *eth_dev, void *bus_device) { - struct rte_pci_device *pci_dev = bus_device; +eth_dev_pci_specific_init(struct rte_eth_dev *eth_dev, void *bus_device) +{ + struct rte_pci_device *pci_dev = (struct rte_pci_device *)bus_device; if (!pci_dev) return -ENODEV; -- 2.32.0