From patchwork Fri Oct 28 15:56:57 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Frank Li X-Patchwork-Id: 13023889 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 35B60FA3746 for ; Fri, 28 Oct 2022 15:58:28 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230322AbiJ1P60 (ORCPT ); Fri, 28 Oct 2022 11:58:26 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49512 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230220AbiJ1P5f (ORCPT ); Fri, 28 Oct 2022 11:57:35 -0400 Received: from EUR03-DBA-obe.outbound.protection.outlook.com (mail-dbaeur03on2061.outbound.protection.outlook.com [40.107.104.61]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 23F1C215502; Fri, 28 Oct 2022 08:57:32 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Kbv7AffqDV9h4/C+RdldzfB4ytMpkR8I/vRPbNRX+ApI6ITs+2lTNnQSxNfjJsWEsunXHOi1KkcZOC+S96QtzruKF8KtAsbfOId3CwvYHsF0A/wLeSrg8b4mLtNh2MOQQn5jwFiRg+zNVDtWXfSkAPa8vxFp0tV212640hgpby8/qIGMcCWvjcsd6S/rIX7/KA2xuGaLPUwLwJf4xKwpmOdKOnCZ8Cq9ajGsBBbVlwa1VpYSASjZf18BIlETIRteHwsb+ACQ38/K/HVIhoc8hiL8ju7lHJfAXt0vsKu4OYogXvqGRIcONSXMRPfCmYALOsIkAtMNvca2Vrb4DAQS6w== 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=ztuGq2FTvBPO9qE1epwO3aSqJAJQbfBz/Tjg3yJV2fA=; b=I+KmCUUUqtcBKKWwxDbwkA4/eyS1KP+SSfo3ctbBnsH7rdnKojmVNZBnpu/qAEGOmoYWMu3tSzRN8HnoRLrgb7ZjsUPGRTGCmOmjeirABXIFQo3xCLx6BmAU46TA9CRoF3qP2rIdSqhAqJJEUFuSIiZjy7DedvrmYzSVA0MwDG5tb9h0iFibVew7lPphFsUWDTNRNTAhtw5R5SSM4O5e+h8jEFeo9iNVG9WN1gvVY1VghYsu+ftklnVIopNaz14U1tV0kSt/2upPOfL/q0pApwfTR8Gqhh6fFfQk1O+KUnJRwHCkO+HpGQtKiIONrz8KC3L94DhEIaUsxlfGCfso1w== 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=ztuGq2FTvBPO9qE1epwO3aSqJAJQbfBz/Tjg3yJV2fA=; b=eJ3GizfoAH3xOhQCzmXaNzbdo8YG/h0F0r75kFGZudTgciyx5gUqHiTofrkVfmVPeVWXR7jidXcVZ4JKCbt1o9vKrzL0wUqJyT0MGOchJYWkFB0BEaCxFi2b/5Q/4t/AUnd1MUVkAlpNUq4/n8YT8HdevEVUvbvzwa7SEkjhzTM= 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 AM9PR04MB8323.eurprd04.prod.outlook.com (2603:10a6:20b:3e5::21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5769.15; Fri, 28 Oct 2022 15:57:30 +0000 Received: from HE1PR0401MB2331.eurprd04.prod.outlook.com ([fe80::44bb:8387:8f4b:6a28]) by HE1PR0401MB2331.eurprd04.prod.outlook.com ([fe80::44bb:8387:8f4b:6a28%10]) with mapi id 15.20.5746.028; Fri, 28 Oct 2022 15:57:30 +0000 From: Frank Li To: frank.li@nxp.com Cc: 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, mani@kernel.org, ntb@lists.linux.dev Subject: [PATCH v14 1/7] PCI: endpoint: pci-epf-vntb: Clean up kernel_doc warning Date: Fri, 28 Oct 2022 11:56:57 -0400 Message-Id: <20221028155703.318928-2-Frank.Li@nxp.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20221028155703.318928-1-Frank.Li@nxp.com> References: <20221028155703.318928-1-Frank.Li@nxp.com> X-ClientProxiedBy: BYAPR02CA0010.namprd02.prod.outlook.com (2603:10b6:a02:ee::23) To HE1PR0401MB2331.eurprd04.prod.outlook.com (2603:10a6:3:24::22) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: HE1PR0401MB2331:EE_|AM9PR04MB8323:EE_ X-MS-Office365-Filtering-Correlation-Id: fbacf2cd-6e28-4ac0-9066-08dab8fd1e39 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 1A6nLSHUfYqikVx3keg/WK2rQPlUa5w1Q2Og2jSF24SZKtpT/Tr3LT6AHzwBS6gRzrKA0oDVxrh8tHQuWpvI/LZFI3SnFM/vghssTggHMj9KWCrH4zbYfATQ/NXuG+33bh3xn5iJ75xuSP18aBfuSObrvtlTjLnWrLBCXNZg0+1RY1zqCiHP4kzofKMbhckushvUQShXiDn5zGG18q3jL0jDLsfXJ9vsfOodbuhqsO5WHxTE1cwRDxNl+ENoAxyA3tMJdzEbP6PzOOP9Q7E3Zmdh3Kp1Nu8eihp01YRi8TNbVNyXN294Fa1CMFHz6R3p8IvC1WjkjnQWQlrurrWrLWyaNw6Y/HDoKXssrhuep2KJhjsnDAhMo63h2lh8zN1Piq3UFElIwi8kS1FsQMNrodjxexKOwKT3oL4iH8ZjmVNA4F3cUTkiUWqJP8TXu+jQP9LcR7SaOt1JwzgcV6brTtYQ1zwwgwBDnDL74OxE97SJ4AMlLomc54wSnR1pCBoLo/5MPHHKNIjH/LHGeimzfJ5iniueVRuyRBFCxIWAA/s6OnuiWbHfAMqhinyyKG4drt4XzFF3JzrVcKEoycLe1D4Sc6lnInNRLNOZOWZxXCKGVJPbglqfSUUWg6FXbqIZzFObq84OaagYG/qvelRQ/OqtiNWyebe+/h7Z5s7l8ydvzRLmTp0z//5ofxmME8iz0RLHk8iQZbBSgmv9iQNvh0RtIdtLRZ31ZNGroS8MDmCG88/1i/lvF1XiObxLJpuEObMoEATbfuDpwZ/58HkmVg== 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)(136003)(346002)(366004)(396003)(39860400002)(376002)(451199015)(6666004)(316002)(37006003)(34206002)(8936002)(5660300002)(4326008)(2616005)(186003)(1076003)(7416002)(30864003)(8676002)(52116002)(36756003)(6506007)(66476007)(66946007)(66556008)(6512007)(26005)(41300700001)(83380400001)(86362001)(38100700002)(2906002)(38350700002)(6486002)(478600001);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-A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bd3JMwHKWvUWFmVVzIHCQpLc6iifU5z3L/7l/1O4sVBaYcj5lIqNbDEKseDBU5Srwf5X6AmwpJ/B68TvliKsOqXT44Uc2m5kAZacFICz3JuQtioPl33ZLjc7EmV3sSPm8XmR1I2O0oJJ/4UNA+iMfNGfY8Yzs3mAd9MNi/4AEHTBnBbRlvit8gViURXRAP5LUja1kKopntnh+8r+ku6LTvEMcGHahS/llKX82OopMzWN3xkclNRcyt5YTk9Ekh/6QSxY0+HYORBl6KTgLrIEqaJ/NQVMzRkD1iXOKMAiilrFbRv0qHHWYItysoUq4r0Y0/PgcSt14pRJJXhK5h9ATOWeobPLwdzZuJEu4G1JWSYEUgDvMh0SlYpotryddbXczm7jp3jHNxAF+OK6vLgMNOfGK+3HzOwWzWQ+k/MrD6+iI3E3yS5IctnR3ltWDAH9VWt2iROQmAmLvEOX6E3D4slVywsDpqbCKuiPNIJ+cNqSLGCrfNlR80l7a8BHRNV0nV5+sWmBLkZicuUYTLzkf7ivX X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: fbacf2cd-6e28-4ac0-9066-08dab8fd1e39 X-MS-Exchange-CrossTenant-AuthSource: HE1PR0401MB2331.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 28 Oct 2022 15:57:30.3109 (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: oh2vZPoTKmKGGWIDXLHnscfuxjvLVKcFQqIhV2V7W2Q+6mFf7vPEf+NEtuJ7Qbt1A46lnm2VHK8rTtbcq0Sqig== X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM9PR04MB8323 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 Signed-off-by: Frank Li Acked-by: Manivannan Sadhasivam --- 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 Fri Oct 28 15:56:58 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Frank Li X-Patchwork-Id: 13023890 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 88D89FA3745 for ; Fri, 28 Oct 2022 15:59:15 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229765AbiJ1P7I (ORCPT ); Fri, 28 Oct 2022 11:59:08 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49360 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230258AbiJ1P6T (ORCPT ); Fri, 28 Oct 2022 11:58:19 -0400 Received: from EUR02-DB5-obe.outbound.protection.outlook.com (mail-db5eur02on2050.outbound.protection.outlook.com [40.107.249.50]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A87EA21553C; Fri, 28 Oct 2022 08:57:36 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=SDYXbQBGST5MNktHqxV5DlNFvbIzyP069FlfhQGdZkVAsTGmvfoAAiZLMOJGnsbEvAgNN37398NRgDPA3FnkoITUbreWySxSO23y5aAq++zlCglz95UoVNirxlIGRzXkfyk4IIfVNMjeMyJngpyocP7IoT0fKIclH8lZYZ3dTpy6rt8c4asXcPFJfOpzXK4C9aMVBZIQnXR4eHmCNgDZ8u02xdBGYtNqa8J76Bb4DxSVwoyn4iYvkU0SJ1Cf1nfPylBYXaCOV2FuOAHk8QqmVPuyPZpdx3mFNpqLozUJpoVzxoGxf4ZLuEBlLoD3beueKm6e3myZ8wxybNNCG37ZkQ== 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=E0aTpYZBIayAJTU8Q7biEmzV0MnRHl78tQiUE5REJug=; b=UmsRE7JYL91Ytw2OrKdhwBpwFPYphHJIfiWXdUZFhC6kK/B2/jKR1Bj4888tTlu7eZOdtvz52IQ23Eg9JRmpnXUpLIlgd+wJaWrnRFuhwVChXwuwq7hVcKMP7vt06qn/CoD+QXit+CaQj6CfBvd/auYgCvko1En62qdrc2mNsyHfRwQAIondgzFOJG38n2Epv1QIuiCcrf0u/7bO86N6P8tsAKzzHLm4n2KyjMEyq6QV2R3oEFwlA8KHwhdviUxsik8EUDgMB1Pg1mZcJOu+A5hzUUSnVMgcQ/5QugP1Hz9UO0EUgkZ/QS4AN93+5oZKsmL3mtkn41c/fWs/+iHLFA== 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=E0aTpYZBIayAJTU8Q7biEmzV0MnRHl78tQiUE5REJug=; b=UcvEaysdP096NIeDxlocT9UVZ0l1SyVeeDSHBJQe/+tRrODja4AlneQPTNHJMHJZKu/zLXyM2Wl5G8v2/1++j+qMyJt9P+pfwuMotqvrsVU4lfflMEsHJSIfsb5FEL6bojiWG5OFDSJfyLKz1qO/axDH+FrQaOaA48LyBlh2guA= 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 AM9PR04MB8323.eurprd04.prod.outlook.com (2603:10a6:20b:3e5::21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5769.15; Fri, 28 Oct 2022 15:57:34 +0000 Received: from HE1PR0401MB2331.eurprd04.prod.outlook.com ([fe80::44bb:8387:8f4b:6a28]) by HE1PR0401MB2331.eurprd04.prod.outlook.com ([fe80::44bb:8387:8f4b:6a28%10]) with mapi id 15.20.5746.028; Fri, 28 Oct 2022 15:57:34 +0000 From: Frank Li To: frank.li@nxp.com Cc: 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, mani@kernel.org, ntb@lists.linux.dev Subject: [PATCH v14 2/7] PCI: endpoint: pci-epf-vntb: Fix indentation of the struct epf_ntb_ctrl Date: Fri, 28 Oct 2022 11:56:58 -0400 Message-Id: <20221028155703.318928-3-Frank.Li@nxp.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20221028155703.318928-1-Frank.Li@nxp.com> References: <20221028155703.318928-1-Frank.Li@nxp.com> X-ClientProxiedBy: BYAPR02CA0010.namprd02.prod.outlook.com (2603:10b6:a02:ee::23) To HE1PR0401MB2331.eurprd04.prod.outlook.com (2603:10a6:3:24::22) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: HE1PR0401MB2331:EE_|AM9PR04MB8323:EE_ X-MS-Office365-Filtering-Correlation-Id: fe2cafe4-32ae-4bf6-7741-08dab8fd2086 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: aLn8pjM2g6/A/qQIpVh8Y4JVOslOjq0DkyjZMMppdRQXVY/3wDpOfmHapd4JGVaFdmSaNnXK2bcEKFHvdmXuVtZf2HgtHipPwWA+wn9zhaIYXhFgb3IuQQNwakPfeMAQ+Wtg3u9+5swEOFRM21GtNKtvMqogLYH0u5fPVGO/vMF1/V/V254XTX83wXgSLGBuXY/JlgdT/kyvnLFIQOuhgeIch1jtFrZafSdysh1qVw1dVfDXbTa9amUITZ0IqRe1G/d5Y3EesIz3lfY3FkYpLPfGMcmcfuEndzqrx49pru93JCMvoNuNToIu4XftR9lBC2YJuKu1U6xGlCwHqT/clbGZDSwAeadY9s62I2ClcKNOC+HyVeqmls84MWveNzpC1J8VQBakJwjDYFUTaY6Ytx/m4RQUo32WJx6AvcAQZtWZp4S053vSfkKG3jvVnGV4eE7xaVfHzGFEw0SleXvv37B8MmCTmQ+1Lr/A3Z/8SX6RC7eD8Lcor0ZfAFni0vPfTLwZYN0NReVZLoS+ybB/FPXzXvPf5xyvCvV2Dxp6LyFIZKYunBuKH64yHYGJ6jQfg7BDWIlNZpIk+Kbft4vOWuy6Y1iPrwCT3d/Y5xewpfvkUeUb49lHlXVZH1Ai0UnBo1EkdRthG6FOd4KrpivnsfihRXqoE1H/ZcLxJ0UAtG5n/7GoWhTNUgP/HU/QEsT6DF7Ou6/g4iPsjyJhc61sTx9jPztnH3vGtukmc7kuxBcgAxgNB0wCV/wO/jNZLWI2BIdN2PYk53TbglIQY4RRVA== 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)(136003)(346002)(366004)(396003)(39860400002)(376002)(451199015)(6666004)(316002)(37006003)(34206002)(8936002)(5660300002)(4326008)(2616005)(186003)(1076003)(7416002)(8676002)(52116002)(36756003)(6506007)(66476007)(66946007)(66556008)(6512007)(26005)(41300700001)(83380400001)(86362001)(38100700002)(2906002)(38350700002)(6486002)(478600001);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: O5U6nsimmvxBEZBNnK21dS8Qno0uX/KEhhlXigb/zO/t7e5ykYSCde7+EbKX+qr5jsi5sWDhgM5a7urXLmanGfDk5rHiI1u2suNApM3nK8zhcRcYD9TiyexgkJgrvH2G9UAZzo0pqwhh3TC0EArH0VSd2apqFKdljMu/8/xvZHQszVnzDYSg4yMxMgASXPRVr2a/BPqml/EG6iFj/lkhzYde3VajfFqSb2bE58E44PRJHP2JElu9fT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DWDATfCiCTdShy9Jwyc2lh+zo6TAOdDSeU3bAxMPzYfSFG7TB6uJUPlrGhDDlAvxkKIFGEyH7YQhFGO8MwFXJbpo5fu7g93wwRU35UCbdgtCwGFQecEunUjYTlc8v/Uz7w648GpKWE/+ljbLk8/bGg0IgBx00bwCxVhRWyn+tfh1QAHcoXuQTvBzzY4KXa10Pu0l1enng7F5cg05heNvE07ba7/CUPMXsL1Vkb7uNW58bhicxUSLzxI= X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: fe2cafe4-32ae-4bf6-7741-08dab8fd2086 X-MS-Exchange-CrossTenant-AuthSource: HE1PR0401MB2331.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 28 Oct 2022 15:57:34.2485 (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: e923BGN62rLDEicJsUhURDWbCti61jC3k0hflsOli2qb1B43vXQ9zaYAFcCYbd9N0I0z/tevzGsQwvShwGiqNA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM9PR04MB8323 Precedence: bulk List-ID: X-Mailing-List: linux-pci@vger.kernel.org From: Frank Li Indentation of the struct epf_ntb_ctrl align with other struct 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 Fri Oct 28 15:56:59 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Frank Li X-Patchwork-Id: 13023891 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 9C314C38A02 for ; Fri, 28 Oct 2022 15:59:19 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230174AbiJ1P7J (ORCPT ); Fri, 28 Oct 2022 11:59:09 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49434 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230290AbiJ1P6V (ORCPT ); Fri, 28 Oct 2022 11:58:21 -0400 Received: from EUR02-DB5-obe.outbound.protection.outlook.com (mail-db5eur02on2050.outbound.protection.outlook.com [40.107.249.50]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 94CDA219FE5; Fri, 28 Oct 2022 08:57:39 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=WefRjbzdiV0HujiVEcKGLa7EutbYsavVSneJqOxj7BITB/4rFU3+3RlSq1AiaOnVDeDCx9WfXGPrR3Z8zJmkBV6zounvOec3KvwOle7tACIxbteXUvc5ezvR1baf7+O3IwkKLAubOvcTDXLW6gH2FB4OYXHKwefl8XQQLR1/f4Po7xe22mD7C9xk6ogmy0g+PydIA0VRRKFDmUyj1p5D6BYdvyr0vrLbNifn3YVIiAoWmmIYbL5EXXkNA6prgbdwerk4hKsCsel8AndDIjnvh+3Z/E0Z9o7OGofSzzle9lML6+g6DW6e4WB30ezapJ4YEji7ZElamdtnA0k/Kao0LA== 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=pyD6aoIjEVUqZqDnSZCuVf6c3XoOXvPwpCEPm4asbEs=; b=A9BN3sXfEikFeh8v+2iZEm/j+KhmBnvD+gvMMBsXFmML8h4HlSDPo9DXuYxxZgZH+ClDQz5gnLoZop8xxiFU6tAltFBEPtTv+40vUXjEQBzEeQQ/1SPcqaDagDYVZWPYWAfEL5UZMfRk2y5tmIxj711chJnNFUfZU0ieJolnh+0UQIyUyyJ8tt9yrE8F3vh4MdrnamCmrFsbm0mlxViyZIijuMVQYAmddxlEV7mxBlxrCuWC17rd3tb3p5bD2bpyEEpVLPvt0ToKI7+FWBJYRTFypae2+jaRTo8MSkns1XOfA9iPzfCCbSSnWxKIibCBDZ1Ifhl2z7CJW6kVBFkUuA== 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=pyD6aoIjEVUqZqDnSZCuVf6c3XoOXvPwpCEPm4asbEs=; b=FwCH8lvnxxxycavPlatnVIrabsPU/TSRZvY4bPPw3orYcltlHyTwq1vXwFpgNOAOpRkEB/w5ZKNxz/xIAc6FZxBjZE3sxgdLnHq0Fzc/D+lqD/cqTCgjud+dK7g+INNlXJ0a2/OHXBd2H7bIJskCgIONONRX3hbw1rOC5DGYUPg= 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 AM9PR04MB8323.eurprd04.prod.outlook.com (2603:10a6:20b:3e5::21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5769.15; Fri, 28 Oct 2022 15:57:38 +0000 Received: from HE1PR0401MB2331.eurprd04.prod.outlook.com ([fe80::44bb:8387:8f4b:6a28]) by HE1PR0401MB2331.eurprd04.prod.outlook.com ([fe80::44bb:8387:8f4b:6a28%10]) with mapi id 15.20.5746.028; Fri, 28 Oct 2022 15:57:38 +0000 From: Frank Li To: frank.li@nxp.com Cc: 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, mani@kernel.org, ntb@lists.linux.dev Subject: [PATCH v14 3/7] PCI: endpoint: pci-epf-vntb: fix call pci_epc_mem_free_addr at err path Date: Fri, 28 Oct 2022 11:56:59 -0400 Message-Id: <20221028155703.318928-4-Frank.Li@nxp.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20221028155703.318928-1-Frank.Li@nxp.com> References: <20221028155703.318928-1-Frank.Li@nxp.com> X-ClientProxiedBy: BYAPR02CA0010.namprd02.prod.outlook.com (2603:10b6:a02:ee::23) To HE1PR0401MB2331.eurprd04.prod.outlook.com (2603:10a6:3:24::22) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: HE1PR0401MB2331:EE_|AM9PR04MB8323:EE_ X-MS-Office365-Filtering-Correlation-Id: c2c542b8-bc15-4059-bf0e-08dab8fd22f4 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: yzP8S6SG+ifvpPQFb4s9yksk/eCiuUeQoZAMCddAFtzDSP7YtCDx22pj0ox37V9ilxSiAYB3yJW6PYCz7DocC4yQjsJB9B3cfy5vPUCVBaXd2nZerR9SUNNaa04t4TpPmR37Ahqlv9IRrmHoW+HZKdxLljLG5szBUm5fGlxyKLaSTmxXRyh97rCdP70x5cctyL7IGB0oQP3o+nsyeADr6BxpQPw3kD0uVYV3kJHw6LOoXHZSx8FAgda/3QQxjBSehXdqOofJ0Nbj/tqth2q7Sl7qKfWGEU+DohIgmhsPQE5VegHPAVM2ONCaZr2bgFZ8Ncyjv6jPyxoTE4lLQrA2wFUbsPQeU3yC0L5tTGbQ+aaLgPxXjlCF52jEvtQPIAlSC2a09zIyIusrkXjmL1xx1FjQpSCV771Yyl/5ePf6SF2G0+J13kcJn12GMkubn+RHfEcJGCniAPlSRQ8Qlc8mq7AjKHSsbTl8ksphhs7MS2i0tgKwUIKSqVy0c9n4qSTVP0pxI6/fzVjVCOw/TNpsxG8NyJd4C9jsZgqOpPnsDOo/12kukIwONl6mSFESZkDiuNJtorgjZO2aWsjX6ElWUO7kWcG2iZPak6k470K6RJMPB5uLNZgqXTCJ+y306FZ21Lc5Hlnly2W8KJCuo8g0DVZGRYY/IUYyY7mWW3uO2oRKrzPiyP8pzpAeZhrR4EhhfqLHwSTxhNVR244u3KCc6rWIxlKTtPw1HGFL5X+1QrMvBTFwJMwnhHAaZ16cRny8V884nEK0vHyfEy3QOH5pqA== 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)(136003)(346002)(366004)(396003)(39860400002)(376002)(451199015)(6666004)(316002)(37006003)(34206002)(8936002)(5660300002)(4326008)(2616005)(186003)(1076003)(7416002)(8676002)(4744005)(52116002)(36756003)(6506007)(66476007)(66946007)(66556008)(6512007)(26005)(41300700001)(83380400001)(86362001)(38100700002)(2906002)(38350700002)(6486002)(478600001);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: deJ2msMoPQq6hYgN/nKdX98x9Fv78JaJijPSok7Y8S30Z5uh0R6CaApJJ4Hi4i5+g9ySi9OMklkPcJdmd1pi2ijG8kD7vm6aJe6uuImpShzJf/kuuRdZK8h8iXAsJr5Dc4IlzML7zCMny86Kqy28304Gim8hyF5bf7KB92XGdFO8msBARQnoTNaqC7Ejk+i8OlUoL8DCfBIVSwDXl8lFlR+G1Pcc+mEWOKbmG3x6JHdqah4H9id9VAtc/hrvY4DoTSoYVEfeL2pJwx4uXbazR1SAZJOBPS4A+Q++RFDot4kE2vf7sGfVs3sG3e+cv69X/YnrvuMXG6mbXmlV72r6cGB35/YrH38nTjEYhXfiQNybTys+gw0/uTWSzV3hYF2/OOr2G1oYdYh/bVqw0FOc8496xvEinklaI0pmRBMwGuRPV7CER59FkRPun0EUrKEBk/zIBtu0gjURAc160gUDByeK1cTfSgL0opTku29dgFJWauLpm+oIEOKOq2pC0f7YsYsUT+lzLmG2b+hFmCm/R6UrI7g1WT7vpYkNu5yHd1jkW43eVTHf+ZARSinVhnVHgWoQlHl3sYqKVI1JYceKWUJSF0pJjAwrgX8ZxEQf4fvUKwTvUu2zWds5nOZ24zxwMv37H8oSCGLWLRwLmKexmfvS7S1gSNVtC6tE6Dcgkpb3guz53gvgvTy9iSszsGlY57Wx0uBJ/OXCQfmcwkU/Ynp7dgr85hIK/SCrbuR2QXIVmMIxbAWQ/5zy2ZWMHuCYkuz/7dTYaDSePO1gFfj+FgsvHZ2oxwzFK1n1dNKxyT5tZ3cPnoddCluE3NZp9zm1pZhtR0JQ0bYccVUqz3zRAXhJeSQBAh+xmW/gY5RxmZ9m9qhpPz95ytyT97hbOhgpA83BYHw0IMiVupvT+pFFghPmviqEmbpBRVZC0mQJzOfniPRD5zfzMsHnkTP3bXFnDQkeOGN1BrcvjOnOkjm+FcQiF9aiP9j3+n45Xw11GegwIGlr4T2oOjlbuDZmnG/G1WDmKpq62TglEzKNMe9kPjVQBVb+8iYmWNVMh6pwpwpEYjaleSQ/d10aOp6PpjvCifd45fp0lPAMUYQ1bNbPuTKX/Hw7mAlISRawgZRn7ihh4tcvnLM8JjgxNVvh1n/SyT0KMphjk6Exzr36ukTZdeTAHxh8S5CtTFAkz6/KwoFU819cuQpjkw9EO27OamEb5sqyDTwRHyu2xq6YXwznxrhr3vl8iNo5thPrIoHRNFN5+XZWlRN7DYec/V9RCmNO4qCK7YQU7Gw7pnLfPqUbKk7pfPW7JcUskd+2itMYrOUHm3ZL/l8Ul7ZN0NNJMtCR7hpxXHwcopgqR0ZK15fuW42bzt5XBiQBSoPIlYqkj9j6HgungtiLZUqctCEahpy/VMUJETXphM7kiJkVaApoUmMIxQKg8C99iPZsxxKEGeVpfjZU6Kx2BNtDCVkbcY4Gbi8LHaKcCDaCAjXSKmf9fykjSB4Bq9QHLWrT6j8TKA/VvpxONVbpl/52TFhvIxf4nftK9uO/8ju/9Kx2ygTkd6zgPHQiXxY7RrChH2Zhmkw= X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: c2c542b8-bc15-4059-bf0e-08dab8fd22f4 X-MS-Exchange-CrossTenant-AuthSource: HE1PR0401MB2331.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 28 Oct 2022 15:57:38.2485 (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: mllHL661QRfa0Z4HSGBQ2uPvxOn4veiqlVkhbWPo0kNf4flUAO0i/rcRQByMFUxpCrJcVUvJSwCAqpg6OavlEg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM9PR04MB8323 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(). 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 Fri Oct 28 15:57:00 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Frank Li X-Patchwork-Id: 13023892 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 A4DEDC38A02 for ; Fri, 28 Oct 2022 15:59:33 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230008AbiJ1P73 (ORCPT ); Fri, 28 Oct 2022 11:59:29 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48004 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230229AbiJ1P62 (ORCPT ); Fri, 28 Oct 2022 11:58:28 -0400 Received: from EUR02-DB5-obe.outbound.protection.outlook.com (mail-db5eur02on2050.outbound.protection.outlook.com [40.107.249.50]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id BC538219FE2; Fri, 28 Oct 2022 08:57:43 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=H6ciNuXG6LXOGihgkWZVI0R2TYJXdyv2c9BN2ElJB+nTxMuFN1LBeyij3aaEirzaA6eOhwQrozE8LXLON7VDdb8fS/BCnn36svUmG+vaXq+854MAutsyLpTajoRXbHHcpxGkShzHDuTdRwYri4vH7/HFaUV5f2Yz2g+0MI195qKmcaA4K0JoKdVKhz6Z5ubFUk8+Toy2QlLUHM35l/VPmNbxpVeTqYnUpo7VCLt1/mI51fu5LAFcLbuH3iJBB8QNrf9bQpLs9RkbI8yiL3kfvEjwl1PKdBzdgPVQpmiI2ayeH8KnjLVy+u84AZOSLrb888qcZMpCByOfrFzlBavqPw== 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=QfqKjmRXfkbqfS71fsocR7ajWkM3hp3bLrQF/zSSm4k=; b=BSJ3CLx4cZ0LF5vz3JFCxWDE0HSezm6vHZuvNhFELKzNEPmsH+NFEazK3ieCsFDCe3kwcENgcpCcn9OeHuF14lC63lSC0PI0xf6oI+Io/mdBRHCz/VYGKjYFJYesV0WDyfpDPTTZDutKw1F9FWhcHM+huDeTjTveZCO8jV+l/z0L/kFTKkcOABrhwwKSDHrYwhTPH9mC07uLdCJDd0E98OmvVLhPmKGYVMZ79KfF6RLT0AOwGsnMPdOMf3s1mZ2RHBEqqgQ8zaTN1Z4H/QVtgjdE+Og5TijijEJC7eoOH8qIxOOnGL3n8EKD8NLgZZWnnmLu+KFnS9rP1ahyV7RSxw== 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=QfqKjmRXfkbqfS71fsocR7ajWkM3hp3bLrQF/zSSm4k=; b=r/mweWOkyM7fHxRGxCmxGOuN+TRmgQ44ihhcRGDtDBZ2cp9fqLYcdXq37+YzsC/+nHo2whiZvGNGBze80aN2JAeFFVJVOTiZ6mmvuKQtHg+9v+TlqBCrY1hKAzOdQYm2pldeReBKb1GAHPLTBwzuhOX6cPjkfpEPrZk4GfPlozs= 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 AM9PR04MB8323.eurprd04.prod.outlook.com (2603:10a6:20b:3e5::21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5769.15; Fri, 28 Oct 2022 15:57:42 +0000 Received: from HE1PR0401MB2331.eurprd04.prod.outlook.com ([fe80::44bb:8387:8f4b:6a28]) by HE1PR0401MB2331.eurprd04.prod.outlook.com ([fe80::44bb:8387:8f4b:6a28%10]) with mapi id 15.20.5746.028; Fri, 28 Oct 2022 15:57:42 +0000 From: Frank Li To: frank.li@nxp.com Cc: 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, mani@kernel.org, ntb@lists.linux.dev Subject: [PATCH v14 4/7] PCI: endpoint: pci-epf-vntb: remove unused field epf_db_phy Date: Fri, 28 Oct 2022 11:57:00 -0400 Message-Id: <20221028155703.318928-5-Frank.Li@nxp.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20221028155703.318928-1-Frank.Li@nxp.com> References: <20221028155703.318928-1-Frank.Li@nxp.com> X-ClientProxiedBy: BYAPR02CA0010.namprd02.prod.outlook.com (2603:10b6:a02:ee::23) To HE1PR0401MB2331.eurprd04.prod.outlook.com (2603:10a6:3:24::22) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: HE1PR0401MB2331:EE_|AM9PR04MB8323:EE_ X-MS-Office365-Filtering-Correlation-Id: 36ab77ec-6b50-44a6-a5e2-08dab8fd2541 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: zrpwZk9NWj52lwo773mFAseeiCvBHe10QmfP97v93HhVNI6yatIM7Gqlot7V1Z8FYTwkyLN342o3K1cboJ+MOrd4If23YXtpM4Sv7SZgaCbZ/lCSZg0XaoKmGDb2CMogJnTAP26jPcX+HPXr+5iv7PYAdmPqY0ww/0X+Kms7q6WRbX2QektidhrMawA2n/H+wQPIw9vcNDZQZuaW7PWu9uM06ePYyBt5HF6C2HuUlJuc5nuqVsNW2TswfsJUL00FH8hMkmxiheiCkWmM1b9V21phCTZA+Yoibam/h2l8EYwvLoH/q3QB+gStAPRrDZpftoq30BcydkpOqQ/cyHE0u0PugbrW199GdHQfZnAYMtFKS/dNspMdky9/kvEO1vhwKRA2+qqUmtIAbjCnzCkinHFb/3Vc/kFUjxKEj/V6anRsXyH2pYwBjVTS5Y2DI+BJd3JLbsxg93pVTyDjWrioCZ63ooee9vLCnR+LB3AB/im50k49QNkjJWQ9/9A1If3CCRREP1djtIuBJr2J2fDPPYWql9V3QUDzw6zgKCKOv6NdNvfY/UQJMETHiegLDcvWojCdoWfxX0bPMVb9+NnmQGetyWyrrhrlvTjaQCGrAhW7aoo2eDrwEWsUPyF59dfeDyB1LGVVYISyO0okgNZzPNUSMi/lLB/JugRQluAnjlsGwYOCw6qwjG2gpjGDJrDdOlDmOMI03pM/mOV524t/8TU84CTeCmDuWibz03jxMetylT0s18P4WHcgtd/d+Q9wZSIhY8TtQn456+bfrADE8A== 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)(136003)(346002)(366004)(396003)(39860400002)(376002)(451199015)(6666004)(316002)(37006003)(34206002)(8936002)(5660300002)(4326008)(2616005)(186003)(1076003)(7416002)(8676002)(4744005)(52116002)(36756003)(6506007)(66476007)(66946007)(66556008)(6512007)(26005)(41300700001)(83380400001)(86362001)(38100700002)(2906002)(38350700002)(6486002)(478600001);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: YAQr2m8pOnhZ4Me0nVeNc+7bjQvpQPPi4IgTF5DJ7RlSfw5RuPuFwZLwg+LE30gLMzD4nEtfvCOBgwEpVDVKk9Nfa00fOD6rOgnaMfmTczt2UoPtls26uq0OaJSDiQiYM6VlnD2d61t9kD9122MBg3GAeJ7P4sASjppupkjKhOUPc+yX/e17QPigif74fGQVgyCDRkyz4nAGChP5WM+VIva0xAVnNY3jkdZxeLyCJAKKcsvq80/Z9nPvptOESS2I75Ubbc9rGOfBnOo69rNHKa5YM6cacpPNti/b7vaM920Drp7ScjeOmPTqjRL86qth51W3ns1Rv+/btxskyBLPOrKTaOpVXAmqyrj6dCTPbTrpKz/HGDVCOlPDWV3QDxk1jiIjcN+qBVp6Nm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HQDdZ79kPwmzLHYZ1bglhLMyyBMTyrzjg9Rdv5tq/F9Bgo1aq/kkB9dpZm6PT/yFKSCI6k8K7vx2qKN32CRcarPcvgpWshQzVFX4d65z/E1kg= X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 36ab77ec-6b50-44a6-a5e2-08dab8fd2541 X-MS-Exchange-CrossTenant-AuthSource: HE1PR0401MB2331.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 28 Oct 2022 15:57:42.1080 (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: QR8JeKU3nnEzcxPJoeeYQ7d6JRESWjqYpRcA8mluYkYMRA/419zP9fBt0w97WsRUcKiG6V0pBB1bTEag964kKg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM9PR04MB8323 Precedence: bulk List-ID: X-Mailing-List: linux-pci@vger.kernel.org From: Frank Li None use epf_db_phy and 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 Fri Oct 28 15:57:01 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Frank Li X-Patchwork-Id: 13023893 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 312ECFA3742 for ; Fri, 28 Oct 2022 15:59:43 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230323AbiJ1P7k (ORCPT ); Fri, 28 Oct 2022 11:59:40 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48612 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230417AbiJ1P7A (ORCPT ); Fri, 28 Oct 2022 11:59:00 -0400 Received: from EUR03-DBA-obe.outbound.protection.outlook.com (mail-dbaeur03on2053.outbound.protection.outlook.com [40.107.104.53]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 23E7D21CD46; Fri, 28 Oct 2022 08:57:48 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=J9VbPvD3wGvJOQYsNXGVklno06CEYFq6aXMUY4Eq9lR9vsrbZ9c/HFOMOWlnAIt/VxgCWjV5zm/j/GsUY7Ty2z6DviQ6AaKBtFbVumPWP0FTZn7aKvDsNcTdvpLD6LiE/W9CBqKq5SG2LEAhUCKFi4JvLGIVvWgq510sy2y4EkykzYxqTecR9yxhSvowjo8X7YH3iQneiarmnp0EEUSUh4ybHT6IGZ3mf7c9aNEh4jwRWuDORrbPsR3h6xVFe3rMdiyLWIltcQhbqJMACtAVfH/jxIDAh7wuyrVp9aL93gJYnnh4eDSwX7xA4KkOSQQZzIaWZntrv64V3rOVij4WSA== 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=e7rFAgLLE8DgxLzFxypT6h/aMZ7/AGzWG+1ThOcYzlQ=; b=WEtztqkD2xgBrjs7tZo+eJmOWUEH0qSrKJD4AqdCHIKIBoYF3M4mEYY8rk9lAzKj80jsbi+O2w2OF3HMVIlalz+c2Xh9Ow5ScEvAMS7wDete9nGV1DdqgrfNQO++OiSBY+EWpQgwrZoBlBwkyEXhx/Ou06KeerPGQVn8QitdZQW/cO6GMPdG8bv8EnoBc+bwRd82z/KOCbe2bhxZLuGKbx9YGIiIZIjH6hs7iKwx+CYM9UJ5mOi20aE+fIgzAX1fBM9iSZch/kFxoUobm2TLuoPgw2N3hx3489ua6QMlYemGQD/OzMWBxt3VoPURCKuu+mc/okKcoNCSTzTWjuqNXw== 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=e7rFAgLLE8DgxLzFxypT6h/aMZ7/AGzWG+1ThOcYzlQ=; b=XIcofmhFu/25nSIp9SO8HuKsUbtTAPAIiwAyfN9k5lI0/ODTcF9P3yh7OpyrtaTegFEIIUYjHHucTU6NIno+C7Fy7ug3hwF9XcIlOMuCTvRR+31kExAa5tRo2sKaJCyh+zxH+YV+aP+Vo1a2g4NO0ZPOR9CcLWCwxP/XW32TciY= 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 AM9PR04MB8323.eurprd04.prod.outlook.com (2603:10a6:20b:3e5::21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5769.15; Fri, 28 Oct 2022 15:57: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%10]) with mapi id 15.20.5746.028; Fri, 28 Oct 2022 15:57:45 +0000 From: Frank Li To: frank.li@nxp.com Cc: 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, mani@kernel.org, ntb@lists.linux.dev Subject: [PATCH v14 5/7] PCI: endpoint: pci-epf-vntb: replace hardcode 4 with sizeof(u32) Date: Fri, 28 Oct 2022 11:57:01 -0400 Message-Id: <20221028155703.318928-6-Frank.Li@nxp.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20221028155703.318928-1-Frank.Li@nxp.com> References: <20221028155703.318928-1-Frank.Li@nxp.com> X-ClientProxiedBy: BYAPR02CA0010.namprd02.prod.outlook.com (2603:10b6:a02:ee::23) To HE1PR0401MB2331.eurprd04.prod.outlook.com (2603:10a6:3:24::22) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: HE1PR0401MB2331:EE_|AM9PR04MB8323:EE_ X-MS-Office365-Filtering-Correlation-Id: 075b4988-f553-427a-8ca6-08dab8fd278e X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: UpoFVPJbbOsb206snh7r+2lNlHZLqd1OoySePfJdY/EMU7Rzvvt7wXnmIrKiDTlEuM45s+nQzgWnX5QU/q9s0RBb0tT5BICP3h8gZdyuoLvpq1evbndtRdEetoFs/SN6YuSlbd3mCzS+bSOawzIBtE099kBK9X4bZyCBwvGs9W9stAC2af/oWn59kCXtKlM//yW55WHH0SGA1KXueweJc61es2JrQeELi921LYT1zEqfZvoJ3uNvtgtfJvkaHCk9X7aLfatzmWnOZDUrsbC9/T6/55QiOdAeLhVxigwcU/1PuAzr0JMnKNv5JKcTVthP48S4VMiCVlzTU72rKdR7rc41lmYz+Xt/t/sQ4wVxrn1Pfc9aL1Yk5sVajHXRr1qcnawyVbxw/Dm/bcq6XGX2LPOMAZf6kWPP0tpKK9l2dFDTK8Fy5OiGPfNZWviXF/cqVF3Fw/YecipDdVc25dpwuIlZOTpS9AJ2bXjkUvn08GcGmSVYEQWPPay+GK3LzHdSUaEBTD1y/AY59gq62/cIp/vTW/hfDFHLaUWDAzYMGjIQ+S/Psnh258u+fUOS4DCG+EiivMU4ew+R5qxDx1NBoHOv3M3XElrwOdytErIFpuZ/8DWjGEELN+EWSm3zPmjMbVSGAikNmnao4WDgHiIJLqRwgsgwevrWsJdLgd/qM/DZkCQTkE9L8Fl0Oediav3xyHhLXQM1JDuJPtAry6t1Jnf9+uOGz0wsyqOEs3Ie1Ohf5FQeeCHttHIbsByFjRkb6WYNCajqRYRw6ld55ekZYw== 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)(136003)(346002)(366004)(396003)(39860400002)(376002)(451199015)(6666004)(316002)(37006003)(34206002)(8936002)(5660300002)(4326008)(2616005)(186003)(1076003)(7416002)(8676002)(52116002)(36756003)(6506007)(66476007)(66946007)(66556008)(6512007)(26005)(41300700001)(83380400001)(86362001)(38100700002)(2906002)(38350700002)(6486002)(478600001);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: W/bG23VMqS4raFLFF0POdak/KhfEv5VX30ge6L7Ifo0U0+YxeQeVpRafRAZSkjpdxfAcN0CPwOWN5JkW9TVBMW75RYkM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KVa2ineDgw9sLBYFDnSEAikQYB3fQu1lIuKMR7pw+t5SvrbQKUtFMAcuzUvC3tBrBpYY/1f2dDcdftmN6hxYKMSTJB5M3VbzD+3w5dF0K9HCLH6ntzczHcMXaHTruPZ1hmCg0Hraifn4+BHekwEM1kA+IXN323uIIN/upPSzm6YDy1xICRDztN6u+Yux/OpBoZETEZZU8BaxOq4V+TTpx8tnAd+fbe2kkw1yGujPDqd/b4phHOCOM2o4hX3f39FpBqtQaAON/r8WiMzaM0+Ubxp+q8GpyfuvShC9Haaon8GVEdpsBd3plhNMu8LsEL1X7qfDp6753rza8sSKL07G49o/Js+amiDJsfQjnTrvqGSn9tZKbKs6t29761zf5ty4V/2BLq5sEw0lz+ny9Yx3rbCnHTNAwCRzacFKQK38NqOF0= X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 075b4988-f553-427a-8ca6-08dab8fd278e X-MS-Exchange-CrossTenant-AuthSource: HE1PR0401MB2331.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 28 Oct 2022 15:57:45.8424 (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: 7UuL1JoszslJGU1mmpajbThQuHuulOEFJYwO2qxXxC1x2ajwFN7mZHmpZ2+mnbrDekwNEKFoVDpAzP+jSKv8yQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM9PR04MB8323 Precedence: bulk List-ID: X-Mailing-List: linux-pci@vger.kernel.org From: Frank Li ntb span 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 Fri Oct 28 15:57:02 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Frank Li X-Patchwork-Id: 13023895 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 E0B2DC38A02 for ; Fri, 28 Oct 2022 16:00:48 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230238AbiJ1QAq (ORCPT ); Fri, 28 Oct 2022 12:00:46 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49304 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230461AbiJ1P7E (ORCPT ); Fri, 28 Oct 2022 11:59:04 -0400 Received: from EUR03-DBA-obe.outbound.protection.outlook.com (mail-dbaeur03on2046.outbound.protection.outlook.com [40.107.104.46]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id BD4DA21CD49; Fri, 28 Oct 2022 08:57:51 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=cxbYpR/F7j9rqLmAZcGkcFrhF/bX3S9u+uYKWaGSkXiFDsyzEkLSsmFJjLdBFEPI9ttkM/W2iTs0lNw8WAW0omssLY66Kq4PoKCfBx5HRegrO5PLkXZzC2teGODvyM3DGHOqVj1KmYMtmPfEfgRyoFT1GjtgCMgCO5zSwzb5r1UtAG59LyYkkWmJ9iRsTi4Oo0EIkXen0d62h2NrI56fh+nCabDT/VQAxZITtWujjKK/63JfShx8q/3HYp5StydK7KkjSTuT7VGFhNrJUc7CoFU5mMyK5yNMecSxDhd0Ou6P/+WfepZai2XEa5ZFjN0oIZpbCbQ+3h2VNi1VFX3imA== 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=ISp0+2tC4tqTg7n9XUBvv+tk4luKaKnb+U8EtfJbPY0=; b=m7zRTJCVfqGIegqJwPictk5rqAJF+eKsW7VkfBic1pDI3RMuK64qrtkY7jJvlhvKXWBy0EMV9PgzbQ1Hb8mvQO67tct0D14UtOxdRecLHK4mTviZjfJFCSGZJ7zgy5hm8m4JONO8Thk38YMew3oFeDmm1wDzJZ+7jSFDpswvulKFVINf7lRBvkFlBNVx5UVgulEcRfkgdlxpHzrng0jg4C5OyBRuKDeyBZ9HcvFy+h2Wi1VI2S8ydau0ySiFKpgWzdrHukfHAlIylaCz0CKe24hlkPZa5z8lYAkyesy4CG9DzjyhyN/0kpV+lIL2q5ZGLZud+tb92fQpxKFH9lbCiw== 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=ISp0+2tC4tqTg7n9XUBvv+tk4luKaKnb+U8EtfJbPY0=; b=Fqznp7BT0vADP0TwQO8/TE1vTA6dsE5lOESBTZ/cQjQncG3eI7YmXqWJsYO6+AiOZvakToB8EwODWOEO2krcdwDNL0Rkz0OLq9cExr4wj+3AaWHvA0AvhIdJN0CxYN3myOoino+0tn7Xr+zVKYvD8jKMB+7JyQXdXDxvZB/sgk0= 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 AM9PR04MB8323.eurprd04.prod.outlook.com (2603:10a6:20b:3e5::21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5769.15; Fri, 28 Oct 2022 15:57:49 +0000 Received: from HE1PR0401MB2331.eurprd04.prod.outlook.com ([fe80::44bb:8387:8f4b:6a28]) by HE1PR0401MB2331.eurprd04.prod.outlook.com ([fe80::44bb:8387:8f4b:6a28%10]) with mapi id 15.20.5746.028; Fri, 28 Oct 2022 15:57:49 +0000 From: Frank Li To: frank.li@nxp.com Cc: 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, mani@kernel.org, ntb@lists.linux.dev Subject: [PATCH v14 6/7] PCI: endpoint: pci-epf-vntb: fix sparse build warning at epf_db Date: Fri, 28 Oct 2022 11:57:02 -0400 Message-Id: <20221028155703.318928-7-Frank.Li@nxp.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20221028155703.318928-1-Frank.Li@nxp.com> References: <20221028155703.318928-1-Frank.Li@nxp.com> X-ClientProxiedBy: BYAPR02CA0010.namprd02.prod.outlook.com (2603:10b6:a02:ee::23) To HE1PR0401MB2331.eurprd04.prod.outlook.com (2603:10a6:3:24::22) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: HE1PR0401MB2331:EE_|AM9PR04MB8323:EE_ X-MS-Office365-Filtering-Correlation-Id: e35caa52-4f82-41a0-6359-08dab8fd29c8 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: BDrlXnMeUR6PEJ4nsiZnaZAw5G2NE3mKxw+BswJr6j/wZymrRTPrOk0IruGfvjtwsaey0EH5/flPpLcqV8jhh8CdmQCmjzPB2R00m210D5A1T82+YtFjo87/S+6n85TqZRfbgiK53yghy+UzGETEBfk03QrYU0y8zPI8/F01u89RhlNKr8ruw5iE6dGAi1RorxDPmIijuU8m71qbaAm5KaO5wVNKvcxm7mzAqfE3uFm2hKER1wjUnVU0b34QxdPn5mFEPhIfrSGoEIiTWxOoJMqZFE9GBK1Fipbh1yA/5QDtHBuvo2Hz+WuX9OPFb4gTi/sWI/3CeDNLAgqISbbioeI9b+9BxUrR6b8OpZaqMu/Gu2TEinyNqetv+HilrASTqDeJysEtTD5IPjAT2W3y8u3nQTe2csOR0EZbi5SiM+dNeZFLqTDjtSa3Hq+8c1d21M3TyfpgCDpxhV2EKwrp4sfoYn1+m6bcHYP80SC3NXeBCEKfe+jsHF4bXBHUn4eP3W6WMe4DR+q4KQC4APLfm0ftj619b7XKokJxMZn8qmjQY69AQqzPthM1HMUvaC9YbVSGH6275P1ZoS67KiPYMipuKOnGL1K5TQIwh8z/f5OCHjeQZXiZbinef7md3UsNE8DoWaLTku2YGpeWlqwZMweRPhX9h1fzonG7Jzqs0MikayAP1j3fhWVtKK3bWjA/9ObCtJd7tbKxNo+q6LZSqu7/PXL7zvmcYSCQWT7hqh11fibuujXNH2rsvFg8o43xlu6HJpU6jOMqEhMV5k2qoQ== 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)(136003)(346002)(366004)(396003)(39860400002)(376002)(451199015)(6666004)(316002)(37006003)(34206002)(8936002)(5660300002)(4326008)(2616005)(186003)(1076003)(7416002)(8676002)(52116002)(36756003)(6506007)(66476007)(66946007)(66556008)(6512007)(26005)(41300700001)(83380400001)(86362001)(38100700002)(2906002)(38350700002)(6486002)(478600001);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: pEGKrOd6yV+FxK6qvvveABchbCdq0uOTaZTW44XQts4wzGImg544Bo2P5zqWg2vGKGK1VCz+J+2mpn0dsOJt0wXbcz0CndogwdqJVDkCJOA6FomkEp1z1/eWUhmk1RNTA9Eqfq9aQqliriIfGJem7DU8UrdssslaxcUgTWI4rKiB5p5fN1byWgFx8PGjsONrt10pcxof4RHJN1DW+6olb4r3RmeTTsMTXx7WTuSrXxpe2wWCaY2kgnci8C4BJCuqEFk4gvWFg+QjPAcR5jCgCV9uKhaTCbEsecpn/zO82coMdkKsBAhA82628QbcTZNM7fWL53FNxxT5eJIs3oKf2KQR72RsNaB+Lb756nWd12Ma0TN1Y8b9ytyg9rbQTsxyZDxLyLxaqPD6cI5yJ8mFy1vCoeEm6r+atHY/2zj46XtpIa3rGO1RlOP064NRDNyZB6UW3J82+m/vL3Y8H8dOORhgUU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uaY02ik= X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: e35caa52-4f82-41a0-6359-08dab8fd29c8 X-MS-Exchange-CrossTenant-AuthSource: HE1PR0401MB2331.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 28 Oct 2022 15:57:49.6862 (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: fbfMMjdriX4L8qHmYvwhsErmFdarJ72NluRdSbyD3sOF993Hqk9bij5wHYXa63rJbkoAE7tWy1eaGy7qywG+rA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM9PR04MB8323 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 | 9 +++------ 1 file changed, 3 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..db3455c1589b 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,9 @@ 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_event(&ntb->ntb, i); - writel(0, ntb->epf_db + i * sizeof(u32)); + ntb->epf_db[i] = 0; } } From patchwork Fri Oct 28 15:57:03 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Frank Li X-Patchwork-Id: 13023894 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 3AA11ECAAA1 for ; Fri, 28 Oct 2022 16:00:47 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230060AbiJ1QAo (ORCPT ); Fri, 28 Oct 2022 12:00:44 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50632 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230460AbiJ1P7E (ORCPT ); Fri, 28 Oct 2022 11:59:04 -0400 Received: from EUR02-DB5-obe.outbound.protection.outlook.com (mail-db5eur02on2067.outbound.protection.outlook.com [40.107.249.67]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9D22C21CD61; Fri, 28 Oct 2022 08:57:55 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=b2JMW1zYqOhLEa0+aSSsy+DfHAiw5Gw0PiiScvMTpKIvchoTzZWxrwfx6qBaP9arna8rIaamMfdgZmogKl62bqn/Jq0tUN3x8b8Ehqf4w0O0evxAPRDR4SP903YoaoWLoLq+np+AePUFVtNI5od5kQWWsWirgOsS5hEAK1pnCusaYnFZLz5woalUzb5GES7mp22grkxaSeIV0maWJdB1ViTlnkHSfxrTW3a3zlvqZ3RgmJA009CZf3FSl0aXrIjX5I9dBdR0qpZ5Kd0frq0D7JiF3ECyNIb91G73+3jRcQ8BQ5EhJ6XN58tzIR5Qrqu38YyhrllJuVlyyEoIx8+vOg== 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=3qTLObPZYQoAp7sIAf7mRsGpATwWKqn/VhwZAPD//lQ=; b=aBys9l/s21q/w6n+635kCi1+EXpBMXCNNvOqlB1v/BwNKAvUwSK/Hu6Op/Z2BC8po9gSet94dXqJv16HY0r2YiEuO/socklW51t8e5rIVjjT89Q1kgdBYDyikqgxO05gIVxu7DX7BtYoRFWn9HIJoEWFA1Ie9jzX229Tx07pD+WI1MGupxGD2IQHiwABbo7stdm3gRwPgKu9bxhr7VlFGAlNkfEydRItLHs0z+iVKNZYXTa2UFmfmHBSnpZhnebF5B4zGz+MeXIo0zPjmq6ViQeTyV9JqxVpO3ug4FQW5oJJXgO7WmpFG84jiZ/xie50I0Oio+54OrdOn4JrH1/Z+g== 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=3qTLObPZYQoAp7sIAf7mRsGpATwWKqn/VhwZAPD//lQ=; b=FJlwNHXkunkP6vqX14ElRx0lvfR+kgtpKdqsbttVo8lwIsKZgeKIYENCkVhFKP8NbYxGd+ayGHBbehpYA7AUIhJ9PGABmg1QW2L1I3+wHaZbswq6J1m1dFb3dtBfagt/wB6MT8wxln6IuK/7tQFvD2W0jAiDCGAM+6nOPf9ztis= 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 AM9PR04MB8323.eurprd04.prod.outlook.com (2603:10a6:20b:3e5::21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5769.15; Fri, 28 Oct 2022 15:57:53 +0000 Received: from HE1PR0401MB2331.eurprd04.prod.outlook.com ([fe80::44bb:8387:8f4b:6a28]) by HE1PR0401MB2331.eurprd04.prod.outlook.com ([fe80::44bb:8387:8f4b:6a28%10]) with mapi id 15.20.5746.028; Fri, 28 Oct 2022 15:57:53 +0000 From: Frank Li To: frank.li@nxp.com Cc: 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, mani@kernel.org, ntb@lists.linux.dev Subject: [PATCH v14 7/7] PCI: endpoint: pci-epf-vntb: fix sparse build warning at ntb->reg Date: Fri, 28 Oct 2022 11:57:03 -0400 Message-Id: <20221028155703.318928-8-Frank.Li@nxp.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20221028155703.318928-1-Frank.Li@nxp.com> References: <20221028155703.318928-1-Frank.Li@nxp.com> X-ClientProxiedBy: BYAPR02CA0010.namprd02.prod.outlook.com (2603:10b6:a02:ee::23) To HE1PR0401MB2331.eurprd04.prod.outlook.com (2603:10a6:3:24::22) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: HE1PR0401MB2331:EE_|AM9PR04MB8323:EE_ X-MS-Office365-Filtering-Correlation-Id: 7d0791b3-0e2b-4f8f-a9b9-08dab8fd2c17 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: eebcoRqqlVnPDNBfEx7u1pnb42pfrROLtrYYahkOaHVKrAYp2JHwXk5QCUnu43NZVDzpZoQTvHswcEppZ1nToJDr3durM3SeU6GfxpaOvnO7cVMTzKgVW6BWFsmJQFUBsLwfD/LIBGwNxgT5IKle5rjUfRa6bzbVwCRlkvzQTtpTdQ5fwtv2Kf8ADOFO2I+zRxbPjf/PxxKNLjQFTyAYmZVLFnr3DpoedcOE5/lJrIyLj4nBKRjzN4AP14GjjXuI8OHES7V1aaGhARksEZBMkfzbOsUGagV3yKyFiEneBJAGTXpX8yYyKdXfipYH5q+fiMh0m68IdkUgeMC1PIx88wOe2lVhWIBOuXByFsS2AixLlGFxJUt4Ga9/hCYG8m/IEZiA2TKyVhea3iIlqXp+3W1Upv6HHaL5JhugS8QQiAW+BINzvZq7JT2g1pjk8iKK9yHPwdOM3xS+7ChoF1A5HzThq5rnAhISvm6p7LbZL67NIHgtU66PaftsEHd4C1IjsW61C6/tymDaFcL3DTIAxMAqf7e9O+x8598M8esMZmSH6wN34UaJ1zRtNOzrXAGr4odrgvAgVy902RREnmwCDGB2LwTZa8nsgOJqMSJcUBtY2QGoyK/jobwKb9K36xH0KOrlUl4kbp7qlPRzE27ETdLvhTJhZFatE44n+CLo5eEIArWukPVzNb2dz6/RdvWFhpkBDKi5KN2m7NNdA3kp55tTBKvTqwW9Rat8DXnmY007AbHv+bU6RGovEF/CVLTbfP2JkBqzHUH8qTXTu62FJA== 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)(136003)(346002)(366004)(396003)(39860400002)(376002)(451199015)(6666004)(316002)(37006003)(34206002)(8936002)(5660300002)(4326008)(2616005)(186003)(1076003)(7416002)(8676002)(52116002)(36756003)(6506007)(66476007)(66946007)(66556008)(6512007)(26005)(41300700001)(83380400001)(86362001)(38100700002)(2906002)(38350700002)(6486002)(478600001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+27USkJUiE6NUJZv4YRcJd5xPiMPIHGa1u66eyHJW6fwglSQ8Yefm2/wGVzc4KU7SxhKfsi9KpN9jw5FU72KkIol0US5EA7/ih9VxNEOSfFyJLKMr2lJDABmQqgNjdnXaRRF1KI9Do7BqeV/ReAo8q47xJ4JzjE4CPt5Fg8H4sIQlV4E2v4iDZGHCS8kgqU2cAosP0Nk4a8P74h1gxHHiXBp9JEizPL43gROP3nbDTMefYfWlanPuXUKqNA5KYA15rlOx2Z9Y2r+UkGzn4dLMYLJLnOFghvWxhMs4p1Pty1D+ADX45ffon44FYlaHUuX081enBRVnvE6+AIGd9L0E6rF9Ik09fMaNjvwYu5kB/6qfXzMt4R/Q9ODahdUIDGeBS5IwSU7/LMjZREs8hYAdDhAsZBSRqQDcaSAut7Us3mKh6xCeYjztnGRtyUIe7Wr3CU9/CruUUrYOQcayu4Ak5vjvtAtOR6TQXJpZqq/X/KoYBho1Jc/8JyCw1s6q2epcjVSREJu1mBgomEr6GXTuvsOKCgDV5zk97qZUePSTqLMXWD6Mnv8= X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 7d0791b3-0e2b-4f8f-a9b9-08dab8fd2c17 X-MS-Exchange-CrossTenant-AuthSource: HE1PR0401MB2331.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 28 Oct 2022 15:57:53.4206 (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: Bp8/kq5a2D0TA8Jf/12e48ZKHasLuvAVv9v6/vvN+71gJxPVvmplBrXtDK/JyXBx7yhcGX4wyaAuVpHiuxbT7g== X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM9PR04MB8323 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(). 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 db3455c1589b..55b7599345c6 100644 --- a/drivers/pci/endpoint/functions/pci-epf-vntb.c +++ b/drivers/pci/endpoint/functions/pci-epf-vntb.c @@ -1120,7 +1120,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; @@ -1131,7 +1131,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; @@ -1142,7 +1142,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)); @@ -1154,7 +1154,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;