From mboxrd@z Thu Jan  1 00:00:00 1970
Return-Path: <stephen@networkplumber.org>
Received: from mail-pg1-f195.google.com (mail-pg1-f195.google.com
 [209.85.215.195]) by dpdk.org (Postfix) with ESMTP id 1946E58FE
 for <dev@dpdk.org>; Thu, 11 Apr 2019 01:08:24 +0200 (CEST)
Received: by mail-pg1-f195.google.com with SMTP id f6so2428649pgs.8
 for <dev@dpdk.org>; Wed, 10 Apr 2019 16:08:23 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=networkplumber-org.20150623.gappssmtp.com; s=20150623;
 h=date:from:to:cc:subject:message-id:in-reply-to:references
 :mime-version:content-transfer-encoding;
 bh=qsl2X3zxgfntbmZz8oeUPKaCl1qURCbmz0V0b6TF6hA=;
 b=vcilKW3vFi1kZAT8C+vhANPDU8vE7Sj8ZJgw2mBO48zpeONGuL+L49/Jw5/ge1VsrZ
 d/b2SmjutNe2OhfVoUISj7TtkfVIIbwzl/VECLDDF0e/cv3DZ/d46HQC6UcuACNlNhLk
 2scKIyDi6TKMN3BOJnMPtXc8zlndDqVs5esLmvfTA/+9Qgai/gdycEx1vM7I1cL0blMz
 tihLqSsWRfv3l45sNWZbuob9JqMZmuqEVB5DG1iolqR5PvtAKf+HFvRqvGSO9riVFQaR
 MOed+NcXDy1XgL8TH6yIqk1SzF9QpQkJvG4KoH29oH9gPPUYSdu/y/fHFn7+rhFH5nbX
 ak6g==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20161025;
 h=x-gm-message-state:date:from:to:cc:subject:message-id:in-reply-to
 :references:mime-version:content-transfer-encoding;
 bh=qsl2X3zxgfntbmZz8oeUPKaCl1qURCbmz0V0b6TF6hA=;
 b=YDG+Gwfw4uqsGhKavqSFMTwNBaxrPYYgPhxr/2j1kLD1u29YoVMvcixY/gOKZA+9lA
 MjB/fd+d8SEGtkosz+7RdXeYfeU1HNAP6JnQQ9LORybv1KuOS+DnqVXXXNhL/1/X4DWP
 vuni+37FjE+0epv9VI/b6KlxHHEEqMsxpqP0m74BDlw95co09fAnDaqUUKcf5KEfG7sb
 sWl87NvLDrKqpjpT8VAdzTh3b8/DOxD3QsW6jEe9N56O8OsHasDNYhc6xeMNplqgoPTt
 61/5WJqoxTl/BIiqkNEy7DeVTowaVwtzI7ZAFQJuHkX+JLlqkpxfaYWVk9ff/kokx5OQ
 07wg==
X-Gm-Message-State: APjAAAVgdTztV3/5bxvbvkrmgGlAWrDfaM9ijSlIUB4vkUacYy9sqeUA
 VuyPDRBz9/UYqwSQE4U5X+z5ww==
X-Google-Smtp-Source: APXvYqxaP3lhoYVCO3Za4WVZ6KH0a9HWljDKs/1dVDdQnoTUzPqXwcATIaOoiqNjl3+eKvQFJoDp9w==
X-Received: by 2002:aa7:864a:: with SMTP id a10mr46436200pfo.181.1554937702461; 
 Wed, 10 Apr 2019 16:08:22 -0700 (PDT)
Received: from shemminger-XPS-13-9360 (204-195-22-127.wavecable.com.
 [204.195.22.127])
 by smtp.gmail.com with ESMTPSA id p66sm49295356pfb.4.2019.04.10.16.08.21
 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256);
 Wed, 10 Apr 2019 16:08:22 -0700 (PDT)
