Message ID | 20221028155703.318928-4-Frank.Li@nxp.com |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:6687:0:0:0:0:0 with SMTP id l7csp910319wru; Fri, 28 Oct 2022 09:01:12 -0700 (PDT) X-Google-Smtp-Source: AMsMyM7dja+gdte2ggNfGhczJkv5uryk9O3hX8Zpm8ccC5HnUDPW4mp2CH2m6b70MvuaLe0y3KPw X-Received: by 2002:a17:902:e5c1:b0:186:897f:b8ee with SMTP id u1-20020a170902e5c100b00186897fb8eemr5124plf.151.1666972871931; Fri, 28 Oct 2022 09:01:11 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1666972871; cv=pass; d=google.com; s=arc-20160816; b=MqZbQX7miLg9mGqvQpFpELaIYKOYVr48ta4HbC2vrOELlC6M5Q9EyHS3ZndpRFDbdv 8rRN3ATvDKSjT2Wg+Y6BeMp1Q8YLkH8MjoWx0CVxzeW5KLyjaOHVWLsG38PU89JFcQCf M1h6iBxWo7y+8O56P2DFieb4Fv1IE33jOaOuhIDNy/O7e1gCC6+aUzEznCU/S3AZ3KTs cXA3QUrq9UKsTAr59KdFnJS7UtTlzXUzjwx6xIxsDyYMNSxoYgNjmKnVlEpX5eitlLaP fJ+/h2tBqTcsJjYK5Ba9cs2zM311XA2SnyUFwwaVKimejypcrY02Er6gD57xPM7Oomgs 5PGQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:content-transfer-encoding :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=pyD6aoIjEVUqZqDnSZCuVf6c3XoOXvPwpCEPm4asbEs=; b=fV6ycYU104B+zlly923pa/lU6JYzwh9D99EPUb4oztBb4MotVQEjkc+yaIpzgpo9fY eCePlq6qW1FgWJtINMvz0fzdONCetqUKmsu54dqfcSYJXwNyux4fR6It+f0JRl0re/QW JTxwm2TswGBD9hajUOT0YhNjInma7o16OrllNEehGkkyPrFyKUKC2Rjk4+rg+LF/RqBD IVbTY4NmhESCMV+rp9m8jEXoNBkqynz2Dosow/RJ3rl4tQeWt/cNJrZ7OPdIRHVH5Zpk xjjsOT/+HN2zSyrm03rtQMhOmmwToLFAk+PgiQrmZEBh9rrwUKGqXe03lDwS3ZTeUkx+ 56UQ== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@nxp.com header.s=selector2 header.b=FwCH8lvn; arc=pass (i=1 spf=pass spfdomain=nxp.com dkim=pass dkdomain=nxp.com dmarc=pass fromdomain=nxp.com); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=nxp.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id e3-20020a17090301c300b001787f1922a7si6965706plh.19.2022.10.28.09.00.57; Fri, 28 Oct 2022 09:01:11 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@nxp.com header.s=selector2 header.b=FwCH8lvn; arc=pass (i=1 spf=pass spfdomain=nxp.com dkim=pass dkdomain=nxp.com dmarc=pass fromdomain=nxp.com); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=nxp.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230358AbiJ1P7p (ORCPT <rfc822;chrisfriedt@gmail.com> + 99 others); Fri, 28 Oct 2022 11:59:45 -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 <rfc822;linux-kernel@vger.kernel.org>); 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 <Frank.Li@nxp.com> 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> Content-Transfer-Encoding: 8bit Content-Type: text/plain 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 X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2,SPF_HELO_PASS,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1747947746400879639?= X-GMAIL-MSGID: =?utf-8?q?1747947746400879639?= |
Series |
pci-epf-vntb clean up
|
|
Commit Message
Frank Li
Oct. 28, 2022, 3:56 p.m. UTC
From: Frank Li <frank.li@nxp.com> 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 <frank.li@nxp.com> --- drivers/pci/endpoint/functions/pci-epf-vntb.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
Comments
Hi Frank, I love your patch! Perhaps something to improve: [auto build test WARNING on jonmason-ntb/ntb-next] [also build test WARNING on linus/master v6.1-rc3 next-20221101] [If your patch is applied to the wrong git tree, kindly drop us a note. And when submitting patch, we suggest to use '--base' as documented in https://git-scm.com/docs/git-format-patch#_base_tree_information] url: https://github.com/intel-lab-lkp/linux/commits/Frank-Li/pci-epf-vntb-clean-up/20221029-000245 base: https://github.com/jonmason/ntb ntb-next patch link: https://lore.kernel.org/r/20221028155703.318928-4-Frank.Li%40nxp.com patch subject: [PATCH v14 3/7] PCI: endpoint: pci-epf-vntb: fix call pci_epc_mem_free_addr at err path config: ia64-randconfig-s043-20221031 compiler: ia64-linux-gcc (GCC) 12.1.0 reproduce: wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross chmod +x ~/bin/make.cross # apt-get install sparse # sparse version: v0.6.4-39-gce1a6720-dirty # https://github.com/intel-lab-lkp/linux/commit/20ecc991a4fdac34a3b4d75fb03624292f3748c6 git remote add linux-review https://github.com/intel-lab-lkp/linux git fetch --no-tags linux-review Frank-Li/pci-epf-vntb-clean-up/20221029-000245 git checkout 20ecc991a4fdac34a3b4d75fb03624292f3748c6 # save the config file mkdir build_dir && cp config build_dir/.config COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-12.1.0 make.cross C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' O=build_dir ARCH=ia64 SHELL=/bin/bash drivers/pci/controller/ drivers/pci/endpoint/functions/ If you fix the issue, kindly add following tag where applicable | Reported-by: kernel test robot <lkp@intel.com> sparse warnings: (new ones prefixed by >>) drivers/pci/endpoint/functions/pci-epf-vntb.c:556:17: sparse: sparse: incorrect type in assignment (different address spaces) @@ expected void [noderef] __iomem *mw_addr @@ got void * @@ drivers/pci/endpoint/functions/pci-epf-vntb.c:556:17: sparse: expected void [noderef] __iomem *mw_addr drivers/pci/endpoint/functions/pci-epf-vntb.c:556:17: sparse: got void * >> drivers/pci/endpoint/functions/pci-epf-vntb.c:574:38: sparse: sparse: incorrect type in argument 2 (different address spaces) @@ expected void *addr @@ got void [noderef] __iomem *mw_addr @@ drivers/pci/endpoint/functions/pci-epf-vntb.c:574:38: sparse: expected void *addr drivers/pci/endpoint/functions/pci-epf-vntb.c:574:38: sparse: got void [noderef] __iomem *mw_addr drivers/pci/endpoint/functions/pci-epf-vntb.c:590:41: sparse: sparse: incorrect type in argument 2 (different address spaces) @@ expected void *addr @@ got void [noderef] __iomem *epf_db @@ drivers/pci/endpoint/functions/pci-epf-vntb.c:590:41: sparse: expected void *addr drivers/pci/endpoint/functions/pci-epf-vntb.c:590:41: sparse: got void [noderef] __iomem *epf_db drivers/pci/endpoint/functions/pci-epf-vntb.c:1127:33: sparse: sparse: incorrect type in initializer (different address spaces) @@ expected void [noderef] __iomem *base @@ got struct epf_ntb_ctrl *reg @@ drivers/pci/endpoint/functions/pci-epf-vntb.c:1127:33: sparse: expected void [noderef] __iomem *base drivers/pci/endpoint/functions/pci-epf-vntb.c:1127:33: sparse: got struct epf_ntb_ctrl *reg drivers/pci/endpoint/functions/pci-epf-vntb.c:1138:33: sparse: sparse: incorrect type in initializer (different address spaces) @@ expected void [noderef] __iomem *base @@ got struct epf_ntb_ctrl *reg @@ drivers/pci/endpoint/functions/pci-epf-vntb.c:1138:33: sparse: expected void [noderef] __iomem *base drivers/pci/endpoint/functions/pci-epf-vntb.c:1138:33: sparse: got struct epf_ntb_ctrl *reg drivers/pci/endpoint/functions/pci-epf-vntb.c:1149:33: sparse: sparse: incorrect type in initializer (different address spaces) @@ expected void [noderef] __iomem *base @@ got struct epf_ntb_ctrl *reg @@ drivers/pci/endpoint/functions/pci-epf-vntb.c:1149:33: sparse: expected void [noderef] __iomem *base drivers/pci/endpoint/functions/pci-epf-vntb.c:1149:33: sparse: got struct epf_ntb_ctrl *reg drivers/pci/endpoint/functions/pci-epf-vntb.c:1161:33: sparse: sparse: incorrect type in initializer (different address spaces) @@ expected void [noderef] __iomem *base @@ got struct epf_ntb_ctrl *reg @@ drivers/pci/endpoint/functions/pci-epf-vntb.c:1161:33: sparse: expected void [noderef] __iomem *base drivers/pci/endpoint/functions/pci-epf-vntb.c:1161:33: sparse: got struct epf_ntb_ctrl *reg vim +574 drivers/pci/endpoint/functions/pci-epf-vntb.c 523 524 /** 525 * epf_ntb_db_bar_init() - Configure Doorbell window BARs 526 * @ntb: NTB device that facilitates communication between HOST and VHOST 527 * 528 * Returns: Zero for success, or an error code in case of failure 529 */ 530 static int epf_ntb_db_bar_init(struct epf_ntb *ntb) 531 { 532 const struct pci_epc_features *epc_features; 533 u32 align; 534 struct device *dev = &ntb->epf->dev; 535 int ret; 536 struct pci_epf_bar *epf_bar; 537 void __iomem *mw_addr; 538 enum pci_barno barno; 539 size_t size = 4 * ntb->db_count; 540 541 epc_features = pci_epc_get_features(ntb->epf->epc, 542 ntb->epf->func_no, 543 ntb->epf->vfunc_no); 544 align = epc_features->align; 545 546 if (size < 128) 547 size = 128; 548 549 if (align) 550 size = ALIGN(size, align); 551 else 552 size = roundup_pow_of_two(size); 553 554 barno = ntb->epf_ntb_bar[BAR_DB]; 555 556 mw_addr = pci_epf_alloc_space(ntb->epf, size, barno, align, 0); 557 if (!mw_addr) { 558 dev_err(dev, "Failed to allocate OB address\n"); 559 return -ENOMEM; 560 } 561 562 ntb->epf_db = mw_addr; 563 564 epf_bar = &ntb->epf->bar[barno]; 565 566 ret = pci_epc_set_bar(ntb->epf->epc, ntb->epf->func_no, ntb->epf->vfunc_no, epf_bar); 567 if (ret) { 568 dev_err(dev, "Doorbell BAR set failed\n"); 569 goto err_alloc_peer_mem; 570 } 571 return ret; 572 573 err_alloc_peer_mem: > 574 pci_epf_free_space(ntb->epf, mw_addr, barno, 0); 575 return -1; 576 } 577
On Fri, Oct 28, 2022 at 11:56:59AM -0400, Frank Li wrote: > From: Frank Li <frank.li@nxp.com> > > 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 <frank.li@nxp.com> If this is a fix, then Fixes tag needs to be included. Thanks, Mani > --- > 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; > } > > -- > 2.34.1 >
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; }