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 6570DA0096 for ; Wed, 10 Apr 2019 04:41:51 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id EF60B58FE; Wed, 10 Apr 2019 04:41:49 +0200 (CEST) Received: from mail-pl1-f174.google.com (mail-pl1-f174.google.com [209.85.214.174]) by dpdk.org (Postfix) with ESMTP id DE0D83772 for ; Wed, 10 Apr 2019 04:41:47 +0200 (CEST) Received: by mail-pl1-f174.google.com with SMTP id y6so399911pll.13 for ; Tue, 09 Apr 2019 19:41:47 -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=mUPwi/zEPh4aHWdKEVHnbBx0eQ7aCslVSppe4UCwxuY=; b=KN89qVtwpnKM9TGgLR7icza+b6i3OoR0OUoAaNgOAHRFHrPTyVtg9hOtzt88sHjJ5Z ffGkjc4gzRgdk3JsECdFCqqyNkFZpXDCJTZBl+abes+ceYmTtohuhBNazOqX0007oljd 5zs6p0sAeF85E7+j5yQpRxFTSDZgFyfZrHMGiwK0u8VGMBIXSvHTpPNmFhsZvmWnrtBb VtDk5TfUWMo/KkaA9ExB6Y+7Mi3GfbdqzjB/SJayCyuM59dDWU9fstZHyAbFm6oAcJ+e v+8EVhM7g5UTKCENYamgQAHTILf4KcQZFh3UsAxxH3l+SwF3hZYXQ72O2S/373yebTAd YowQ== 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=mUPwi/zEPh4aHWdKEVHnbBx0eQ7aCslVSppe4UCwxuY=; b=Ae7tJ+zXLN2ZABG+zKT7Bs1/DiBZr9z9h9rDfloVVfZPPAK8Cvhu5H7RiTLf3LBjNE QEEWs+MyrV/03xiWHBF+0Eq3QJ9pDJwH8aKonYoR8iSHJ8XzSgq2Gp81Dzj8zNc7/EW4 Er257TWS+4+om1osXxDGU+S/L7Rs42uFvhVs9vGRO7vh+bwLYmwvOdYDlEsdy5hWn/K2 rECjvxIcgen0O07AhrKg6jAzYRaAdKPC1kHobtXDI7G/Q4tPzgFu5kVFS6nGOuUp5DV/ XgdiisTmvD8QnWhoyxPD8SATmHuKyCKOfI492HEqcFp2MSrAO9o6jIOzI0JjFeCEl/gW xihQ== X-Gm-Message-State: APjAAAXDTwJOXDhYzLJ/ysg+L1sDbNvPhpl9srAUVtg+wDv8VIJGvuDx VkoNnD8ILo9xEQtuiQTyluslpw== X-Google-Smtp-Source: APXvYqw82xYBtjcod5OGc8guNahtTSlrYFBrBbwh9fovwAGiMv4UZagXAGVRH3VsUA8tO03Junql4w== X-Received: by 2002:a17:902:781:: with SMTP id 1mr40422844plj.300.1554864106707; Tue, 09 Apr 2019 19:41:46 -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 17sm79567365pfw.65.2019.04.09.19.41.46 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Tue, 09 Apr 2019 19:41:46 -0700 (PDT) Date: Tue, 9 Apr 2019 19:41:43 -0700 From: Stephen Hemminger To: Thomas Monjalon Cc: vivkong@ca.ibm.com, dev@dpdk.org Message-ID: <20190409194143.1cbee518@shemminger-XPS-13-9360> In-Reply-To: <3802339.Lkezi3CoX2@xps> References: <20190409190630.31975-1-vivkong@ca.ibm.com> <20190409190630.31975-11-vivkong@ca.ibm.com> <3802339.Lkezi3CoX2@xps> MIME-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit Subject: Re: [dpdk-dev] [RFC 10/12] ethdev: add cast for bus_device 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: <20190410024143.xX9TVgBvRhGyZiB3FmQ7BFB6DkBM2RNOqe31FbZz6FM@z> On Tue, 09 Apr 2019 22:14:08 +0200 Thomas Monjalon wrote: > 09/04/2019 21:06, Vivian Kong: > > Signed-off-by: Vivian Kong > > --- > > 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; > > Why do we need such cast? > > I agree with Thomas, we try to avoid extra casts and there is even a script to find them.