Date: Wed, 10 Apr 2019 16:08:17 -0700
From: Stephen Hemminger <stephen@networkplumber.org>
To: Bruce Richardson <bruce.richardson@intel.com>
Cc: David Christensen <drc@linux.vnet.ibm.com>, thomas@monjalon.net,
 ferruh.yigit@intel.com, arybchenko@solarflare.com, dev@dpdk.org,
 radhika.chirra@ibm.com, stable@dpdk.org
Message-ID: <20190410160818.78855564@shemminger-XPS-13-9360>
In-Reply-To: <20190410210017.GA742@bricha3-MOBL.ger.corp.intel.com>
References: <1554927376-93022-1-git-send-email-drc@linux.vnet.ibm.com>
 <20190410210017.GA742@bricha3-MOBL.ger.corp.intel.com>
MIME-Version: 1.0
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: 7bit
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 <dev.dpdk.org>
List-Unsubscribe: <https://mails.dpdk.org/options/dev>,
 <mailto:dev-request@dpdk.org?subject=unsubscribe>
List-Archive: <http://mails.dpdk.org/archives/dev/>
List-Post: <mailto:dev@dpdk.org>
List-Help: <mailto:dev-request@dpdk.org?subject=help>
List-Subscribe: <https://mails.dpdk.org/listinfo/dev>,
 <mailto:dev-request@dpdk.org?subject=subscribe>
X-List-Received-Date: Wed, 10 Apr 2019 23:08:24 -0000

On Wed, 10 Apr 2019 22:00:18 +0100
Bruce Richardson <bruce.richardson@intel.com> wrote:

> 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 <drc@linux.vnet.ibm.com>
> > Tested-by: Radhika Chirra <radhika.chirra@ibm.com>
> > ---
> >  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

Another example of Why the Hell is this inline?

From mboxrd@z Thu Jan  1 00:00:00 1970
Return-Path: <dev-bounces@dpdk.org>
Received: from dpdk.org (dpdk.org [92.243.14.124])
	by dpdk.space (Postfix) with ESMTP id 8B99CA0096
	for <public@inbox.dpdk.org>; Thu, 11 Apr 2019 01:08:27 +0200 (CEST)
Received: from [92.243.14.124] (localhost [127.0.0.1])
	by dpdk.org (Postfix) with ESMTP id E1FB35B40;
	Thu, 11 Apr 2019 01:08:25 +0200 (CEST)
Received: from mail-pg1-f195.google.com (mail-pg1-f195.google.com
 [209.85.215.195]) by dpdk.org (Postfix) with ESMTP id 1946E58FE
 for <dev@dpdk.org>; Thu, 11 Apr 2019 01:08:24 +0200 (CEST)
Received: by mail-pg1-f195.google.com with SMTP id f6so2428649pgs.8
 for <dev@dpdk.org>; Wed, 10 Apr 2019 16:08:23 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=networkplumber-org.20150623.gappssmtp.com; s=20150623;
 h=date:from:to:cc:subject:message-id:in-reply-to:references
 :mime-version:content-transfer-encoding;
 bh=qsl2X3zxgfntbmZz8oeUPKaCl1qURCbmz0V0b6TF6hA=;
 b=vcilKW3vFi1kZAT8C+vhANPDU8vE7Sj8ZJgw2mBO48zpeONGuL+L49/Jw5/ge1VsrZ
 d/b2SmjutNe2OhfVoUISj7TtkfVIIbwzl/VECLDDF0e/cv3DZ/d46HQC6UcuACNlNhLk
 2scKIyDi6TKMN3BOJnMPtXc8zlndDqVs5esLmvfTA/+9Qgai/gdycEx1vM7I1cL0blMz
 tihLqSsWRfv3l45sNWZbuob9JqMZmuqEVB5DG1iolqR5PvtAKf+HFvRqvGSO9riVFQaR
 MOed+NcXDy1XgL8TH6yIqk1SzF9QpQkJvG4KoH29oH9gPPUYSdu/y/fHFn7+rhFH5nbX
 ak6g==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20161025;
 h=x-gm-message-state:date:from:to:cc:subject:message-id:in-reply-to
 :references:mime-version:content-transfer-encoding;
 bh=qsl2X3zxgfntbmZz8oeUPKaCl1qURCbmz0V0b6TF6hA=;
 b=YDG+Gwfw4uqsGhKavqSFMTwNBaxrPYYgPhxr/2j1kLD1u29YoVMvcixY/gOKZA+9lA
 MjB/fd+d8SEGtkosz+7RdXeYfeU1HNAP6JnQQ9LORybv1KuOS+DnqVXXXNhL/1/X4DWP
 vuni+37FjE+0epv9VI/b6KlxHHEEqMsxpqP0m74BDlw95co09fAnDaqUUKcf5KEfG7sb
 sWl87NvLDrKqpjpT8VAdzTh3b8/DOxD3QsW6jEe9N56O8OsHasDNYhc6xeMNplqgoPTt
 61/5WJqoxTl/BIiqkNEy7DeVTowaVwtzI7ZAFQJuHkX+JLlqkpxfaYWVk9ff/kokx5OQ
 07wg==
