From patchwork Wed Nov 2 14:10:08 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Frank Li X-Patchwork-Id: 13028167 X-Patchwork-Delegate: lorenzo.pieralisi@arm.com Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 238D7C433FE for ; Wed, 2 Nov 2022 14:10:47 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230256AbiKBOKp (ORCPT ); Wed, 2 Nov 2022 10:10:45 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34822 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231364AbiKBOKn (ORCPT ); Wed, 2 Nov 2022 10:10:43 -0400 Received: from EUR05-VI1-obe.outbound.protection.outlook.com (mail-vi1eur05on2085.outbound.protection.outlook.com [40.107.21.85]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D94251EED6; Wed, 2 Nov 2022 07:10:39 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=WD/CAI15drUeA3+Lc09fRoQFWkhX8egZen67nrwmVKYuVpiZPUYaIfzN5K/atxlOep55Qri6xntkOYdw1WdiKMhOQSWtH9jXN1hWgRH8ZvHC5QeaBpjSVZ4mN8bvHqvwwcmyjkCJy+yWyCdulyQ8whsxqSraOPHOo9Ckgs2p8B8K284AcElt01C4TxHwP15QOMcs3RRU9zsNn3CXVDzuDhlwU3mFwxhqfKhtV05BiCRP1fYxiWquHkBcMgQnkZES9iAm5nlBqKkwtbrIrbv/9kayBHWs7heeHYu7llxA4xKP7TcSriFFJ0qFYDuT3R/FNK0FBdpLjEcXtYAvwvBeZA== 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=+crJ9i3nm+wkdGC5mvPCy8uw2cmvfs1NDX++obGypGU=; b=QCys+OuniUQrv1l3DWElXfIExRBuiFiEsVsxzRuJv/0TT0bPtZRwsRWD+iZI8NlUZfNX0sW48bNl2nNY+/j1lEsD53tV4piBN6cXek2+3pU0xKIpzKH90AiFDG9JdGyH8aZNLLH6Y2DJ0lokzk7U+pLOz8FUGpu0hk7jpJp5FCGcc4H5jaZQaMQQM3VXc+YIIS5AROt5fRlPHh5lfrUcUqSPxoPI1uB8zhycAcJbhuArbegWQqHFnyvjGHotDosmgJYDbTM4n1mLsyfcCzqhn6uYboZbBv7r0kspcnZtzRyZA53fbWjytz7MxR9Gywrf5ZHJXVdHzoz5YO3khuGVYA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=nxp.com; dmarc=pass action=none header.from=nxp.com; dkim=pass header.d=nxp.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nxp.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=+crJ9i3nm+wkdGC5mvPCy8uw2cmvfs1NDX++obGypGU=; b=g24QaPeG82ns4U0qhl/hRfysj5dqrTr+INdDS0QOaHckWdGXG9GdwbmJ0m7QDYOjlbumllBXNX7x8eNGGaBLP4YnXxytmvq+sVRr9ObqOvALSCW4wwRsq3LwOABBllz7hGasxUsvx9P6EMl5kAg9IJOsY5udT/+v6aKKDwJagBE= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=nxp.com; Received: from HE1PR0401MB2331.eurprd04.prod.outlook.com (2603:10a6:3:24::22) by DB9PR04MB8234.eurprd04.prod.outlook.com (2603:10a6:10:25d::18) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5791.20; Wed, 2 Nov 2022 14:10:37 +0000 Received: from HE1PR0401MB2331.eurprd04.prod.outlook.com ([fe80::44bb:8387:8f4b:6a28]) by HE1PR0401MB2331.eurprd04.prod.outlook.com ([fe80::44bb:8387:8f4b:6a28%11]) with mapi id 15.20.5769.021; Wed, 2 Nov 2022 14:10:37 +0000 From: Frank Li To: mani@kernel.org Cc: Frank.Li@nxp.com, allenbh@gmail.com, bhelgaas@google.com, dave.jiang@intel.com, helgaas@kernel.org, imx@lists.linux.dev, jdmason@kudzu.us, kw@linux.com, linux-kernel@vger.kernel.org, linux-pci@vger.kernel.org, lpieralisi@kernel.org, ntb@lists.linux.dev Subject: [PATCH v16 1/7] PCI: endpoint: pci-epf-vntb: clean up kernel_doc warning Date: Wed, 2 Nov 2022 10:10:08 -0400 Message-Id: <20221102141014.1025893-2-Frank.Li@nxp.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20221102141014.1025893-1-Frank.Li@nxp.com> References: <20221102141014.1025893-1-Frank.Li@nxp.com> X-ClientProxiedBy: SJ0PR05CA0210.namprd05.prod.outlook.com (2603:10b6:a03:330::35) To HE1PR0401MB2331.eurprd04.prod.outlook.com (2603:10a6:3:24::22) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: HE1PR0401MB2331:EE_|DB9PR04MB8234:EE_ X-MS-Office365-Filtering-Correlation-Id: ee054991-efb9-4a4b-70c0-08dabcdc039b X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: P+8i7mOXvv53D22r4rcZDyuV6BzbYNJvFEapufPGIuIGsbI5zoZVS0PKLCgo8PRbPFR4IZzCoI4ELUQEzxTfwsiAZKFKaf+RbKJWvWOh1D9jfjfZF7kXNmpLIl59XNBvilxodh6tv+w6Bu1mFZM6XNlBge1SNXvrsdMVzdNE4MVgpwdDzzX4aswivQfypXP8DdgyGzltWLNmqO8MBkjRuaTSu5A2Yjp0thfBEPPrxxm0/pZDrAnn2YedDjN5iLkvizmsIRWOxee9gCyoUSwoTrGYQsStVdd3U0H2JurjTl0UPSpGRltrNewGoxM3g8875VZj1U2KLzyAtcOwtTBlRTSqZBZN3VaxQ8Rr3fiXzuMSPwM959v/qgVU9Q0o6/IhJVCfLekHejfOxjT97rRoRx9aKCNs/2ReXXEDCttlV85semOXFpFdvbsJawlUpRPj0lDZFrlldYjltvad7SFNoepCywsADAKkx3jw+UchTmqWVKm/qh8QAyEcr9ZQwQZI124oT1Vh4Ux2BS5xg6ftMdgUdTaFc3WW7iY+Owtm7OHbNKuDRlFa7A+99ie/r+l2U5FrBZ18J9olI64mHsZnIDorm50zoDlk5mRstJq3dwJ01g6cDtvKrFTh3/55So5I3OEBQOKndqKTlgVFqOyrnG185mJE2pUT2w9wVbfluhgEo8fabzscYLgs87bXbyZ+cMj4hUIbMJWjAuwUCcv/W4XYMJcUnAzP2vq4O2+yNpKNLq8ImniguXlmTQMCIAx/7QcXJsXZcujFJfuM5S1VKg== X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:HE1PR0401MB2331.eurprd04.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230022)(4636009)(346002)(136003)(39860400002)(396003)(376002)(366004)(451199015)(36756003)(6916009)(6486002)(5660300002)(7416002)(83380400001)(478600001)(30864003)(2906002)(41300700001)(66556008)(316002)(8676002)(66476007)(4326008)(66946007)(8936002)(26005)(6512007)(186003)(38100700002)(2616005)(1076003)(38350700002)(86362001)(6666004)(52116002)(6506007);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: HO/5x42H3V1B4iXHPenv1mmf/s2ZiRzVYb/+pesL1wTzd48YyQ0IW+IqPRyIrlBAGwN5RXPPFNMM+HaIKf5G8BOwcCVJ80xYiYhtlc05NhcJ1ZSk3VGvME9yvzNTvHiXRAD2F3SzM7xQqk7iKp+roeFAEQvME40LXk5F/BSexAZC/ljJUqEXe9voEqAJ6zUBSXnVvxPHwTqzb537NHJ6F8mMyFAblhQ+ivUazyCAQZFQuwEjScFIqnRh8U+XgKWB41waTvdd8NkyWUrxE/GIHTKaK4aTJAvILZba+dB+qmxiUPlp+tm/HvEuXKMHMtIXkTueyI/HQi33WecJJhl8cL5ys2xVDoQrR9AR6WidGZp/Hhd+jFMo4x8qkk0N7SK8P22M+uIXZ614vOlFpZwUu5C4XOYB2M2pqRLMFdMisYpnoTAqagTXDrJH1d9RriwLC/cYyloMsZ1Sn+V0J1GCnao61B0T29rRJBs3yOK9Rs12nMYnl/htgSCDMkiMgvbMZlyTT6YVJF/d9dUTa6ahfwNyZfbhBJzCRXWLB+yiWKQywy/xFn7+eCHy1EhayO8OxXbfpfX2b+WoI6NXCOVGQaS7Nz6HoSU9HclLrFXjFvzwMmynYovzEAQjLqoh92P4v91NiByi69n1qkeA/KUR0IqyOuJ1OZrWXvH45NYzMv3QgV3xiU+BVUAOqBYZbNMx4QgXMZjOjSZeWQ2mYml+SYuomltoISfSG1NEAQMWS/qADKh5D/2QsgJNFxZUM/LodQDthu2jjwrm7AHA7B/IxYZ4l0UuEpcQn918yNT7VXD5rtU6Pe4n3wKBd0yLMZhE8fHZawbrmqSSA+So7rUb9EKJumsIS+wVMfkkaHV/wCTnaU7Rh/g9SVwS7Z1x/H2b/q8Tk1smHLuyH5v8ZqcWP6GsIOOL1Pvgst4wVyUJxx1P50gYoSJfRYfzCMh/oWLbAS2X832MRskPesU0emdZq9YVBHr9qEJUzesVd/blsPhQ7K08ewe/GiZDotDiZbiMxhjMIvDA0TZ1JBmf3+aWk4WJ7Re9lb4oH9+ZBnrEEkpDkRbAF2fjhyI5I0fQsIL9tFZxXYCz7C+C3Om+DsbStQ5N5VTbKHh3w+I13V4e6Y9Bamw16jP+Nm99kVIZI0+pPxMybsSV93pkxQwlH0bb6iz2OhI7klhyYHp3GR1AjopLcWCXEW7dwye0IndTNo/GrUHfY8cWRsYDxNrZy6yomEBQUxWOOS/6p9ES757fPQZ3y1YKNQU4hPsM4s78Ei6WSOih10wqtt1CJCjKQHHrXBFv/j7hDcv49tB0m08sMt/89wg52f/EoFKyCIUeShiT6hOxEm/z4WEwure6gBXz6v1CadvtWVanXlnw1x6nqZcGkx+Q94PWN31HkNYiEXMBxV98i0PC9F+Fq43e3CprVHDEGh8Eoiq1fveGTQaRQe7GuDzHvaQcnopfnyP4V/0OO6G04ojzPZQwGU5svGWc1hcOtEeB4fHYHmdBX6IbCOL5aGHwvMuQO3hZU6z3AUTsLMnd2ao5ArLp+jlyvmFe6UiMp7zicNYyOcWMPmZYV7sepMIlFUJ6oto//+kGnDhy X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: ee054991-efb9-4a4b-70c0-08dabcdc039b X-MS-Exchange-CrossTenant-AuthSource: HE1PR0401MB2331.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 02 Nov 2022 14:10:36.9129 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 686ea1d3-bc2b-4c6f-a92c-d99c5c301635 X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: IYpmmNpiuiYm2F1SPkZxkKxCXHB2F/DcNsqDVZidw3gM6s5Ne82yVMKTuAdEFGPfXeWAG+EAdj2yaDGwKk5eTw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB9PR04MB8234 Precedence: bulk List-ID: X-Mailing-List: linux-pci@vger.kernel.org From: Frank Li Cleanup warning found by scripts/kernel-doc Consolidate term host, host1 to HOST vhost, vHost, Vhost, VHOST2 to VHOST Acked-by: Manivannan Sadhasivam Signed-off-by: Frank Li --- drivers/pci/endpoint/functions/pci-epf-vntb.c | 83 ++++++++++++------- 1 file changed, 54 insertions(+), 29 deletions(-) diff --git a/drivers/pci/endpoint/functions/pci-epf-vntb.c b/drivers/pci/endpoint/functions/pci-epf-vntb.c index 0ea85e1d292e..c0115bcb3b5e 100644 --- a/drivers/pci/endpoint/functions/pci-epf-vntb.c +++ b/drivers/pci/endpoint/functions/pci-epf-vntb.c @@ -11,7 +11,7 @@ * Author: Kishon Vijay Abraham I */ -/** +/* * +------------+ +---------------------------------------+ * | | | | * +------------+ | +--------------+ @@ -156,12 +156,14 @@ static struct pci_epf_header epf_ntb_header = { }; /** - * epf_ntb_link_up() - Raise link_up interrupt to Virtual Host + * epf_ntb_link_up() - Raise link_up interrupt to Virtual Host (VHOST) * @ntb: NTB device that facilitates communication between HOST and VHOST * @link_up: true or false indicating Link is UP or Down * * Once NTB function in HOST invoke ntb_link_enable(), - * this NTB function driver will trigger a link event to vhost. + * this NTB function driver will trigger a link event to VHOST. + * + * Returns: Zero for success, or an error code in case of failure */ static int epf_ntb_link_up(struct epf_ntb *ntb, bool link_up) { @@ -175,9 +177,9 @@ static int epf_ntb_link_up(struct epf_ntb *ntb, bool link_up) } /** - * epf_ntb_configure_mw() - Configure the Outbound Address Space for vhost - * to access the memory window of host - * @ntb: NTB device that facilitates communication between host and vhost + * epf_ntb_configure_mw() - Configure the Outbound Address Space for VHOST + * to access the memory window of HOST + * @ntb: NTB device that facilitates communication between HOST and VHOST * @mw: Index of the memory window (either 0, 1, 2 or 3) * * EP Outbound Window @@ -194,7 +196,9 @@ static int epf_ntb_link_up(struct epf_ntb *ntb, bool link_up) * | | | | * | | | | * +--------+ +-----------+ - * VHost PCI EP + * VHOST PCI EP + * + * Returns: Zero for success, or an error code in case of failure */ static int epf_ntb_configure_mw(struct epf_ntb *ntb, u32 mw) { @@ -219,7 +223,7 @@ static int epf_ntb_configure_mw(struct epf_ntb *ntb, u32 mw) /** * epf_ntb_teardown_mw() - Teardown the configured OB ATU - * @ntb: NTB device that facilitates communication between HOST and vHOST + * @ntb: NTB device that facilitates communication between HOST and VHOST * @mw: Index of the memory window (either 0, 1, 2 or 3) * * Teardown the configured OB ATU configured in epf_ntb_configure_mw() using @@ -234,12 +238,12 @@ static void epf_ntb_teardown_mw(struct epf_ntb *ntb, u32 mw) } /** - * epf_ntb_cmd_handler() - Handle commands provided by the NTB Host + * epf_ntb_cmd_handler() - Handle commands provided by the NTB HOST * @work: work_struct for the epf_ntb_epc * * Workqueue function that gets invoked for the two epf_ntb_epc * periodically (once every 5ms) to see if it has received any commands - * from NTB host. The host can send commands to configure doorbell or + * from NTB HOST. The HOST can send commands to configure doorbell or * configure memory window or to update link status. */ static void epf_ntb_cmd_handler(struct work_struct *work) @@ -321,8 +325,8 @@ static void epf_ntb_cmd_handler(struct work_struct *work) /** * epf_ntb_config_sspad_bar_clear() - Clear Config + Self scratchpad BAR - * @ntb_epc: EPC associated with one of the HOST which holds peer's outbound - * address. + * @ntb: EPC associated with one of the HOST which holds peer's outbound + * address. * * Clear BAR0 of EP CONTROLLER 1 which contains the HOST1's config and * self scratchpad region (removes inbound ATU configuration). While BAR0 is @@ -331,8 +335,10 @@ static void epf_ntb_cmd_handler(struct work_struct *work) * used for self scratchpad from epf_ntb_bar[BAR_CONFIG]. * * Please note the self scratchpad region and config region is combined to - * a single region and mapped using the same BAR. Also note HOST2's peer - * scratchpad is HOST1's self scratchpad. + * a single region and mapped using the same BAR. Also note VHOST's peer + * scratchpad is HOST's self scratchpad. + * + * Returns: void */ static void epf_ntb_config_sspad_bar_clear(struct epf_ntb *ntb) { @@ -347,13 +353,15 @@ static void epf_ntb_config_sspad_bar_clear(struct epf_ntb *ntb) /** * epf_ntb_config_sspad_bar_set() - Set Config + Self scratchpad BAR - * @ntb: NTB device that facilitates communication between HOST and vHOST + * @ntb: NTB device that facilitates communication between HOST and VHOST * - * Map BAR0 of EP CONTROLLER 1 which contains the HOST1's config and + * Map BAR0 of EP CONTROLLER which contains the VHOST's config and * self scratchpad region. * * Please note the self scratchpad region and config region is combined to * a single region and mapped using the same BAR. + * + * Returns: Zero for success, or an error code in case of failure */ static int epf_ntb_config_sspad_bar_set(struct epf_ntb *ntb) { @@ -380,7 +388,7 @@ static int epf_ntb_config_sspad_bar_set(struct epf_ntb *ntb) /** * epf_ntb_config_spad_bar_free() - Free the physical memory associated with * config + scratchpad region - * @ntb: NTB device that facilitates communication between HOST and vHOST + * @ntb: NTB device that facilitates communication between HOST and VHOST */ static void epf_ntb_config_spad_bar_free(struct epf_ntb *ntb) { @@ -393,11 +401,13 @@ static void epf_ntb_config_spad_bar_free(struct epf_ntb *ntb) /** * epf_ntb_config_spad_bar_alloc() - Allocate memory for config + scratchpad * region - * @ntb: NTB device that facilitates communication between HOST1 and HOST2 + * @ntb: NTB device that facilitates communication between HOST and VHOST * * Allocate the Local Memory mentioned in the above diagram. The size of * CONFIG REGION is sizeof(struct epf_ntb_ctrl) and size of SCRATCHPAD REGION * is obtained from "spad-count" configfs entry. + * + * Returns: Zero for success, or an error code in case of failure */ static int epf_ntb_config_spad_bar_alloc(struct epf_ntb *ntb) { @@ -465,11 +475,13 @@ static int epf_ntb_config_spad_bar_alloc(struct epf_ntb *ntb) } /** - * epf_ntb_configure_interrupt() - Configure MSI/MSI-X capaiblity - * @ntb: NTB device that facilitates communication between HOST and vHOST + * epf_ntb_configure_interrupt() - Configure MSI/MSI-X capability + * @ntb: NTB device that facilitates communication between HOST and VHOST * * Configure MSI/MSI-X capability for each interface with number of * interrupts equal to "db_count" configfs entry. + * + * Returns: Zero for success, or an error code in case of failure */ static int epf_ntb_configure_interrupt(struct epf_ntb *ntb) { @@ -511,7 +523,9 @@ static int epf_ntb_configure_interrupt(struct epf_ntb *ntb) /** * epf_ntb_db_bar_init() - Configure Doorbell window BARs - * @ntb: NTB device that facilitates communication between HOST and vHOST + * @ntb: NTB device that facilitates communication between HOST and VHOST + * + * Returns: Zero for success, or an error code in case of failure */ static int epf_ntb_db_bar_init(struct epf_ntb *ntb) { @@ -566,7 +580,7 @@ static void epf_ntb_mw_bar_clear(struct epf_ntb *ntb, int num_mws); /** * epf_ntb_db_bar_clear() - Clear doorbell BAR and free memory * allocated in peer's outbound address space - * @ntb: NTB device that facilitates communication between HOST and vHOST + * @ntb: NTB device that facilitates communication between HOST and VHOST */ static void epf_ntb_db_bar_clear(struct epf_ntb *ntb) { @@ -582,8 +596,9 @@ static void epf_ntb_db_bar_clear(struct epf_ntb *ntb) /** * epf_ntb_mw_bar_init() - Configure Memory window BARs - * @ntb: NTB device that facilitates communication between HOST and vHOST + * @ntb: NTB device that facilitates communication between HOST and VHOST * + * Returns: Zero for success, or an error code in case of failure */ static int epf_ntb_mw_bar_init(struct epf_ntb *ntb) { @@ -639,7 +654,7 @@ static int epf_ntb_mw_bar_init(struct epf_ntb *ntb) /** * epf_ntb_mw_bar_clear() - Clear Memory window BARs - * @ntb: NTB device that facilitates communication between HOST and vHOST + * @ntb: NTB device that facilitates communication between HOST and VHOST */ static void epf_ntb_mw_bar_clear(struct epf_ntb *ntb, int num_mws) { @@ -662,7 +677,7 @@ static void epf_ntb_mw_bar_clear(struct epf_ntb *ntb, int num_mws) /** * epf_ntb_epc_destroy() - Cleanup NTB EPC interface - * @ntb: NTB device that facilitates communication between HOST and vHOST + * @ntb: NTB device that facilitates communication between HOST and VHOST * * Wrapper for epf_ntb_epc_destroy_interface() to cleanup all the NTB interfaces */ @@ -675,7 +690,9 @@ static void epf_ntb_epc_destroy(struct epf_ntb *ntb) /** * epf_ntb_init_epc_bar() - Identify BARs to be used for each of the NTB * constructs (scratchpad region, doorbell, memorywindow) - * @ntb: NTB device that facilitates communication between HOST and vHOST + * @ntb: NTB device that facilitates communication between HOST and VHOST + * + * Returns: Zero for success, or an error code in case of failure */ static int epf_ntb_init_epc_bar(struct epf_ntb *ntb) { @@ -716,11 +733,13 @@ static int epf_ntb_init_epc_bar(struct epf_ntb *ntb) /** * epf_ntb_epc_init() - Initialize NTB interface - * @ntb: NTB device that facilitates communication between HOST and vHOST2 + * @ntb: NTB device that facilitates communication between HOST and VHOST * * Wrapper to initialize a particular EPC interface and start the workqueue - * to check for commands from host. This function will write to the + * to check for commands from HOST. This function will write to the * EP controller HW for configuring it. + * + * Returns: Zero for success, or an error code in case of failure */ static int epf_ntb_epc_init(struct epf_ntb *ntb) { @@ -787,7 +806,7 @@ static int epf_ntb_epc_init(struct epf_ntb *ntb) /** * epf_ntb_epc_cleanup() - Cleanup all NTB interfaces - * @ntb: NTB device that facilitates communication between HOST1 and HOST2 + * @ntb: NTB device that facilitates communication between HOST and VHOST * * Wrapper to cleanup all NTB interfaces. */ @@ -951,6 +970,8 @@ static const struct config_item_type ntb_group_type = { * * Add configfs directory specific to NTB. This directory will hold * NTB specific properties like db_count, spad_count, num_mws etc., + * + * Returns: Pointer to config_group */ static struct config_group *epf_ntb_add_cfs(struct pci_epf *epf, struct config_group *group) @@ -1292,6 +1313,8 @@ static struct pci_driver vntb_pci_driver = { * Invoked when a primary interface or secondary interface is bound to EPC * device. This function will succeed only when EPC is bound to both the * interfaces. + * + * Returns: Zero for success, or an error code in case of failure */ static int epf_ntb_bind(struct pci_epf *epf) { @@ -1377,6 +1400,8 @@ static struct pci_epf_ops epf_ntb_ops = { * * Probe NTB function driver when endpoint function bus detects a NTB * endpoint function. + * + * Returns: Zero for success, or an error code in case of failure */ static int epf_ntb_probe(struct pci_epf *epf) { From patchwork Wed Nov 2 14:10:09 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Frank Li X-Patchwork-Id: 13028168 X-Patchwork-Delegate: lorenzo.pieralisi@arm.com Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 2F577C433FE for ; Wed, 2 Nov 2022 14:10:55 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231395AbiKBOKw (ORCPT ); Wed, 2 Nov 2022 10:10:52 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34912 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231384AbiKBOKr (ORCPT ); Wed, 2 Nov 2022 10:10:47 -0400 Received: from EUR05-VI1-obe.outbound.protection.outlook.com (mail-vi1eur05on2085.outbound.protection.outlook.com [40.107.21.85]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A06F423391; Wed, 2 Nov 2022 07:10:43 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=H2HnNbeVdyRHn3NhwQnj6riTC3K07F11S2Z1IJy+g9pbeV7mSnkgWTKi50aTwOSw0jDD/MDvGi4hDnF/Z/NAESmIwZiXYisDWxm2Vh/J62hwnlapkDwFUgH6o5cI0RaQ+6UNgEPt4l9kGjebgplxuP0hjJzK5eccdDbSqlX1Q2gNiSDVgLm4LgJGXCqBVh09CRZBc5c80tHAUTDKcjMR+4NoNaGM/ugDm2ezD2/5m2wesj4/fBQ6E6KZ+Jh9K1P3uxx0IHTdsXRbSCJv8RH6BSh3WvEjAZ3HB3I3LJRUtZA+ziRvwfboB1xF5g2esx/RV5qCPPYESqk2Ioq3lk2/Ow== 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=qSqxyTF416uWTAfTmzpTKKp4abZoPZOkUSlBUHn3j/M=; b=RdSu0vjCCf3QL9CDYvKSMzYkUeJQqx3I5fIy3eZCLBzW/tRd5mhz8QjeTTbR17vnoG9caNKF1wBV/URz0ASqfofp/hSHnnBP0urVaPW2+KhNKgbXhV3v9mjuu3FBPmo/ugZwvGse3URAX7GFIigTWGiiUdfFcfXO6J/d3mGXuuEsiScO7dw7v2Wz3AzHWdB5tLoKCOBr6WYlp5ctRE5bkZFmo1z2EboNPVf6PQ/UKdR0FmNjrZUUWkvkPoNO2MZP3k8c0392armO6x3RgWnx2RNi9QHazstjgOiiKHiBLrvk6d/vZJuR+58xvipKunqPsxPsgAfN7/UySO9+qY9WKQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=nxp.com; dmarc=pass action=none header.from=nxp.com; dkim=pass header.d=nxp.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nxp.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=qSqxyTF416uWTAfTmzpTKKp4abZoPZOkUSlBUHn3j/M=; b=N0lGG2WqciH387e1UglLZ8AkMSdiRNEkze5BzXKm2nVbM1sQHUK4MbTJJxP31oxc3wKwFXBDd7fp7YTeiK4WGDvtU4FtSygfR41C5Yn54ikaCntW5rvPExOTKWA06EjH/cwf6nws8yyqYH9xLfVxzl8SQPmQ7gcju9OKbYYFmAY= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=nxp.com; Received: from HE1PR0401MB2331.eurprd04.prod.outlook.com (2603:10a6:3:24::22) by DB9PR04MB8234.eurprd04.prod.outlook.com (2603:10a6:10:25d::18) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5791.20; Wed, 2 Nov 2022 14:10:40 +0000 Received: from HE1PR0401MB2331.eurprd04.prod.outlook.com ([fe80::44bb:8387:8f4b:6a28]) by HE1PR0401MB2331.eurprd04.prod.outlook.com ([fe80::44bb:8387:8f4b:6a28%11]) with mapi id 15.20.5769.021; Wed, 2 Nov 2022 14:10:40 +0000 From: Frank Li To: mani@kernel.org Cc: Frank.Li@nxp.com, allenbh@gmail.com, bhelgaas@google.com, dave.jiang@intel.com, helgaas@kernel.org, imx@lists.linux.dev, jdmason@kudzu.us, kw@linux.com, linux-kernel@vger.kernel.org, linux-pci@vger.kernel.org, lpieralisi@kernel.org, ntb@lists.linux.dev Subject: [PATCH v16 2/7] PCI: endpoint: pci-epf-vntb: fix indentation of the struct epf_ntb_ctrl Date: Wed, 2 Nov 2022 10:10:09 -0400 Message-Id: <20221102141014.1025893-3-Frank.Li@nxp.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20221102141014.1025893-1-Frank.Li@nxp.com> References: <20221102141014.1025893-1-Frank.Li@nxp.com> X-ClientProxiedBy: SJ0PR05CA0210.namprd05.prod.outlook.com (2603:10b6:a03:330::35) To HE1PR0401MB2331.eurprd04.prod.outlook.com (2603:10a6:3:24::22) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: HE1PR0401MB2331:EE_|DB9PR04MB8234:EE_ X-MS-Office365-Filtering-Correlation-Id: 83d9e597-dd10-41c1-85c8-08dabcdc05e3 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: XOuOtrU6NWAkBPQfvLvvN+giCWNqEkZl04koBjsKj7rICigsNyppAIROqLgkyYUCSSQ8ryKXBKXgRcHYbVmxU8Dq0oYLrHzqe7Dn3MXVlG9artJdFuAT8xbp89DI61wLZDy+YaNdfKKxE6zGnWUWyER1Lqq8Str8OH2NJ8xivCyFkRlJwEJ+KRnPRIVYe5CurKvr+IvFK5CgGfwGmPD7ZQjWO/5/I8lJLyLhKa5k5zcBR660/9D0LCje7/mNdzuTQLzXJUkqaiV4fpnsLn4ud2+1r8HFTFO1TL63ifW7nQSgFGgm4rQXWDKX0Zwq90Y41LR0sp2n0lg/kFLTWlHz+IF1QS6Jc5nq9We9X9FHT8+16oByiSGFBYAeXXCIjNA8TllAX+VK97YXWWGkSzDyiZ6HjjB0zsX899O9+VkFQrjcBAePkj18pbli7IOdmRvJcKWWThL0gsPOoObBAk4xr4SjTNOvNAtwHYuqNurSMZSpyMtzcSAsOzfz93WodeiUOhXLKpw1eDOWtzdVlfHzKgphZWzaCmhLkT3W+lD7Jb0ewzefbWDtw1i4oq984B93KKLbvSO7P57GAiH8w99Dcb23LwdNXHNRnx6Qz3nqc9m84EghH+jvx7Hmom7xiJtZK5N3f7hWj/81N1M3F6wU6NGl1Ln4jkTjsp6ADc/tfyC//67bpTKOBw/4qYGFjMfIFZCsnjkNs5LLJqSBgkbNVbZARNqosYsmQdkAHwVhW3ygOAaJ85bdMiGtRkfQbiSOGqh7LBKUYABPCvK0pe/0SA== X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:HE1PR0401MB2331.eurprd04.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230022)(4636009)(346002)(136003)(39860400002)(396003)(376002)(366004)(451199015)(36756003)(6916009)(6486002)(5660300002)(7416002)(83380400001)(478600001)(2906002)(41300700001)(66556008)(316002)(8676002)(66476007)(4326008)(66946007)(8936002)(26005)(6512007)(186003)(38100700002)(2616005)(1076003)(38350700002)(86362001)(6666004)(52116002)(6506007);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: F0/bgEi9ARnjqQsLuPQPKoDwwU24XqScMcJsK7VQyxN07If6uegderEZGVUa9iRKAVFKnCUs4fCRGtUXn1mxCX1LumSKNsXWxyPg2X1xEoZi36hApxZjLTb99AzL8QMj69AWkvWPlz9gLF4Rts8ylNKMcyHRvzmNNxSTB4wwPWHF6RbjvdJWeZ/pnUmoi/EhhhAfszBmKRhw3o1c85w+ogmm2F/MgbwlU4JrHwRKuDHcBViKGVleED/Qd8LkHjSM9iWKWqXi7ZtleokNEST8WNvQYtgDvnuMYTWdTSJMQNtk5k6ITq9Qc9QCmgQ+8SwR5+WtCSn2mq82bCpQa8jrHPAOR/hz4YcCt3+A50HIO9/Sk4muTD17RvdUdVdauV1Dc7DMNmgJRy9RtuqvKzRQuEAcG0eRlI0V1bsQvxaf1xEyQaKI2iLaEIEs4xtcv3AZzhaoD82lB8P97p5ounbLaN9BPUXzftcKXXLd3FdZBxNslAYFbckEoVHjKF6Ydyle21YkXkKF8lBCKWH6uDRG95rHRohmMQUjaIKVba4yxV2OXhSYHRsux/J7n4kW1q4koBssj1fCP/TCMuDQ2BxHl2hynmR9J9vuFagkHsb4/tljWYehdPkOHMT8lbV8w8epUl5SF/FeLDf51HgV6lw0jDBRj57GqvUH7zaIsUG56wPDxOtTaA3sbI2KOVuHroExQWrFGKwO2M5ZA8N745siCBNP9EWtHOUpmHB7EdnJYS06gTYrNPRtrfxYsLjMnkx9bUtm0cKtSwolsUKNNkRopsz0Xx+Vy7w4SUylwoPG4kNYRauZ0cc+SsgvHkgGTTgHgcEoFSl9ViPaJQhlKExQJ4lkjherFqQcNRvLybUuHvY4CkZ96voAhX4GYxbpRkOIc1ATG1/q27JV1yrnSzEw36Vnb48ykEZeIF5ENsUPH/DuUQguFzQy5mkHllJ3rpJ0a2jAtA4W9NWiBBymSeOKNFmE1D1EGMqkhosWF2SCyx1ZeDvIgh7x7rzUZCxRl+hCoa8XsQWU13uy9IRlbiT/ghWWuvmrVy0whkETUdakCJqjorHnJDnhtQJXYPezkRwpAWpKuVB5hV+NMWxENg/WzUob+VoUB+XwhqxCyHWlZZn6/EvaYtIihmqtV8qhDMpIvdt0iCPmQcQ150LpvR6oG7DiJTqSGicy056MqE/aPWH9hPRSjzzE3qI7+yhXW9saxNApbfrdqvkh/TNUfvCKMl9WaE4V38ow4lJokTflnZ/Pp/BMzuIfWX4qKmKeHedid5iVtIlwlv1eHTgaCzbyHShws5jKZu58GzMclIGNulrri5t3MkH90Sr+428KmKqzzsrOmipXpZsPcSPvxlrhE1GBtIZZ/2YGL6TOWlXAbRylhh7+RJGsJjwyKGctGVo7pixINl2PICCF4ROhpjHpWNNVi6EqzTptCQFxv0aLwlJaPkgwnnqJuy8Fv9W1aAPWfKj6UD7DolZUEBeN72WZCIr8W5wH3ia/OrLksIondxHhrWvJvEcjFvrbVlW4blOPXQsddBnHWPSSPs2kbOf1hldfBZlq+HGHAy1vt7abpUqf+3qEcHlRS78d4dq3vrOD X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 83d9e597-dd10-41c1-85c8-08dabcdc05e3 X-MS-Exchange-CrossTenant-AuthSource: HE1PR0401MB2331.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 02 Nov 2022 14:10:40.7407 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 686ea1d3-bc2b-4c6f-a92c-d99c5c301635 X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: l9UILFix67Q6okutsVrMzc0dDvVmAt9soAaKrGLzgQBk85+B3/+tJ0f2CVKmYgjeK05wKnPxzCUkNGDcD5M1yg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB9PR04MB8234 Precedence: bulk List-ID: X-Mailing-List: linux-pci@vger.kernel.org From: Frank Li Align the indentation of struct epf_ntb_ctrl with other structs in the driver Signed-off-by: Frank Li --- drivers/pci/endpoint/functions/pci-epf-vntb.c | 28 +++++++++---------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/drivers/pci/endpoint/functions/pci-epf-vntb.c b/drivers/pci/endpoint/functions/pci-epf-vntb.c index c0115bcb3b5e..1863006cc36c 100644 --- a/drivers/pci/endpoint/functions/pci-epf-vntb.c +++ b/drivers/pci/endpoint/functions/pci-epf-vntb.c @@ -99,20 +99,20 @@ enum epf_ntb_bar { * NTB Driver NTB Driver */ struct epf_ntb_ctrl { - u32 command; - u32 argument; - u16 command_status; - u16 link_status; - u32 topology; - u64 addr; - u64 size; - u32 num_mws; - u32 reserved; - u32 spad_offset; - u32 spad_count; - u32 db_entry_size; - u32 db_data[MAX_DB_COUNT]; - u32 db_offset[MAX_DB_COUNT]; + u32 command; + u32 argument; + u16 command_status; + u16 link_status; + u32 topology; + u64 addr; + u64 size; + u32 num_mws; + u32 reserved; + u32 spad_offset; + u32 spad_count; + u32 db_entry_size; + u32 db_data[MAX_DB_COUNT]; + u32 db_offset[MAX_DB_COUNT]; } __packed; struct epf_ntb { From patchwork Wed Nov 2 14:10:10 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Frank Li X-Patchwork-Id: 13028169 X-Patchwork-Delegate: lorenzo.pieralisi@arm.com Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 9FD58C4332F for ; Wed, 2 Nov 2022 14:11:03 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231414AbiKBOLC (ORCPT ); Wed, 2 Nov 2022 10:11:02 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35106 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231394AbiKBOKv (ORCPT ); Wed, 2 Nov 2022 10:10:51 -0400 Received: from EUR05-VI1-obe.outbound.protection.outlook.com (mail-vi1eur05on2085.outbound.protection.outlook.com [40.107.21.85]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 29F4A24BC4; Wed, 2 Nov 2022 07:10:47 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=bt3W+Yd3jr9jehiqSKHexwxkSWauA3l07Pe2+2Bz1c2drAE0i0mCrRszHCIbfvLkcRHWUkzAxlzmo1e9aYgJTki5ztJCVWLR2bkQaXsOKhPq4W/p4pmljacYQDqj/qMGF3Zmgj0GF+o6WPlgkVU8+8fa7NlhCtDUcHJMRAPkj0tFmETPApKCZt0i1itYQ06TIk9NzB+sRQeitCNh6dDuaYqpZUXD2VkeO5nn1uBUGlAqfO4BtPpNIVgS1FbTlkjlzOnuJrC3gxJp5AO0ZaTabdd99E800Bkf19A1cyTUZ+Nv81x9iC63tJFImGTA33rSyFEg6RLEsSXIyk/LQzHS4A== 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=YRK103siZ5945LFLHIFILLE1HOlBh4/xZcoINeMqjBQ=; b=nlBZvj4CyOFE4t5I5flip42mX7ppfyQHhmvixRhBQlQEzavTUGABIMJZV/2tP3aKL8V1wYNOZG6x3pe0MeWNvArj/L8wYnbex6tW+SOcoGlOZSTm10xVbNyRspGiAa/LtTpoF1VpxFkZlOkLDlNpk3LXUV7Ae9PFAppz0yfnfTwAhdkyyJKONMEiDAuqRhWgi/qx44dQ+SEgzExWbxCnzmA5C4wg4+mvs5OS0rbbREYjfYG/yudKMxZo9kLGxb2Cg8gRm9Pk8/k8LVLlhY0z0mtBSXrfk7oJWrkJA0eXoJSpciwVz3BILa4KkQZCALCiNNHFFWVBpfKkObr/V+4wcA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=nxp.com; dmarc=pass action=none header.from=nxp.com; dkim=pass header.d=nxp.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nxp.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=YRK103siZ5945LFLHIFILLE1HOlBh4/xZcoINeMqjBQ=; b=c0Gw57SO4xlemBnH7dvBDQiL6MHEU+G7/rdpT1H8mAPJVjKQBP3wr8AGbUCWo3RIKg0+glUa6/MrFQl8SZ663szW4bVTAON8YvsP31THbKOHxFTyxPmwW2ZkvAsp04j/1lIFCzNYoUzjSX/Y5p0rVPxdIpBAnfKQhrmNS3pcluo= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=nxp.com; Received: from HE1PR0401MB2331.eurprd04.prod.outlook.com (2603:10a6:3:24::22) by DB9PR04MB8234.eurprd04.prod.outlook.com (2603:10a6:10:25d::18) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5791.20; Wed, 2 Nov 2022 14:10:45 +0000 Received: from HE1PR0401MB2331.eurprd04.prod.outlook.com ([fe80::44bb:8387:8f4b:6a28]) by HE1PR0401MB2331.eurprd04.prod.outlook.com ([fe80::44bb:8387:8f4b:6a28%11]) with mapi id 15.20.5769.021; Wed, 2 Nov 2022 14:10:45 +0000 From: Frank Li To: mani@kernel.org Cc: Frank.Li@nxp.com, allenbh@gmail.com, bhelgaas@google.com, dave.jiang@intel.com, helgaas@kernel.org, imx@lists.linux.dev, jdmason@kudzu.us, kw@linux.com, linux-kernel@vger.kernel.org, linux-pci@vger.kernel.org, lpieralisi@kernel.org, ntb@lists.linux.dev Subject: [PATCH v16 3/7] PCI: endpoint: pci-epf-vntb: fix call pci_epc_mem_free_addr() at err path Date: Wed, 2 Nov 2022 10:10:10 -0400 Message-Id: <20221102141014.1025893-4-Frank.Li@nxp.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20221102141014.1025893-1-Frank.Li@nxp.com> References: <20221102141014.1025893-1-Frank.Li@nxp.com> X-ClientProxiedBy: SJ0PR05CA0210.namprd05.prod.outlook.com (2603:10b6:a03:330::35) To HE1PR0401MB2331.eurprd04.prod.outlook.com (2603:10a6:3:24::22) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: HE1PR0401MB2331:EE_|DB9PR04MB8234:EE_ X-MS-Office365-Filtering-Correlation-Id: ddff5be1-4526-4700-48ef-08dabcdc085b X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: MAR2C+s+VLMMSOkUeJ1MNeYphCuK0owRkB5dO+gN82hQgW12a91zGWFA8nHCG9NbP2w6Cd45/R5vUuNrMSvqLNpR9P5AAEw1z87Vvm2bzLEdWOuYjSQ5I6Fldj/1Y2q7pYeOhgHT6XAeklSbFT51TGl1ijaGFp9OPKATrxZDdhdoHUBgwNy1UpK20Su1KROgsGmOro1vHMaIwXfGyWVSrho080SNLy1wG/x6rR1etl/98+d06QKRU70Ah4l/7xml7fc7XDLeXx6lkNtUIMMEN/CbYQKLJ1JhwqzsQvDDGpI5MEj+YbWh8jtsvdvEYkcCbxQW7qtUS7D99j9lNcbLm6b+c51R2ZSyEDkq0+C0iaJ2ZjiUQu9yMx8kYF2G3Mg1GP2vc1DIMhnBo1oKluMnCmaT5RM3VIGsoSzygJDb1b7JSmDUWz5ek0UEjcV9TpBIaspL0+qdUvWJqa21caKg3NckaQNTkYDWdx/y5/0ZjREJ33iOa+umOfK4OOc7ppw32tYxanvDeqlMXLysom++Bllv4XEqAFBFqxxx6dOzx8g6hgYDttkN7/aYdEaoe4P+2NTp1T5Z5vmqIFdjHYnUTW8Knv6M51NritPbVD8q75kysPKNh9sRgNnGQ/bFdfV3hJkC9pG5/6PhnFP8RI6yP3GNGZkjwfxrs4WwAuqGHczxnpjWv8MHJHsPnbJS5KXVPCynVOxU9sThq8MNa8T2b4L2dlivKtpcIXNDdD8HsWh3UivpulnBTrcYVbhMhq9QmMP7Cg1lWGCyoq0/WyqbDA== X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:HE1PR0401MB2331.eurprd04.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230022)(4636009)(346002)(136003)(39860400002)(396003)(376002)(366004)(451199015)(36756003)(6916009)(6486002)(5660300002)(7416002)(83380400001)(478600001)(2906002)(41300700001)(66556008)(316002)(8676002)(66476007)(4326008)(66946007)(8936002)(26005)(6512007)(186003)(4744005)(38100700002)(2616005)(1076003)(38350700002)(86362001)(6666004)(52116002)(6506007);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: 4s/n3O+7cblwHqmrGFMtWWkhzEZrzAKpQLOYlX6GQW3WE+2ssG+WiSgDhsK54UPRxN48zs6mA2tT8UmL6nKjsw4npClvgnaDdw3JewYwyaC6sPotavd6UJiQEqeRm+JhBz3LevgLuf8IbQgwJXZlK75aEOOUrcfYPQFaOQgp1x6Oiu3WZ50gKihMSNrqnP7vgfLHlSd4RY9NUQjCOs6W7qWsjdlgVK0gbcxv4n4+L9dW6MmgfF2w7SrDGblmdKnP21dqYwp6F/pMeKlwM6RPRbSVVxrfvZV534zzBMcXFOrR6MM0EGJ3g3KMuHrtg/p2569G5flMaUXwQkr5/RU98R94D7KfASqKkyz77Ti1F4xx8lVV3iHaW3Onk3/K7yR0Xees7kQ8XsvP8podN/7ndL7AMHN0Tv9/cM3OpeM8r2xTFLyce93rfQeCPqyEtaZgzaYg8SYP6FKJAnK5tqliTuhaM8qUUv+YNz+/yD3N13Vqa4qiu1RCVnD2NlTv68TGIcjouYl/i5yPsQA3TPQ371aXttwf1O+jppJE/A2V4n5DmyB2mHbgWw9YxNQrLHcpIB/nrOmWNDutlAaOAWbmnWyUfnxjgBfe31LRG/tNOZDV4z38ofLDjEnui/4wc8azPYzCzEZv4KW1pct0X/AAY/pV8otqqSbTkxMI8hJ8pg9Yhv8mZb66XX66V+f/zVwGVI5LU/es9ccVFKGnt54FKXmBN3Bp99A5rypMQD4zCPbbb1lJ7D37iaugagSeTgFqoijObLYOTgUGokGtGrRWuIXjhrU+03lRKqIPRFXtKMzoeIM8i+9yJTlVeYpvpI7u7WaE7nu+Z/ajCbMT0XlJw5176G8gX/gDXsSlO+fJuE6Xd//fUcVB6zdn3ku3gzC61hwC7uZHobLg1cS7K4xdCXuntu77mVZRrOjrGVK62gyG8+ffRJjr7zJn+rXcNxLFRNZiThDOPmSFNP8SNgnMCecR/VXs1U76mtzbBZ6wo4PImnV0FAHlgyGEXciNBocE+m2JeCreHhQSKrmrSKzH0TpWUDJe9aPK5ILlEGL7cIEFm67PHDJnA32WY+fkFrdSGnQOP7ak9CupHd0PbXeRTxPP2c9cf6FfrEOfEWBGzdoac0kLqgpa0TcxP4YVRkeLdttZGJzgrR45/4DsoXVvVB1Cdu3gPPSozjrejrQjD250aa/hlG5nllCCcKgG644oZ3wgAh32m2aD8ljykHEYf+2UKkGoyg5uQYR8RpmbyRrtWrRmd8f09Y7NZAF99cDZggePqFLs3SYw/V/NtJSIrve+rY/x5dnvYZUoEq7UVyYJ0hy0G8vyq1T8XNfU8ff5Zu5p+u7pvolRyESLprQkGTP59cmwF/X8TVoKqF55cs0ROSM8L2Sr/pmwgcmacN9Vc4DBq9+FW+UKs8mMGiuefgU8hlKiHPHOeI9SHQMaQ3EChKhpkYDCbRzb6kbuwh3+vmAjq3+pAlDAVkLv/bYX61dz/mewr08q6JTOOUeYM19n3jEiSHLZY20lfN+2gvoqdDYl0GykJQzU/bT6H432XhyH9efgy7aVX7U5PoLBjncMsM9QWf1+1noIxPBfUO+h X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: ddff5be1-4526-4700-48ef-08dabcdc085b X-MS-Exchange-CrossTenant-AuthSource: HE1PR0401MB2331.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 02 Nov 2022 14:10:44.8654 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 686ea1d3-bc2b-4c6f-a92c-d99c5c301635 X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: ZhCXwUja6kcKqUwIxFuOmbd3NrnjQAg6j0vfIO80iRsJJwqGdxOmRnyn/BUQ80vqFB4goFisW3hsf5wic/Ph3w== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB9PR04MB8234 Precedence: bulk List-ID: X-Mailing-List: linux-pci@vger.kernel.org From: Frank Li Replace pci_epc_mem_free_addr() with pci_epf_free_space() at error handle path to match pci_epf_alloc_space(). Fixes: e35f56bb0330 ("PCI: endpoint: Support NTB transfer between RC and EP") Signed-off-by: Frank Li --- drivers/pci/endpoint/functions/pci-epf-vntb.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/pci/endpoint/functions/pci-epf-vntb.c b/drivers/pci/endpoint/functions/pci-epf-vntb.c index 1863006cc36c..191924a83454 100644 --- a/drivers/pci/endpoint/functions/pci-epf-vntb.c +++ b/drivers/pci/endpoint/functions/pci-epf-vntb.c @@ -571,7 +571,7 @@ static int epf_ntb_db_bar_init(struct epf_ntb *ntb) return ret; err_alloc_peer_mem: - pci_epc_mem_free_addr(ntb->epf->epc, epf_bar->phys_addr, mw_addr, epf_bar->size); + pci_epf_free_space(ntb->epf, mw_addr, barno, 0); return -1; } From patchwork Wed Nov 2 14:10:11 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Frank Li X-Patchwork-Id: 13028170 X-Patchwork-Delegate: lorenzo.pieralisi@arm.com Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id AF827C433FE for ; Wed, 2 Nov 2022 14:11:07 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231251AbiKBOLF (ORCPT ); Wed, 2 Nov 2022 10:11:05 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35530 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231411AbiKBOLC (ORCPT ); Wed, 2 Nov 2022 10:11:02 -0400 Received: from EUR05-VI1-obe.outbound.protection.outlook.com (mail-vi1eur05on2085.outbound.protection.outlook.com [40.107.21.85]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id EA0372612C; Wed, 2 Nov 2022 07:10:50 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=mGnNcw/Xi/BGXG7PCoYve9h9/T6lpA2bqcyBfqh8lpyhg+OxJ8VBnuygHXbVXbolEMZVZN3xfVbr8/HK0Qs7QRZZv4hoYbEVGfE4/aETFQ4pPm7rT3Du79sXyGEysG0PQJIL2uL5FJRWyON77HX4TQJj7A/qAumPQr0DD0zCZqFt98r9y3EBQ3BVXpyvE5pZ+qwiftH988HNJq704cQKoh0A0KuYbpYmS9dRQfPTT4aTfYP16bTlPWOXIy91i/gUqWuqcQgpeRxiozLLOquvBAvj7BPTGSMcoSVzVnFTroahi+LX/MoGj0ved8ICaUFDyZM2n1hUAkoLIgzigXNpWA== 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=Cg9Cz+TfGC5o2RUupkOOm59g23D635oht16Vk34QK4Y=; b=eGorMdLoWbHZYIH3wYHxts/LUtkIyNG+pSj10WndJRn1O2z3FyCGFx9hxBsJTC5vdX9MNfj6/9iIhfsk83pDfLiXLnWY2XzTUxrdWWmCLL8P/ZMp14mTyznBMIFw92vWr+IfVVdf3/7TlLf9ts9be+redyoFezWYucM1GP/WSy6U1wDHWTlukrLhbj9xIOrRvtxK32FhDPwn+cE8uvrYWiFFNWFI15OICphcTatvKs4ACfLLgjvaAYTbUccMrRC4VGg/p+cEhXmJY4Gu/DQmF558XkXhi/UY8sftmOFFSMSfNgGGZdwXyufbb6UU9/gdGuoJYDJQkXAWZ7rYzvTdBQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=nxp.com; dmarc=pass action=none header.from=nxp.com; dkim=pass header.d=nxp.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nxp.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=Cg9Cz+TfGC5o2RUupkOOm59g23D635oht16Vk34QK4Y=; b=UBlBrbtzMnTviAhWLZO3l7L5otv9NIeXWowO51Aze7CgWYu5TVKoCMWrjwlg19mvBR3Dmy9kU7czseNThvBSgvuTPR0S9Nqq+tE/vtLFfon5NGY1ylm0ZyDkc04uOqAsynnZsYihInm9mdfyvpFid7qgpOsrt8+xa06HpwDMGMo= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=nxp.com; Received: from HE1PR0401MB2331.eurprd04.prod.outlook.com (2603:10a6:3:24::22) by DB9PR04MB8234.eurprd04.prod.outlook.com (2603:10a6:10:25d::18) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5791.20; Wed, 2 Nov 2022 14:10:48 +0000 Received: from HE1PR0401MB2331.eurprd04.prod.outlook.com ([fe80::44bb:8387:8f4b:6a28]) by HE1PR0401MB2331.eurprd04.prod.outlook.com ([fe80::44bb:8387:8f4b:6a28%11]) with mapi id 15.20.5769.021; Wed, 2 Nov 2022 14:10:48 +0000 From: Frank Li To: mani@kernel.org Cc: Frank.Li@nxp.com, allenbh@gmail.com, bhelgaas@google.com, dave.jiang@intel.com, helgaas@kernel.org, imx@lists.linux.dev, jdmason@kudzu.us, kw@linux.com, linux-kernel@vger.kernel.org, linux-pci@vger.kernel.org, lpieralisi@kernel.org, ntb@lists.linux.dev Subject: [PATCH v16 4/7] PCI: endpoint: pci-epf-vntb: remove unused field epf_db_phy Date: Wed, 2 Nov 2022 10:10:11 -0400 Message-Id: <20221102141014.1025893-5-Frank.Li@nxp.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20221102141014.1025893-1-Frank.Li@nxp.com> References: <20221102141014.1025893-1-Frank.Li@nxp.com> X-ClientProxiedBy: SJ0PR05CA0210.namprd05.prod.outlook.com (2603:10b6:a03:330::35) To HE1PR0401MB2331.eurprd04.prod.outlook.com (2603:10a6:3:24::22) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: HE1PR0401MB2331:EE_|DB9PR04MB8234:EE_ X-MS-Office365-Filtering-Correlation-Id: 3abff87d-dcbc-4cfd-229b-08dabcdc0aa8 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 4uZDE39GaWqLBAxxC1H944ryTkzA7gmnd7YuNExTOMPrxaYZQYJztiXgan2GVyPRoD+ngZuILsnq/ZSvOf6U/EvErdv/gj1FoQAD72rPS7ZG+yqpzgn3OscbJYqRLbh2+UvYfxSnjnGlnF1jOahoZxH5OC0VRFB4u2mDVv7ibGP38C5DQVDl04ySGN8blxqx/HTTSjLFXjo4gQAkDfEWZuBnLms0QUT0TRp1uF2X64YIYUMoqqkoc42+IioaYWrRsWI9cVeiNmOIDSdLJ2Kk8/9kGqvNiJEyb/dl06xpZf07Q58r8Df41xL4p7WO/0Y8aaZmQqCcs9wLL8wp1+s9aakFxbDOm9BzCgak8+HW16jQeM9BoQQWX3C8UEeUzxAPSAyGlcZCgAJENgqgZLGmIP29KUTcLEVMFPlNw4+WWyEQJJVKyJYNrlw+Py5xy9zWdzm5hOQKllNwc9ObpeeoOYx5cn7ifHACbA7AbcXIjf1LxjYwB8lfD8WFzGxOj/9XiKXdkAP8d3OKu0Mfry/fH/2pycOp+d8Lp5JthfrZNKZhZA/lO870gZU5bm0odANDDNS+Bn4120xJJBub1qk57aMGYhx0NkZuJVAEb2PFw9L4nMbCWhOrrtu+bYy7x4o6DP9946e57F7dROIPE8FY9PI1HhfGG3eRh2GWCTqwkE/NCw/EhUoPA0uMZxtq1PAFcm7/VZ2Q959V7WwP5NTanqBcjW6DAkQvnLcYLdYFbGT18NEUPbKY6xGkA4nyEgXfbq8NNanyVYBgEx1Wf/3cxw== X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:HE1PR0401MB2331.eurprd04.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230022)(4636009)(346002)(136003)(39860400002)(396003)(376002)(366004)(451199015)(36756003)(6916009)(6486002)(5660300002)(7416002)(83380400001)(478600001)(2906002)(41300700001)(66556008)(316002)(8676002)(66476007)(4326008)(66946007)(8936002)(26005)(6512007)(186003)(4744005)(38100700002)(2616005)(1076003)(38350700002)(86362001)(6666004)(52116002)(6506007);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: 00zaARr5x/zZ9PNCdvJ+vVJA9xQEuEGqQ50EHeE2KXxTE+hYM4oRknO84j59D9k7uaA9zJxCQU8ayZb681ycUcZdV0qNmYQtnWoYB97cy/dyU2zyfwZAJzwLQ3yr+bakUcCvq+QkvbFn1mRGaQZvt4UcN/Bci5TTVABPyxcxaUQNmL2UNQZnZSpsy4w38xVz1v9mUopCrQ6+hA6ZAbnKjmj8t5diDK3oCRXuw8JsEKwXXsmjsxGi+ZqDVecXJoqyPgAnDZqSfQ/gr8bcyAhYZFk47a/fUB1kWiXNq3nGNjPn8+2EgaKwuUG4FwGRzV8Gw3P/tpJNy1clEBm6Gf0TC3EPw3xL6ciAx+CZKG7BOptrHGqrTr5HVRFCe83k3WN/9Ec5QyncQ00qSA4hnFKAdwnQQS8Yg7mmIqVZ9U0gnpGkYTJ9PAKIdkQ8T08trqoZzmC14tRCL/dw5f5MV4seI8Efl9uOrOYujbS4sHaQ/R2Eb3Vu1lxez676SkCrDRyoiyMRKppQ2N2y15q6XlG+x4ZaOawAlPtz70ykGotiJvpu5eNDj6B2rResTpFLyTcHwwgkcP20IkuPgQUY8WYskq3rcY4il1ZeIwLRuyaHgSwpOSYBunhiLHc7+avtWyLx2yAa89JxtuCPu9wiCF56i1s3cWX1SD4TwdE5taTMdHAOKve8VTDlz1BGQkemC0DyWQYW8k9TLqW4R52W6Zm9OKEunVTrGDMD6NSuxkaniQwn6w+1RS+LI/jKdUOXsVFiTiG9cVqxyTFs50TJbBTlW5bj9WSQE+5VzZEnqEXtm6UyyfdIemXphE4ivv4+q2TzsdYlcCHUGcwf3b85SjCFrUkWX1VvixU3XwvKmNWVFDR8mslBxaBoMjSJf2LfvLn2DPecEJBd5IJ2qnbO3d4GLr3bVHFrzjbQu7IaCiUWCH4wCs9HlmI/OGlW33Mex+6DCiktWkxjEBcBJRCrAqH5gl/Kg/RbJfBHVZo8tLEX0EhaFWdTXGucOxxPJHaY/U756UuiALprGCE/V1K/kj4czqVdlSpH2TsEQaWeflWIy8y44mQKq2/1PL4hpuEiuzMMWtuH1Ebeoog9CumF9YdEnY7zgAuWU1dzDhOErhO+xneDFkrr1SE/3p2gRCCLAVr1b6Dfe5+aYvTNLjMsBZioWb/mWCM2HS29DidEbgTgLmFSaqL7chCusfZ3D7MfVwi/PXO+GboI5QgdQFZxFsfHI+PCu/FC8kZrD/KaA+tMpvuOe6+6Gz9Vfuo9cRlaybxtUz8yWZUTL48fWfAHvPXiVfgVOFlNP+0ba4T9olgoJMGz+kbKnex1gx6oeqvZmznAm5+EmJi5Gf/d06l5K7DCcfglb9W+TInqRLsB1muN45uHbw4Yi/ZxMP92V80G4NgWMoAwpDt818y2w4Nrq73u0FjOgrithFh3KQBTRMjQw3HqKUPZJLgnwH3Y0BeUn70L11PkaNXPmmTxww+NujQFJc1WVp+9s6U7Oq1gE1O2wLx012Baw6ngD28JIZ0ww9fIzqZcegRIasBh+zEzDb114T2Hsnfcz7cUX+mYMFtPA7ink6UuEjcodlhL+NuzRwPM X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 3abff87d-dcbc-4cfd-229b-08dabcdc0aa8 X-MS-Exchange-CrossTenant-AuthSource: HE1PR0401MB2331.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 02 Nov 2022 14:10:48.7089 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 686ea1d3-bc2b-4c6f-a92c-d99c5c301635 X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: aLEAFoOtM3s3X1IjQMXTIIoD5qGbZ5xjw0ZdoGkh2fMsVBY+ze9AdSUjFnvJJP9mX59AFx0WjxX0OSHT1ZQsBA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB9PR04MB8234 Precedence: bulk List-ID: X-Mailing-List: linux-pci@vger.kernel.org From: Frank Li epf_db_phy is not used, so remove it Signed-off-by: Frank Li Acked-by: Manivannan Sadhasivam --- drivers/pci/endpoint/functions/pci-epf-vntb.c | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/pci/endpoint/functions/pci-epf-vntb.c b/drivers/pci/endpoint/functions/pci-epf-vntb.c index 191924a83454..ee66101cb5c4 100644 --- a/drivers/pci/endpoint/functions/pci-epf-vntb.c +++ b/drivers/pci/endpoint/functions/pci-epf-vntb.c @@ -136,7 +136,6 @@ struct epf_ntb { struct epf_ntb_ctrl *reg; - phys_addr_t epf_db_phy; void __iomem *epf_db; phys_addr_t vpci_mw_phy[MAX_MW]; From patchwork Wed Nov 2 14:10:12 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Frank Li X-Patchwork-Id: 13028171 X-Patchwork-Delegate: lorenzo.pieralisi@arm.com Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id AF19BC433FE for ; Wed, 2 Nov 2022 14:11:10 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231433AbiKBOLI (ORCPT ); Wed, 2 Nov 2022 10:11:08 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35720 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231441AbiKBOLD (ORCPT ); Wed, 2 Nov 2022 10:11:03 -0400 Received: from EUR05-VI1-obe.outbound.protection.outlook.com (mail-vi1eur05on2085.outbound.protection.outlook.com [40.107.21.85]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 03EDE27DFA; Wed, 2 Nov 2022 07:10:54 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=StUSbjJfpHmTNbpp7P2bjgBPeglR/kXXficaD1HoM4rTy5p+ERCZiPM7xQ5mnVjY/LEgQ7xMg8pnUzr9iEwt9ij4oQDRSQf69jdOFH4LWaLQ8xK5RV6BQZZxkA2+lDQy/UVTvCGjzXDvIU152ZcKEXHN2L29eVePrattIN8N6OGAznN6LnliMBeFp8tImr8xpdhrB8PJO1i+SXQOpx0vec1bSVEgkt6BdZbZFhk+pHX345jygFbkHctjflwjT7aOn29y/M4nUwM1H42Q5jNpesR1NiimNVl25xf3u/Wel0bnjfv0d5ejo5KudlTVw28e+XZw/nrvwnGhS9x+ZnG5SA== 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=P5pmgfmO9df3Hk/t5Nvw6lWOCyuSGK6o3sQhZJwpX0E=; b=dToSvlodOcC/4GjnHSMgCnaWR3jSuLiqOVXzHKmEUj1qZhcgbiE/vdxZkzADYPHz7JCNOiTPTMcwNpEBxpwnQpduBeU3yCCjjJjVZLOsVY3ctulqGL4s7s+6/bmvk6a5+C9kWmSIc9XPTyj+BLp/J6cMR9/B78eanRg6F57IY/CiK6vu+H7Ul1XdmHAek0eesCIilUCA6azgHkNONDYKEK3Hg2T0ddCcw/jHWdhcc+217NrDxobiTLFa4IZao+UiowZ39jcW5Pbux5m15RcizTaZ4pQG4gZEk4MOPjxkIlfg7iDLaOKaX0wQAyPnaPN+A03FKFpowSHWBO5nYJvcqg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=nxp.com; dmarc=pass action=none header.from=nxp.com; dkim=pass header.d=nxp.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nxp.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=P5pmgfmO9df3Hk/t5Nvw6lWOCyuSGK6o3sQhZJwpX0E=; b=Y+FWnPV5kYDRFSGrjC6uAXvzAVJw5R2ECV9TCKErbSd6/XMeafRZJjhqP5M6WUVTHTqwnQgqHrbY+Wt6IeXs60BbFfH9q9Z69OPKpdx2fKvyYtqG9EYOGiMac7b3DndQHOLBMYeehS+/qc9UiICWVMKldk5t/pg3YiON+z8tTBU= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=nxp.com; Received: from HE1PR0401MB2331.eurprd04.prod.outlook.com (2603:10a6:3:24::22) by DB9PR04MB8234.eurprd04.prod.outlook.com (2603:10a6:10:25d::18) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5791.20; Wed, 2 Nov 2022 14:10:52 +0000 Received: from HE1PR0401MB2331.eurprd04.prod.outlook.com ([fe80::44bb:8387:8f4b:6a28]) by HE1PR0401MB2331.eurprd04.prod.outlook.com ([fe80::44bb:8387:8f4b:6a28%11]) with mapi id 15.20.5769.021; Wed, 2 Nov 2022 14:10:52 +0000 From: Frank Li To: mani@kernel.org Cc: Frank.Li@nxp.com, allenbh@gmail.com, bhelgaas@google.com, dave.jiang@intel.com, helgaas@kernel.org, imx@lists.linux.dev, jdmason@kudzu.us, kw@linux.com, linux-kernel@vger.kernel.org, linux-pci@vger.kernel.org, lpieralisi@kernel.org, ntb@lists.linux.dev Subject: [PATCH v16 5/7] PCI: endpoint: pci-epf-vntb: replace hardcode 4 with sizeof(u32) Date: Wed, 2 Nov 2022 10:10:12 -0400 Message-Id: <20221102141014.1025893-6-Frank.Li@nxp.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20221102141014.1025893-1-Frank.Li@nxp.com> References: <20221102141014.1025893-1-Frank.Li@nxp.com> X-ClientProxiedBy: SJ0PR05CA0210.namprd05.prod.outlook.com (2603:10b6:a03:330::35) To HE1PR0401MB2331.eurprd04.prod.outlook.com (2603:10a6:3:24::22) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: HE1PR0401MB2331:EE_|DB9PR04MB8234:EE_ X-MS-Office365-Filtering-Correlation-Id: 51c8e2f2-291f-48d2-bee3-08dabcdc0d18 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 4HjfLuwJuW9ulGYDlGbzMaUDC1ev2Jt13rewJAbDwZ5ANoO/Gypu6xWhSjTO+V+eLLPGKDRwonU55eVZcpcYmkiNKIxbmKEhswHl1JqyhB/OGxCgHY6NpuN+XHc/T4GmVjPO1duf/iBKVktiwcTtSlIYGHL4lU9+Sbfuup6eg5Q7dTFWjGodB7lVj4Gr1slZ/xzeJavij7pmaPTgQbES6dvxR71LO3WYAks2uhzKxE04gKY+JLU6UPviiQ8an230cpZWY+f/zgIQKRHdq1MK2/mHef8gPvR1ZHC78qEM1UzvBMM76xKxCgXkSTat9m/cNk22PeYm+V0/iZj3zW0sw11+lcZj+v/KyM05bsoF0tfK/4+/yR5MWKie26uaRIkqoGZNKrKdoDvlyRQq/NU/uhx07Hpbmy4PpNBHRIc/idltfvLDR2odD3rjK7N65bk4qke4kNJxK0Z1oYGT5CAOpeYqYKYvUS+DVn9cKdu1pKfnWwp2f9T3iCt+f1G2o8x7Gc7gmoMsugum0YHx7Jrbx30QBVHxAinLvkn3H3aJH97Gg/Y17dmzKoclxCbct3/teripfEdlCf/1/Ctp7cY+v+jwPsq5YvHzzeEhWjHLPuLZMDPHnoB4zyBYajMFNarH666+x8uyll0f+NGDjFg4QTZFQPjOpaZDJACZnnQLi490TziIeKYMvXErP4yE+pVY9oNc74ONd5lVuvQ9NhvtA5B0qkaE4CqxXGKfLEA7n7xGWt3tvhvjmpWmyEClrRhyRV8Lq+LSZXKIEhWXBEjc+A== X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:HE1PR0401MB2331.eurprd04.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230022)(4636009)(346002)(136003)(39860400002)(396003)(376002)(366004)(451199015)(36756003)(6916009)(6486002)(5660300002)(7416002)(83380400001)(478600001)(2906002)(41300700001)(66556008)(316002)(8676002)(66476007)(4326008)(66946007)(8936002)(26005)(6512007)(186003)(38100700002)(2616005)(1076003)(38350700002)(86362001)(6666004)(52116002)(6506007);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: UHsmVfwkqaZ/P9gxuCXp85TnbeG9o0Ufs9yIbfsfLIQyL6n+OkkKH76jaybqkdkFTTNHquLB4AIq1IlP4JHRDk7w7t5kl8Yxj+QmaD1yccEqPECNjHeKkKFm9g3ReCgty3NBN9TBwt30ll/bKqURJBKnTi5uptezwXHjTYNfSrmRVf9YWoPWqu4LPWfjPuitFTLml82HVSrGdTnw7rzxdOW7ISdFpMQk/8LlnE4Vm5D29vW2TW8aXZzEKfxm7cNbw0h3xAM8Q/udFEJS5WcOz2HWo2gMwQMnHI49t2fAL5yWMhqB5jBu6rUFU2D/Yo21hwQWdMf84gF1hysFfwfflgnfJW8u7y10cFuVtsN3uECDHcz6y0RIQzUeyrgzCkumSrUN5br9KBE9hfgd8gmJOXhs/PxBKmfC9r4eqcqp2BAuHSxJZFjvnXqEaGSStyBdfw2oewLFsXpBIroqVC7o/D0HFfhmABhRN3jOetwKh20SRMfBFybvqztNYC4roHa17Hc4f/dC51gb/Qnj0Iwh1lxKaTvIEM9ivxGoWtFJ7CFddrHEJeNZJQAH6p2ubNVH1HLeSYapE8xjnZc3yeAeKcntr6jv+OnJ78dguoeh76k/ss9LOkCH68NfwaHwrk3aV6EmAzKHvOeBK+RuCSln4jn8qJy6fXSbX9R9N0adHdyUprXpwLsSybnEXofqrElVmHtFI0yZxTSCCmaBJ/M3wgZcrSXyEw6VDv2ZpMwd04gQMQX1heN2n3KUyrVsObkp7e7E2y/btuMo+fpubeGpprmGidlkMpD/++mlTJbsw3ABCIGchFv6nNfmcUbu3a88SxSLbWcfuENKTamkHy3ZK8cmnFy6omb4/HLxCNvzX8cGA7343sDBMGZAOoAyMnFUvHvcuqdsdG2CjBrYFGmUJ5ueLZrKtvzG9bkLBn1x6xY3GkkVJA6geDy6c8+ef0I908UtQFES/RkvjhyV9EvF3quR++T/p9xH8qZ2jnHAku2E1YhX7A4WrzwZ3zVvO4gnnhkIsYsLlgY7qTS7D/ka7D1ziWUS5JQhBcXGKix4FVttZzI59tnZbJB6tknlvUIkjliFOc1QERq8VFALzwuXnJR05ssesHXfWJHVRBuyxCEkorOXoMXTPx+iNZcseH4VP9c5SKJvJh3En9E3dlK0uu/e8cCO4SQ/OPszI3lM7DwDXYSpAbf8xSJJMYUb0y2K3Uq3vvBGJ2DkBaraDs/Bib7RZ6/pqzNdm6FraMqN3bgTQsBRMJVFwfvUV9jrirci3d47Zs2uzSpCIkte1+DpcHjoucAoUMYLLl+RZDPbjTMuFMnPFqRE6y4gx112nsDUu19XF2/qYFD9Ma3UYOYO+zFkzLKSFxma2vVJ1MgrDqN0x79IaCkKutyA6/VU5VLqbgAopfXWWa3LA68FCskWQKzGeCRAhw4ckBJF5tqDexnGU8p1NmBFWoYd+owmrpNOPPOQUn8GXfWl91qyiUpwjCENWKdTpupcHwNpiek1G2CunRgfVrM083XWNCj72dftJdsezdENWcC4fz4t6hKKZjejAUS9WGPl4WLGBZwQcWulcsdxQbzoz8YpVtl4HSVB X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 51c8e2f2-291f-48d2-bee3-08dabcdc0d18 X-MS-Exchange-CrossTenant-AuthSource: HE1PR0401MB2331.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 02 Nov 2022 14:10:52.6773 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 686ea1d3-bc2b-4c6f-a92c-d99c5c301635 X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: Jiy7EfZZovnTs6/dJHMJBUsiy+oAlGAOttel/RJim96wMzCmUqFcnAGZRjXciukVu5mFoNAoAeM5oDG/3h7UYg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB9PR04MB8234 Precedence: bulk List-ID: X-Mailing-List: linux-pci@vger.kernel.org From: Frank Li ntb spad entry item size is sizeof(u32). Signed-off-by: Frank Li Acked-by: Manivannan Sadhasivam --- drivers/pci/endpoint/functions/pci-epf-vntb.c | 24 +++++++++---------- 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/drivers/pci/endpoint/functions/pci-epf-vntb.c b/drivers/pci/endpoint/functions/pci-epf-vntb.c index ee66101cb5c4..54616281da9e 100644 --- a/drivers/pci/endpoint/functions/pci-epf-vntb.c +++ b/drivers/pci/endpoint/functions/pci-epf-vntb.c @@ -257,12 +257,12 @@ static void epf_ntb_cmd_handler(struct work_struct *work) ntb = container_of(work, struct epf_ntb, cmd_handler.work); for (i = 1; i < ntb->db_count; i++) { - if (readl(ntb->epf_db + i * 4)) { - if (readl(ntb->epf_db + i * 4)) + if (readl(ntb->epf_db + i * sizeof(u32))) { + if (readl(ntb->epf_db + i * sizeof(u32))) ntb->db |= 1 << (i - 1); ntb_db_event(&ntb->ntb, i); - writel(0, ntb->epf_db + i * 4); + writel(0, ntb->epf_db + i * sizeof(u32)); } } @@ -433,7 +433,7 @@ static int epf_ntb_config_spad_bar_alloc(struct epf_ntb *ntb) spad_count = ntb->spad_count; ctrl_size = sizeof(struct epf_ntb_ctrl); - spad_size = 2 * spad_count * 4; + spad_size = 2 * spad_count * sizeof(u32); if (!align) { ctrl_size = roundup_pow_of_two(ctrl_size); @@ -463,7 +463,7 @@ static int epf_ntb_config_spad_bar_alloc(struct epf_ntb *ntb) ctrl->num_mws = ntb->num_mws; ntb->spad_size = spad_size; - ctrl->db_entry_size = 4; + ctrl->db_entry_size = sizeof(u32); for (i = 0; i < ntb->db_count; i++) { ntb->reg->db_data[i] = 1 + i; @@ -535,7 +535,7 @@ static int epf_ntb_db_bar_init(struct epf_ntb *ntb) struct pci_epf_bar *epf_bar; void __iomem *mw_addr; enum pci_barno barno; - size_t size = 4 * ntb->db_count; + size_t size = sizeof(u32) * ntb->db_count; epc_features = pci_epc_get_features(ntb->epf->epc, ntb->epf->func_no, @@ -1121,11 +1121,11 @@ static int vntb_epf_link_enable(struct ntb_dev *ntb, static u32 vntb_epf_spad_read(struct ntb_dev *ndev, int idx) { struct epf_ntb *ntb = ntb_ndev(ndev); - int off = ntb->reg->spad_offset, ct = ntb->reg->spad_count * 4; + int off = ntb->reg->spad_offset, ct = ntb->reg->spad_count * sizeof(u32); u32 val; void __iomem *base = ntb->reg; - val = readl(base + off + ct + idx * 4); + val = readl(base + off + ct + idx * sizeof(u32)); return val; } @@ -1133,10 +1133,10 @@ static int vntb_epf_spad_write(struct ntb_dev *ndev, int idx, u32 val) { struct epf_ntb *ntb = ntb_ndev(ndev); struct epf_ntb_ctrl *ctrl = ntb->reg; - int off = ctrl->spad_offset, ct = ctrl->spad_count * 4; + int off = ctrl->spad_offset, ct = ctrl->spad_count * sizeof(u32); void __iomem *base = ntb->reg; - writel(val, base + off + ct + idx * 4); + writel(val, base + off + ct + idx * sizeof(u32)); return 0; } @@ -1148,7 +1148,7 @@ static u32 vntb_epf_peer_spad_read(struct ntb_dev *ndev, int pidx, int idx) void __iomem *base = ntb->reg; u32 val; - val = readl(base + off + idx * 4); + val = readl(base + off + idx * sizeof(u32)); return val; } @@ -1159,7 +1159,7 @@ static int vntb_epf_peer_spad_write(struct ntb_dev *ndev, int pidx, int idx, u32 int off = ctrl->spad_offset; void __iomem *base = ntb->reg; - writel(val, base + off + idx * 4); + writel(val, base + off + idx * sizeof(u32)); return 0; } From patchwork Wed Nov 2 14:10:13 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Frank Li X-Patchwork-Id: 13028172 X-Patchwork-Delegate: lorenzo.pieralisi@arm.com Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 4A6C6C4332F for ; Wed, 2 Nov 2022 14:11:24 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231475AbiKBOLW (ORCPT ); Wed, 2 Nov 2022 10:11:22 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35774 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231405AbiKBOLE (ORCPT ); Wed, 2 Nov 2022 10:11:04 -0400 Received: from EUR05-VI1-obe.outbound.protection.outlook.com (mail-vi1eur05on2085.outbound.protection.outlook.com [40.107.21.85]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 787E527FF7; Wed, 2 Nov 2022 07:10:58 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=N2/iev31pZsPprUyQfFELjT100QQ627d0u/PAEdFpExGBd/abvaxfRbMIxuHSmW4zbUvOCE8xdAf9gopv8tQytZAkgaeHfLZXNq9+xUB2qgVOWsXD4KSGxYk6YK2sKr1oUA31cOZd9H0TXo9qCo1+mKSeHvCAhGN7Yyf+rosavTl6GiHn6jAruQhi8PguH9v61FHWZDvgZxVCTrCVdmCBQg/3mkvYoF3yiDC8EVROUfolFdU7oJRf7TTSJv30sleOJ+sax3VtoceDskZ/rHLFQ3HPKKwOqic1lqrPLGGd86OlMri0ycQRQfOIDgJlKXtVkzPCc921dlT6dbVHlv7FQ== 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=ioq8i8JEn9HvTPMXs4bwgq2Vsrd8In4CWHIXoks/i+E=; b=LDWFetZAkf2tRxDww8cCCLxTIQpYc4DDYP7pho/hG6VlJEzYVc7am+yDVnFesGAqar/F+KspSvQ0C6M1qD1+dyzVnQZirokBrRxl6cT5QMg1rp+C2G1sWG7xfX0kc/vjanHsfFmOT63V1eGQ5jRIMNfV+m7AFMmhaLQx3uciet1MfBf50gOqnaahQ9ONe4ADtBLW6lK3FldgJQvFZtzzMflmFose3kfMyonUWNiy2pLYykHJBiid71PwBUkKw393uoKZRKeQJhAqgGRpP9hkEcQCDK79mhOEjyzLUzX5Thhz5JPyJL6ILMHcaD35N/ricSF3yyu1hMSz+cfVpZCStg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=nxp.com; dmarc=pass action=none header.from=nxp.com; dkim=pass header.d=nxp.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nxp.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=ioq8i8JEn9HvTPMXs4bwgq2Vsrd8In4CWHIXoks/i+E=; b=bKtPlPBrhpm42lTOiY63nfEDhHiis7ru3mJmIbfxfKLmiETJ0DdYD6add6K9/DPlwdl8U+L74hL2/lVZIhvxBx0OEJ4fBjwWPNv/IjcpVSWGtHMtS3sf5CDCG60OpVgm4PtUvyMaZDvFaZ2X0yN08AQ/Zt5Aqn17IvjpSWv+Kx8= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=nxp.com; Received: from HE1PR0401MB2331.eurprd04.prod.outlook.com (2603:10a6:3:24::22) by DB9PR04MB8234.eurprd04.prod.outlook.com (2603:10a6:10:25d::18) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5791.20; Wed, 2 Nov 2022 14:10:56 +0000 Received: from HE1PR0401MB2331.eurprd04.prod.outlook.com ([fe80::44bb:8387:8f4b:6a28]) by HE1PR0401MB2331.eurprd04.prod.outlook.com ([fe80::44bb:8387:8f4b:6a28%11]) with mapi id 15.20.5769.021; Wed, 2 Nov 2022 14:10:56 +0000 From: Frank Li To: mani@kernel.org Cc: Frank.Li@nxp.com, allenbh@gmail.com, bhelgaas@google.com, dave.jiang@intel.com, helgaas@kernel.org, imx@lists.linux.dev, jdmason@kudzu.us, kw@linux.com, linux-kernel@vger.kernel.org, linux-pci@vger.kernel.org, lpieralisi@kernel.org, ntb@lists.linux.dev Subject: [PATCH v16 6/7] PCI: endpoint: pci-epf-vntb: fix sparse build warning at epf_db Date: Wed, 2 Nov 2022 10:10:13 -0400 Message-Id: <20221102141014.1025893-7-Frank.Li@nxp.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20221102141014.1025893-1-Frank.Li@nxp.com> References: <20221102141014.1025893-1-Frank.Li@nxp.com> X-ClientProxiedBy: SJ0PR05CA0210.namprd05.prod.outlook.com (2603:10b6:a03:330::35) To HE1PR0401MB2331.eurprd04.prod.outlook.com (2603:10a6:3:24::22) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: HE1PR0401MB2331:EE_|DB9PR04MB8234:EE_ X-MS-Office365-Filtering-Correlation-Id: 0fd3155d-3f46-4887-c17a-08dabcdc0f4d X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 4+t9g0rQ+9sZasnpxkHyJBdTvyQ1iGyibo4hiOCbllEBnmcV1iZw1Er8JndysAVPMvgi474su5cMqwMZ3avuzGPEfswDiJInmu9DknqzVFZdryJRatxuAjUClZk4wBIgmVOk7PNVCA7hScv0GiUKfD1TXSZvZj3RZ1mjxYZohjtgWbcQh8jLboSRpU83gvyGjCGh7v1ux9TlzkMDMn4kIOJn/YuPXrq1C2IycQsiAcP3LScLs0uL1c7JEA5eRLzwBPlR8C5lhdQjuMCq8tmSKIKlrbariYaIGp+9l5XcaqFCcKCpdrZqITqjMSXSnHd+3buB/iWbAa8cDdyk7zi1Hy3sXSx+fu+JDWKNXiSv60u3GJNeidAaR7sapbJvyRM/gHMzb8HIkpZan6pwU5ql4qdX9UXs9iPPNEGnKf2WzZYVb6WjhUen8AgJpKa3mP/eN4ysXBRU77U67aUFAsEE+Ak+8Fvw7mIDZs1MCQEsbSY/lB6eVP4nzJ4l6Tj6cNCpUSJ6VerMKrnkoayoKkEUkwj+O4yKYDldnJsngLz39QFiGfpywjxKVf6xqjYUfdKClgdi4l4UUsfy7fgwW9gyMPp+AUHpPqoRO1NqvmBfYNvSdd0Ry5+juFdvZOCn32WyRsaVy9zwLdfcYwlUxrJLh1CcGpcPZ1AFun7jb/CEv6P+IeK0MQqraOeOmgp7XmxINxmjAqkaUDNNivo/j+AORVLVQxuL1exMocSpITgcWDkftayzCbI2SG4jCUhF24pYFn9rJ9E6dVWBn35nrVkVPQ== X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:HE1PR0401MB2331.eurprd04.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230022)(4636009)(346002)(136003)(39860400002)(396003)(376002)(366004)(451199015)(36756003)(6916009)(6486002)(5660300002)(7416002)(83380400001)(478600001)(2906002)(41300700001)(66556008)(316002)(8676002)(66476007)(4326008)(66946007)(8936002)(26005)(6512007)(186003)(38100700002)(2616005)(1076003)(38350700002)(86362001)(6666004)(52116002)(6506007);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: V7mf4SDY/YTTpXsb6TXPIt9bB9ULodVDTWK5mH092NbkAexSJa5jatfETW1JI68sJjMeE6d03RLddzxXTnuWZB2t4IlVF2dTarO33I7nWJlixUMEoLIHmWQIk8qWYuUl3+x2iQ/oIKfBRv6bhbpl7KN3kwVwlTn7AXBLYupXKWI0bBM3tz4Jt7kJAkJwvfPMeG1Kb8gcWPSJMzswOeu+6kGr9hRGl02P276ils47wUBXdxSHkyVLeTJTUmsL/+BVD4rcWz0occA+DP9ZINmGxNGgGFztnRWu30GNUgfaYLjxVol/RuMw3dE1Id8bLLP6PqncK9gUp4oVbsQHodeID6r1XFcPjW25TxJhXhtDqeCI7yLUfYprn0fOQkwy32DDOa3jpjJOMzUJ3FYP+Gz76VfdtBbt6g17M29HCXxiyR7WHk+6Vq62kD/b+c8YJ+nsO8C+l6yepqlkMXbJ9IB12x4z7KudsFAI8iFKWrIL7w+pyE6kdIBdLp7uLEVRFEU+SFnwjG+9i+2eCL9OHT7Ep5E3TAtbFg+b+Psh3RUJC4rpnt47xm2yGu2iS3Ok6l9KnKWsdpAm0rC16jOZ75hG6MNlfkhSD8PYTJXySJiL9Hf/GRczXDO6wnR8ljwiO/d5o8bWyAMK+R0qjLP0pHtXU00ipLZkArlhhx3IvLt5cYqbxvuxlBlHMEQy01H2QRDeYhhovg8M//JOFPdBZyHoNZjz2Xn+5oProZlIPnKxOAARuP9s5Yw3TZjxrorrMf9S/2lb0UReXskczspP4n5rdwEETaH1OlzF1ElFDsS570VHaDsJ1qepTcEYUvNcmZg4/Gxf5iJeBIYVrFKDkTkuQrJ9CLTejs63CPuKOzzfoMICSAHXEk7/JXdqABuGF9GAeDgEys1vXJnATaeXYuGtGazWY3aGlmRUdO0BYwfMeZBtd5LpjFOeLsKfbmiLVW0iiM0KOniqpozeNBiYHLVQZJFfihsLdV/pesqsBNPQf0NhjDd2DeQb60QDCLzNAoa5tRbq+GWc8NtNauDZoAsrjbKZKhIjH3Y3hW3IxkomT0Tts58Zo4MP3QAhzaEScTZ65dgZ7v1rutpw82DSArejZU/Nhx3WV4F/iOZmAZpPF21HPtJvQ0xgFeBpxLNokePFHCj/XAgwF/enS8E+l9lniMwEESKzLNPQRv52MOe6dFXUdEDQsAr7qpSzCMFQn/SF8+VWvAShS/aBhUKmKLIHavhC71bl0Qvn1xhi+x6iCMRTYvICvZuHZSFMXkiZPoJq8U4ntiUo3a6VHQvXyI8aXvgljq6tZthoWw3psVmdFXpPy28BhL6/uRJ2b9PY961Tu2xX6HN3xTED73vPVkux5AjmmdaShvErhB5byezl3mR8hCgjmfF6mMoDGmS3EcgCaLBYIp8FdsUCFZUHJQmWCZwOANPRiefzObfWctTNf7XOACPb9X9QXl8OlrII3LT0dy+3oLPFygyzlZPszmOXSs98823JL/ETvdYzRKB+FOA8f94PXcxksyLTzWwltZEMm4g6Qi0m7N4lT4NhqL+kuCzFs/3KjMkBsOKLtFO6JM1TH6hjuQL3feELZnWklGdM X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 0fd3155d-3f46-4887-c17a-08dabcdc0f4d X-MS-Exchange-CrossTenant-AuthSource: HE1PR0401MB2331.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 02 Nov 2022 14:10:56.5208 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 686ea1d3-bc2b-4c6f-a92c-d99c5c301635 X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: R6plZ4XKfdgYgTeQk43lrI6xrWRIGsctwBSYHtplXPZsMQLbMLQMk3cO6fqqIMMVqvz1LTORCJw+sXMbqntWgA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB9PR04MB8234 Precedence: bulk List-ID: X-Mailing-List: linux-pci@vger.kernel.org From: Frank Li Using epf_db[i] instead of readl() because epf_db is in local system memory and allocated by dma_alloc_coherent(). Signed-off-by: Frank Li --- drivers/pci/endpoint/functions/pci-epf-vntb.c | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/drivers/pci/endpoint/functions/pci-epf-vntb.c b/drivers/pci/endpoint/functions/pci-epf-vntb.c index 54616281da9e..f896846ed970 100644 --- a/drivers/pci/endpoint/functions/pci-epf-vntb.c +++ b/drivers/pci/endpoint/functions/pci-epf-vntb.c @@ -136,7 +136,7 @@ struct epf_ntb { struct epf_ntb_ctrl *reg; - void __iomem *epf_db; + u32 *epf_db; phys_addr_t vpci_mw_phy[MAX_MW]; void __iomem *vpci_mw_addr[MAX_MW]; @@ -257,12 +257,10 @@ static void epf_ntb_cmd_handler(struct work_struct *work) ntb = container_of(work, struct epf_ntb, cmd_handler.work); for (i = 1; i < ntb->db_count; i++) { - if (readl(ntb->epf_db + i * sizeof(u32))) { - if (readl(ntb->epf_db + i * sizeof(u32))) - ntb->db |= 1 << (i - 1); - + if (ntb->epf_db[i]) { + ntb->db |= 1 << (i - 1); ntb_db_event(&ntb->ntb, i); - writel(0, ntb->epf_db + i * sizeof(u32)); + ntb->epf_db[i] = 0; } } From patchwork Wed Nov 2 14:10:14 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Frank Li X-Patchwork-Id: 13028173 X-Patchwork-Delegate: lorenzo.pieralisi@arm.com Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 6C279C433FE for ; Wed, 2 Nov 2022 14:11:29 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231214AbiKBOL1 (ORCPT ); Wed, 2 Nov 2022 10:11:27 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35908 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231437AbiKBOLJ (ORCPT ); Wed, 2 Nov 2022 10:11:09 -0400 Received: from EUR05-VI1-obe.outbound.protection.outlook.com (mail-vi1eur05on2085.outbound.protection.outlook.com [40.107.21.85]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 730AF24F33; Wed, 2 Nov 2022 07:11:03 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=LnfXzoKi7ggI1RIGizrkRM8/YbRTiNc2zC2KP9COiKgTctNCWIY3W0hNauc0WZntlpKdQ9LzdRjoCaalWFR9Q79a0DXsQs/8/+OyqNFMNmsIxyDpH6N9ECMWfpCUiPT6fI/pmeHZuSO3pRVVIybJnmxRaUSSzIpRGB7PPiKjV5czOu3efnDjuhUAsgPlhFzz04a7LiNz5A4Fysqn6iPpTFC5v0GAQd2Cop4FE9pC9cBQrXvzpUxrqKVzEigJN2cbmPe7cV8kx4GZDPpHyXS70HlsW9zMrRq5uyOBC+afvzvqpIfxA4AJmfKhUtUJhjVICR3S0TMooYcrdC81zX2a2A== 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=WFzFyx1vsGg3jLH40Ok722Zs8rNi57PQqnyZ7ZkJjRA=; b=Fu1RN2UhETiWAFq+EUy8EUvdHQvLpOaOvlrXLJ0L3yTevtKBDzovRjkTks1frLzokSc0v/Ip1318knb7Oeleq9D7HcmK33B29lDhtUuKGQRkst79TrIffdvCRLOOFcjq/tjIlYwKKvo+iJqDMT4k4WOBIbzD9rl5Gio3QseIhrZtZUz03FWScNILNf0F5g6OaQ60som3TWecOiPJM0CcV9o+lK8t3gLkvP1fxMMo4aDA8dI2sCJ2CM2neib748TtV6ERyrpyuXWrB70Tb32Eq4sXQzU+/nxxtqYF8kQ0ba7ry61rUfLo4LnEs6CkGDhoFk0TCgwrcZ0gMxAf3NFwXw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=nxp.com; dmarc=pass action=none header.from=nxp.com; dkim=pass header.d=nxp.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nxp.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=WFzFyx1vsGg3jLH40Ok722Zs8rNi57PQqnyZ7ZkJjRA=; b=OPA+d1XdjwmewlYd7lCoptGWsD8gmfEq6+f0iCh9KZs+YvdvTEf59amrgb90MRqLfRba4wAV7L4BjiNNnnDJWl9sE1Ibbl0NCHln2mGJJh2P/YPXp3GLOAUxAqrj/XyqIs9xrtCC4rL90G5zMfNf/7Qjtary/hfCgWIlhSXLXcM= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=nxp.com; Received: from HE1PR0401MB2331.eurprd04.prod.outlook.com (2603:10a6:3:24::22) by DB9PR04MB8234.eurprd04.prod.outlook.com (2603:10a6:10:25d::18) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5791.20; Wed, 2 Nov 2022 14:11:01 +0000 Received: from HE1PR0401MB2331.eurprd04.prod.outlook.com ([fe80::44bb:8387:8f4b:6a28]) by HE1PR0401MB2331.eurprd04.prod.outlook.com ([fe80::44bb:8387:8f4b:6a28%11]) with mapi id 15.20.5769.021; Wed, 2 Nov 2022 14:11:01 +0000 From: Frank Li To: mani@kernel.org Cc: Frank.Li@nxp.com, allenbh@gmail.com, bhelgaas@google.com, dave.jiang@intel.com, helgaas@kernel.org, imx@lists.linux.dev, jdmason@kudzu.us, kw@linux.com, linux-kernel@vger.kernel.org, linux-pci@vger.kernel.org, lpieralisi@kernel.org, ntb@lists.linux.dev Subject: [PATCH v16 7/7] PCI: endpoint: pci-epf-vntb: fix sparse build warning at ntb->reg Date: Wed, 2 Nov 2022 10:10:14 -0400 Message-Id: <20221102141014.1025893-8-Frank.Li@nxp.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20221102141014.1025893-1-Frank.Li@nxp.com> References: <20221102141014.1025893-1-Frank.Li@nxp.com> X-ClientProxiedBy: SJ0PR05CA0210.namprd05.prod.outlook.com (2603:10b6:a03:330::35) To HE1PR0401MB2331.eurprd04.prod.outlook.com (2603:10a6:3:24::22) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: HE1PR0401MB2331:EE_|DB9PR04MB8234:EE_ X-MS-Office365-Filtering-Correlation-Id: c91f7991-ffbb-4382-e2e8-08dabcdc1205 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: cB7TGGGQUWZaXdxzPbzuksxAaVL30q1RKQbqInOCgV8ZcnpCL+fbAMFDsGUouikjFDiaboxqPoQzOcar7Jwib2ZUA/8rphxbo4toojkP8NfTQRLthTsSelO/yE8wq9Qd3iSn6aZLQlyr26W9QtNSSQ67BRMEwxOaRVSEI/CE4zMxG7yKPS7wpQNDs+9eHvVMKrgbVRvjylJOqVgU2rUY5r0RozqtKoG1l/f5LszrQL2Gqx8Wu6LY4XcrS0M9FbYu0VXHUE5DhoCokdFc/cRfKTzIesrZodsLfbb+TjEF6TIG516FSwWsJqriri6PHT8/hr22snRRQ4FDHTdopjhLbLBDvJQc48YT/fmy+/g8xxirQt/xd52hwdfO7zvOCQSGgE3OyqKMIFvnwfAzQ+iXgcZScy9CHd6KOYYaAsmNWzy8MD8H69hMq8YR/bwgLlSiRVa5YY1mkm81ZNyz4Am6IxN4P1oazbuyms0U7OXNd4zZaUIc9mwIuTIal50heN04e50NtuHP+t21sSAvBqvOa14WupJHM7T3COMLFSd+q86EqJvBeTcwP8U1foGqIuRSRj0Dc+pgQYqtnduAF1BSIRowUissrJFZACbVUCRNXDJyLfFZwewgCyg4uu1rynGzbnv+uVJI/FZ3n4oOKIRnoM9Tp1bF/HhF2upQSgAt5Temvrw/TdZi+C3pIT6sPuP6EMMpxOlj884LdfQjlHlEom4W7G7MNNm35PPBwRp7BbYXmIC3ggrsKoJplag1egHFeB+E6nW0fzLjeVLZpo24Gg== X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:HE1PR0401MB2331.eurprd04.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230022)(4636009)(346002)(136003)(39860400002)(396003)(376002)(366004)(451199015)(36756003)(6916009)(6486002)(5660300002)(7416002)(83380400001)(478600001)(2906002)(41300700001)(66556008)(316002)(8676002)(66476007)(4326008)(66946007)(8936002)(26005)(6512007)(186003)(38100700002)(2616005)(1076003)(38350700002)(86362001)(6666004)(52116002)(6506007);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: c+ghEMmt98/jipg6CzkX0byXVGkx4WgT3WmigTtY8eu1Afty/nTVa+y8CqUIyQgj8KS6MvGy95Lq43qljFku2maTApZIGttBXy5VBzu7T65/A/oDQmbuaEpMwMLDNsK9aypUFoAkDZ7OwIfYZm+1ZPBobwCz6/G92EK95JRHY343Mdkm+R/mCXK5gGovurmMEfoV/Om/G51UVG2PHlszOpBWRCf0gXblo8l+uqiDoHYszDy5yLyh0AGocPMLGS+WMVa394DFJTgIw6+cugcBkMLcnl6v+kEAeWQbbyCjKC1L04wdbdMLSVaN4Ef2BhOG3m7qQ8z/MNtD797BAKWOB+LjIGT5xLTW6S/Qq+fe1S96ertGMFn2Dw/Ugbt/mO3+J9y76A9Q4sP6EKnJU12I3fl0VOn2VA52CfRmpPZiqhzVsUpvtuA//TOi7bcvhGBlzaYS7TGMrxVzyZNjPtBr/sEqu8dpySxsJU3WrTwB8BHV/I+CWv4LjgkWi5bbs8ywFqexNaf0Mx4wP2wotWXXUhunj9lRyvId0Ouoa9ou+Pb/n/OLhzKHRuq5F8R1sSrD4OlO0oQbMgwE3wJ+JsZY+00I20ARo3YIOuLw+A61C/sxXzZu1a2Vr29xmPeF31f8aK/ZZL/i66tPbFM5znW1a2iK3fi8Ds4CuRLoFgX7lN4wxmkjoA/V4Olok/GwOxxgs3mrv72yjYbNW2K07zuPkGwTcSFCf8sCGdNGsYbQZdJOep8m997CidiP4ZUBEgSXRTTUdf+xWMPF2GARaX56nysLPHtUUlsu8grGez+N4PIMyLeNl23P0H5cVve5TeLAthwer3IgzTtY7PuZaidBqys1jVupvv0NOLyHy48IYLUUQJ9sJcA/7B35m3DUOAZvVYgeW3VkrWjutSZrD1svg/8BPP3ZLbgPfOH5MDSEjMgJTbyV14brwDICq8dqNq9k/77cJjFV3JWcIzoCl03f6WFcwsFufI49vDH8IM5U40nYVS2HKE95iJY+AEyWwGT2U6jhuz4J1SQukT61vK95w3PAAE4YvJrHPeJE09MJFaI8Hz8NKSH+xFQkFx8TJy09uthlO7tumvL5r1+CHmQS8Fd/YZpHl74bVB3yF9ah3+js8QVFguX3LSoinoQclk9cip3FvNMBMlIBpCsTbhYdn5oIfO1CudKw9E5g+Xj9GfEJAvt07p8rxYLMakzoVJMg6LbkGWG7aF80J8omW9Arbk2IsVeHKtuhSHhICaMMvVUVtowrZMGCKqAAnwc5mzAMgMdoJp/q/Eiepsc96OmYQ0PFyTa0vMLN1wkP/X1hWgykKtVi2VrM57wfY+5Dri71WKb6bSTNBp98JUm9H3E8xtLiZ3bKNh0mZ2xdGIHwr8z/HpvkMSQBiYlZI7P4ja87shoHC+xIb4ouuoVD5z9y9sZ5npT8RijKiJVFI41qiiFkY4IKA7234E1LtV7Nv/S8J7FEoxKQPRUHQKo5yvGS6vHVvr191XP9laSVRZanzsOakimcij6SBw2TrVBjPYiyNbqB1z4/d82Xii6UPC04p2yAtP23ugPQi3+c/bSgTAHSFZ4CKrI6mBs3IzTi8XtF X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: c91f7991-ffbb-4382-e2e8-08dabcdc1205 X-MS-Exchange-CrossTenant-AuthSource: HE1PR0401MB2331.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 02 Nov 2022 14:11:00.9267 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 686ea1d3-bc2b-4c6f-a92c-d99c5c301635 X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: BICY0AbF7Az3z0HD/RJJkLUVE5mv9/QmjZOQpu7AMSRuMLpwd4nIBrdy5JyCPCWplgJN5xZj5PW3PmBFhqqa+w== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB9PR04MB8234 Precedence: bulk List-ID: X-Mailing-List: linux-pci@vger.kernel.org From: Frank Li pci-epf-vntb.c:1128:33: sparse: expected void [noderef] __iomem *base pci-epf-vntb.c:1128:33: sparse: got struct epf_ntb_ctrl *reg Add __iomem type convert in vntb_epf_peer_spad_read() and vntb_epf_peer_spad_write(). Reported-by: kernel test robot Signed-off-by: Frank Li Acked-by: Manivannan Sadhasivam --- drivers/pci/endpoint/functions/pci-epf-vntb.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/pci/endpoint/functions/pci-epf-vntb.c b/drivers/pci/endpoint/functions/pci-epf-vntb.c index f896846ed970..04698e7995a5 100644 --- a/drivers/pci/endpoint/functions/pci-epf-vntb.c +++ b/drivers/pci/endpoint/functions/pci-epf-vntb.c @@ -1121,7 +1121,7 @@ static u32 vntb_epf_spad_read(struct ntb_dev *ndev, int idx) struct epf_ntb *ntb = ntb_ndev(ndev); int off = ntb->reg->spad_offset, ct = ntb->reg->spad_count * sizeof(u32); u32 val; - void __iomem *base = ntb->reg; + void __iomem *base = (void __iomem *)ntb->reg; val = readl(base + off + ct + idx * sizeof(u32)); return val; @@ -1132,7 +1132,7 @@ static int vntb_epf_spad_write(struct ntb_dev *ndev, int idx, u32 val) struct epf_ntb *ntb = ntb_ndev(ndev); struct epf_ntb_ctrl *ctrl = ntb->reg; int off = ctrl->spad_offset, ct = ctrl->spad_count * sizeof(u32); - void __iomem *base = ntb->reg; + void __iomem *base = (void __iomem *)ntb->reg; writel(val, base + off + ct + idx * sizeof(u32)); return 0; @@ -1143,7 +1143,7 @@ static u32 vntb_epf_peer_spad_read(struct ntb_dev *ndev, int pidx, int idx) struct epf_ntb *ntb = ntb_ndev(ndev); struct epf_ntb_ctrl *ctrl = ntb->reg; int off = ctrl->spad_offset; - void __iomem *base = ntb->reg; + void __iomem *base = (void __iomem *)ntb->reg; u32 val; val = readl(base + off + idx * sizeof(u32)); @@ -1155,7 +1155,7 @@ static int vntb_epf_peer_spad_write(struct ntb_dev *ndev, int pidx, int idx, u32 struct epf_ntb *ntb = ntb_ndev(ndev); struct epf_ntb_ctrl *ctrl = ntb->reg; int off = ctrl->spad_offset; - void __iomem *base = ntb->reg; + void __iomem *base = (void __iomem *)ntb->reg; writel(val, base + off + idx * sizeof(u32)); return 0;