From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by dpdk.space (Postfix) with ESMTP id 3F016A0096 for ; Wed, 10 Apr 2019 23:00:26 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 04C131B3AC; Wed, 10 Apr 2019 23:00:26 +0200 (CEST) Received: from mga03.intel.com (mga03.intel.com [134.134.136.65]) by dpdk.org (Postfix) with ESMTP id 125DB1B142; Wed, 10 Apr 2019 23:00:23 +0200 (CEST) X-Amp-Result: UNSCANNABLE X-Amp-File-Uploaded: False Received: from fmsmga003.fm.intel.com ([10.253.24.29]) by orsmga103.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 10 Apr 2019 14:00:22 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.60,334,1549958400"; d="scan'208";a="148167569" Received: from bricha3-mobl.ger.corp.intel.com ([10.252.12.149]) by FMSMGA003.fm.intel.com with SMTP; 10 Apr 2019 14:00:19 -0700 Received: by (sSMTP sendmail emulation); Wed, 10 Apr 2019 22:00:18 +0100 Date: Wed, 10 Apr 2019 22:00:18 +0100 From: Bruce Richardson To: David Christensen Cc: thomas@monjalon.net, ferruh.yigit@intel.com, arybchenko@solarflare.com, dev@dpdk.org, radhika.chirra@ibm.com, stable@dpdk.org Message-ID: <20190410210017.GA742@bricha3-MOBL.ger.corp.intel.com> References: <1554927376-93022-1-git-send-email-drc@linux.vnet.ibm.com> MIME-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Disposition: inline In-Reply-To: <1554927376-93022-1-git-send-email-drc@linux.vnet.ibm.com> User-Agent: Mutt/1.11.4 (2019-03-13) Subject: Re: [dpdk-dev] [PATCH] ethdev: missing typecast from void in eth_dev_pci_specific_init 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" Message-ID: <20190410210018.hI7w0bQl3YXIY73ZIg3uRTQOUogNYUk-9BEMWR-2CN4@z> On Wed, Apr 10, 2019 at 03:16:16PM -0500, David Christensen wrote: > The function eth_dev_pci_specific_init is missing a typecast to > (struct rte_pci_device *) for the input argument bus_device. > > Cc: stable@dpdk.org > > Signed-off-by: David Christensen > Tested-by: Radhika Chirra > --- > lib/librte_ethdev/rte_ethdev_pci.h | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/lib/librte_ethdev/rte_ethdev_pci.h b/lib/librte_ethdev/rte_ethdev_pci.h > index 23257e9..a325311 100644 > --- a/lib/librte_ethdev/rte_ethdev_pci.h > +++ b/lib/librte_ethdev/rte_ethdev_pci.h > @@ -72,7 +72,7 @@ > > 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; > + struct rte_pci_device *pci_dev = (struct rte_pci_device *)bus_device; > Is this needed for building some C++ apps that are including the header file (directly, or indirectly), because for pure C, "void *" types should be assignable to any other pointer type without casting? /Bruce