X-Gm-Message-State: APjAAAVgdTztV3/5bxvbvkrmgGlAWrDfaM9ijSlIUB4vkUacYy9sqeUA
 VuyPDRBz9/UYqwSQE4U5X+z5ww==
X-Google-Smtp-Source: APXvYqxaP3lhoYVCO3Za4WVZ6KH0a9HWljDKs/1dVDdQnoTUzPqXwcATIaOoiqNjl3+eKvQFJoDp9w==
X-Received: by 2002:aa7:864a:: with SMTP id a10mr46436200pfo.181.1554937702461; 
 Wed, 10 Apr 2019 16:08:22 -0700 (PDT)
Received: from shemminger-XPS-13-9360 (204-195-22-127.wavecable.com.
 [204.195.22.127])
 by smtp.gmail.com with ESMTPSA id p66sm49295356pfb.4.2019.04.10.16.08.21
 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256);
 Wed, 10 Apr 2019 16:08:22 -0700 (PDT)
Date: Wed, 10 Apr 2019 16:08:17 -0700
From: Stephen Hemminger <stephen@networkplumber.org>
To: Bruce Richardson <bruce.richardson@intel.com>
Cc: David Christensen <drc@linux.vnet.ibm.com>, thomas@monjalon.net,
 ferruh.yigit@intel.com, arybchenko@solarflare.com, dev@dpdk.org,
 radhika.chirra@ibm.com, stable@dpdk.org
Message-ID: <20190410160818.78855564@shemminger-XPS-13-9360>
In-Reply-To: <20190410210017.GA742@bricha3-MOBL.ger.corp.intel.com>
References: <1554927376-93022-1-git-send-email-drc@linux.vnet.ibm.com>
 <20190410210017.GA742@bricha3-MOBL.ger.corp.intel.com>
MIME-Version: 1.0
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: 7bit
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 <dev.dpdk.org>
List-Unsubscribe: <https://mails.dpdk.org/options/dev>,
 <mailto:dev-request@dpdk.org?subject=unsubscribe>
List-Archive: <http://mails.dpdk.org/archives/dev/>
List-Post: <mailto:dev@dpdk.org>
List-Help: <mailto:dev-request@dpdk.org?subject=help>
List-Subscribe: <https://mails.dpdk.org/listinfo/dev>,
 <mailto:dev-request@dpdk.org?subject=subscribe>
Errors-To: dev-bounces@dpdk.org
Sender: "dev" <dev-bounces@dpdk.org>
Message-ID: <20190410230817.QVN043udX4HXvUJuoyE9BDw69wnW6kmIDrusFMBKrpU@z>

On Wed, 10 Apr 2019 22:00:18 +0100
Bruce Richardson <bruce.richardson@intel.com> wrote:

> 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 <drc@linux.vnet.ibm.com>
> > Tested-by: Radhika Chirra <radhika.chirra@ibm.com>
> > ---
> >  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

Another example of Why the Hell is this inline?