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 735A9A00C5; Wed, 16 Feb 2022 11:32:58 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 20071410FF; Wed, 16 Feb 2022 11:32:58 +0100 (CET) Received: from mga07.intel.com (mga07.intel.com [134.134.136.100]) by mails.dpdk.org (Postfix) with ESMTP id 7E03B410FB for ; Wed, 16 Feb 2022 11:32:56 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1645007576; x=1676543576; h=message-id:date:to:cc:references:from:subject: in-reply-to:content-transfer-encoding:mime-version; bh=rvA2+ubMZ2wkDkZAheuCeG87VLfziqONdzYrkbxwSzM=; b=P3XoiiwA6shv/eRmAoetRPQ4OqWamsfxVvOzophjAQxqKJ2EAOyGiHZ1 KoEUTmYrEzwoqG6qcQpUnoxjYLZC4/E78tot/wvyHsvVwQn0dyX8RzVFx 7ZMr3cV1oUorAUxDvlzj4/MtjQOvOUQb1NrVeUt2I7TfFo7u1tT4AIFI6 t7FAeuXhJYLkigH9QSRefvEXnG0huIMi7owN/kuA2UA/4cyYjdk2AKUCT pxrEVn/blKyDF6WS8VBOS00RAgO4LAe5Oh4rdCVX+UT3ph490vjPWCdX2 tl6K9XY28lFQEZyuwvg2fc9FZR0TMotyceoGvFbm9Va5cxXncfdSNrx7e g==; X-IronPort-AV: E=McAfee;i="6200,9189,10259"; a="313849066" X-IronPort-AV: E=Sophos;i="5.88,373,1635231600"; d="scan'208";a="313849066" Received: from orsmga002.jf.intel.com ([10.7.209.21]) by orsmga105.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 16 Feb 2022 02:32:54 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.88,373,1635231600"; d="scan'208";a="502968474" Received: from fmsmsx602.amr.corp.intel.com ([10.18.126.82]) by orsmga002.jf.intel.com with ESMTP; 16 Feb 2022 02:32:54 -0800 Received: from fmsmsx611.amr.corp.intel.com (10.18.126.91) by fmsmsx602.amr.corp.intel.com (10.18.126.82) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2308.20; Wed, 16 Feb 2022 02:32:53 -0800 Received: from fmsedg602.ED.cps.intel.com (10.1.192.136) by fmsmsx611.amr.corp.intel.com (10.18.126.91) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2308.20 via Frontend Transport; Wed, 16 Feb 2022 02:32:53 -0800 Received: from NAM02-DM3-obe.outbound.protection.outlook.com (104.47.56.43) by edgegateway.intel.com (192.55.55.71) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2308.20; Wed, 16 Feb 2022 02:32:52 -0800 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=EnkpQdsLtStLf5hFyz4hJydnrj8LfGfugFhr2EyLkn4fenZzWVi2ST9GkxQvJsYIap8ShAFNAxx4J+QzylABSZUlXUfbs83XCBoCXDY53Dfk8WxeYSynQ5dFySb+mCIKXEM4ySb0N7f/eu7CXIx2OAEYWj0Rg74tMF4Ars4TTWzL64+ON19NPFr3qvf3Pcr1XmoHdWu7T2aWbSHAeFcBOnTPsLSyJoUaoDKAzLhw1NmALZy/rECP02NmzIplzSYGNsQL8bcUfbKLsvL0qh/LSOSuI4f9dRUDBHKCW6Q//szZmQ4fwbXL6m2uLHXalcBx05bPFrlnbKXhtmLdd2EUjw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=Fcqa6UNf7/tNill/+aYvezPTmLtXx0CIKC1iAyqdq3c=; b=PdgLtroteXOdk/GoGmERuGoLSo2r2C1NuTHV1QeNJU9v1/xJtijKwH4SsLASLae0Yu88vecddoNjFW1rztUk/JHETBW7ts8c1e4ro7LpoHhpavG3A+7rtTZTS+QxnibaTVVqbdvPkydzbVOmYrN8eLPz9bHFdKDdaZC9/bSyv7eQ/JuXDt/PmGPrAjPZJGwT7J1ZZLpNzIuqTL7fae4to/ma6vWnSNWYAnNA8mAPQwyB97Ink1zdiobIS46aaAwJZQnVUQawbkZLYqEde/sc712ZHbDDBi6d2Zjsi2XywptGywnxqPwl4wIV/pMn89MqigGo/wGNDfwXGrfn0Op/Lw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=none; dmarc=none; dkim=none; arc=none Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=intel.com; Received: from PH0PR11MB5000.namprd11.prod.outlook.com (2603:10b6:510:41::19) by MN2PR11MB4176.namprd11.prod.outlook.com (2603:10b6:208:13b::26) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4975.17; Wed, 16 Feb 2022 10:32:49 +0000 Received: from PH0PR11MB5000.namprd11.prod.outlook.com ([fe80::98be:5506:5020:28a2]) by PH0PR11MB5000.namprd11.prod.outlook.com ([fe80::98be:5506:5020:28a2%4]) with mapi id 15.20.4995.016; Wed, 16 Feb 2022 10:32:49 +0000 Message-ID: <69adf34b-6914-8b54-b35b-c968d72a1b33@intel.com> Date: Wed, 16 Feb 2022 10:32:43 +0000 Content-Language: en-US To: Bruce Richardson , CC: Thomas Monjalon , Andrew Rybchenko , Stephen Hemminger References: <20220215173029.1893710-1-bruce.richardson@intel.com> <20220215173029.1893710-2-bruce.richardson@intel.com> From: Ferruh Yigit Subject: Re: [PATCH 1/3] ethdev: fix missing cast for C++ compatibility X-User: ferruhy In-Reply-To: <20220215173029.1893710-2-bruce.richardson@intel.com> Content-Type: text/plain; charset="UTF-8"; format=flowed Content-Transfer-Encoding: 7bit X-ClientProxiedBy: LO2P265CA0190.GBRP265.PROD.OUTLOOK.COM (2603:10a6:600:a::34) To PH0PR11MB5000.namprd11.prod.outlook.com (2603:10b6:510:41::19) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 3f58a301-bcf0-4bef-8e50-08d9f137adc6 X-MS-TrafficTypeDiagnostic: MN2PR11MB4176:EE_ X-LD-Processed: 46c98d88-e344-4ed4-8496-4ed7712e255d,ExtAddr X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:7691; X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: Pvy2UKlG+e/iag2jkOwcakTasFOGJ4VWqD62xTBz26r2O05pwZc6XwOXnIrMyg5X4HKIt04T/Q32/r1/u+kE8RTYmvworvl7Mdmxfb+f0Jwp7DdmmblmTxxiHe/vNCgYVzJpyT7PxPL8pRw1tItX74xr+5UXLveWI+jQ4YWa5KfQW+2m7G4122aFPlvIpDN4kRa32DatYLMPEVTuDX1KGlQvymMcesnPuLSS9V4KdpZcjynIt14D1yj0k5Y+esLPV7CJLtjo76ewMUv5GMWYBvuJntkRVlQT4x4qqeXMtPcdA6x8qkyOx47ncQ9MZlQBWp7zSpiNq/Qm/ha4gEzRF8bIUah8lSdOwOTu4T+dswwM9K+c1k74F0om+q6zkib2KQHbAObMS/ZV5Syi+76X4SFREyBTPbTgZ9TyWfQrTGPjhTTFMxX0prTKdF6ybOamY00aLed6CQNjGXgLBU2fTaAFbyPR2VggGRuS7+jqKQf06OI3rc7aNW6ddQGgbKD3KeCGNySc8PKVJRbNBHz8l7Jg1ybqB3hU6xGfLMASadLzGcB0JIaTv6jkOpUcDR/Jkld2M9XTHkS2GJ3D91X/VrSdN05Usp7vQPxbCX6hqruX3MlIH7rMouAnaZfu/RuWUIt4jYC9iNhfIT9d4GiSrgfGKCa2St5+OzNt3gUH/iv5yPLq7PWx0oaPJ3sLD4qsvBPi25N4bKlwUMbkNfGO+A== X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:PH0PR11MB5000.namprd11.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230001)(366004)(83380400001)(8936002)(2906002)(6666004)(31686004)(44832011)(316002)(54906003)(5660300002)(36756003)(2616005)(508600001)(6506007)(6486002)(66946007)(6512007)(26005)(186003)(4326008)(66556008)(31696002)(8676002)(66476007)(86362001)(38100700002)(53546011)(82960400001)(45980500001); DIR:OUT; SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?B?MktyZGZIL1lJclM0di80S1dIU1FSTnVXWnRleFZINzR1ZWN6RzQ5aDh0LzVi?= =?utf-8?B?SUtCd1pUSTFJVmtwSUpHUnA3MWJvMGxJRTBZQkpoODl5OW11YWtGYzVSdHNT?= =?utf-8?B?NksrZDcxaVNzR3l0NGp3MnM3ay9uTVhKb2l6amZzOWk1YjVZbFQ2K3VZM0pn?= =?utf-8?B?OTlwRDQvMExsYlh1b1BxVzRIbG1ubHB1WXhha1pvYjB0ZXFXWXVkb3Q5anFs?= =?utf-8?B?dmZFNXVsa0Z6RW93ZXFLdlRrMmNud2hHZE81YzZxZWpRVFlsQnAwQ0s3cnkr?= =?utf-8?B?a3BpK3MraDJVK3AzdkEveW4wY3pjMmNHRG5rWmVUbTh2RCtHV0l1UjcyNkFD?= =?utf-8?B?eEw5RzZIY1JkNnZSM0JKNmRYWFc2M2ZTd1pLUDdVaTJtWklkVjd4RmFINU9u?= =?utf-8?B?czN0NEZWenl4ZHdKdDhWK2M2bHRQT1J1UUtiS3R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bcf0-4bef-8e50-08d9f137adc6 X-MS-Exchange-CrossTenant-AuthSource: PH0PR11MB5000.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 16 Feb 2022 10:32:49.3726 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 46c98d88-e344-4ed4-8496-4ed7712e255d X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: pLNL3IJ7HspReV6cdsALVIF2z58lThY+wDP9oORZJavZ2F1DIf3M+c/hPli3vzunjLOhigOf1CfweaRt+jewAA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: MN2PR11MB4176 X-OriginatorOrg: intel.com 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 On 2/15/2022 5:30 PM, Bruce Richardson wrote: > 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. > I remember patches removing explicit "void *" cast, in the past, to document, is the rule as following: - public and sdk headers should support c++, hence these files must have explicit "void *" cast - .c files should NOT have explicit "void *" cast > 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;