From patchwork Fri Jul 7 04:06:10 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yangtao Li X-Patchwork-Id: 1804563 X-Patchwork-Delegate: miquel.raynal@bootlin.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; spf=none (no SPF record) smtp.mailfrom=lists.infradead.org (client-ip=2607:7c80:54:3::133; helo=bombadil.infradead.org; envelope-from=linux-mtd-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org; receiver=) Authentication-Results: legolas.ozlabs.org; dkim=pass (2048-bit key; secure) header.d=lists.infradead.org header.i=@lists.infradead.org header.a=rsa-sha256 header.s=bombadil.20210309 header.b=4qfVYCpP; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=vivo.com header.i=@vivo.com header.a=rsa-sha256 header.s=selector2 header.b=UHG9NW9e; dkim-atps=neutral Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:3::133]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-384) server-digest SHA384) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4Qy0Gz2zHVz242c for ; Fri, 7 Jul 2023 14:07:36 +1000 (AEST) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=LZgiXBIjhjwARh3bECNyVle6m6NE8ckB8c9pxjPkXq4=; b=4qfVYCpPF+YgPq UbcZvRExgvt4/yOSrN6huikkBtGF5ikTH38/0hEJLDj5Jxlnxw3DpfsSzAvwCSfCwKF2SWpfoIJ9V Be+tgVagucvGzZOesZyJPOmNHLu/tU9UR/KsX9/DQMUc9GkPDpp5UW7cBrQSb0SFzzeE2tOyo4hCu AV5dpi/Zyj6OvWdqrFcbQmHksTGV6W6ZTTViXYH5GzdCE5s66O1VVom6m6vi59dlRKe7LwhqdX8Td sJ79kGzfqkpRBgQJZOsbN8MuMbQbjmwxBh3qCPFspple94FbMiMSR2kRL/yHQyQA9AXWr/cM50yte WuuLMNG8NwrtU4jtDIxw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1qHckE-003Pmw-0U; Fri, 07 Jul 2023 04:06:58 +0000 Received: from mail-tyzapc01on20713.outbound.protection.outlook.com ([2a01:111:f403:704b::713] helo=APC01-TYZ-obe.outbound.protection.outlook.com) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1qHckC-003PgP-0X; Fri, 07 Jul 2023 04:06:57 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=CUxfnAojZioz1txl06B2F/wewG44QJMIuWeR5rHX7PiVyPTDqUckD3TpMV9IECMakpZf2wAPTy3pNJ2EdMNdyLD7OUtz3+c0aP0EIY3Z3r6ryFH4YtxpsIAv0qZ1VBnR0Wo0cXQraxpLFK2T98qN7aJNqEAHWZcnPXkt6vGJ4gHGacazkJ0zMmyEjjHtGlLMfwr0N4Vy/paYU+CYw1fDyao0zSzhfucocgMPrhjG+ihiWcc0UyLq5pIbp3OKawbLgZb+ExnjBbTjPySfSPSuCqL8pCRmGgQaqyNo5M2vOWs2P37kriD4z6amEi/9QJ9iAc1075zpFt+UGt4rBTPhdA== 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=p7IAxqoK3HZOSDxI+ilqyxmzxnz3zNr5yZI4DBv3+5Y=; b=QpI2p5p6+L4FnsOy/aQ8JUmnn9tr9AomMRDKQ4vb1zA6MD1GXhuqQFTkiYmMzJzZLunJ/id/+J9bkBq1hCerFMoF00kBaohxZR+8Tc0BVitNf9+/6BkLmIB8jhBj3U7K/3DjxVbHUfgAf57mryaLNnVcLJwMHP/lxIyHuw7q4lIm3xawxQfct7N2cNlgm0t4fqMZrAyX/eZX38OVC3tTHL2Uc/rnjK8D1bYrFVURKTSn9QDpfc4+lfiWTI/hL8CDigt66pgloXpcpr6FF5ArIR7uwWjy1byfV07DFxHLGwfhJ3sKFTyJ/yNwYFX6UrwHLlGGlKcVs3kEbGFfO8urRQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=vivo.com; dmarc=pass action=none header.from=vivo.com; dkim=pass header.d=vivo.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=vivo.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=p7IAxqoK3HZOSDxI+ilqyxmzxnz3zNr5yZI4DBv3+5Y=; b=UHG9NW9e0k3+l2G7j8VLweOTpB3tu8GcsuOR4aZyueVEXIguQrajLKtLnCAvb5RpBW+RVGhC7izf3hkPvfSMml/bB8Erj/TCCOcVman2VGbTvBE4GUg2MpoW7BvBbZLtBE8QusNsc6/t0LUddNAM+OMoVCVrwbpnrzGFm8kuukh9IIgnWSfj2NcDR1PPrxRYEa1X9EoRh9jXc8wlc3h8siWj3Me8sw6NyqtVJG+X3DtIr3Gi0QgiohOfwC+XDbfY1UzaASaSEiNnNbZ6SQSXP5kKcZuoIwjRcAfmcSH11B+aeQ7Kxito5bK5k7lKbNcQj+srrQ9mIB2Qpxd2cRtsXQ== Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=vivo.com; Received: from SEZPR06MB5269.apcprd06.prod.outlook.com (2603:1096:101:78::6) by TY0PR06MB5470.apcprd06.prod.outlook.com (2603:1096:400:264::9) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6565.25; Fri, 7 Jul 2023 04:06:44 +0000 Received: from SEZPR06MB5269.apcprd06.prod.outlook.com ([fe80::fa0e:6c06:7474:285c]) by SEZPR06MB5269.apcprd06.prod.outlook.com ([fe80::fa0e:6c06:7474:285c%5]) with mapi id 15.20.6565.025; Fri, 7 Jul 2023 04:06:44 +0000 From: Yangtao Li To: Miquel Raynal , Richard Weinberger , Vignesh Raghavendra , Maxime Coquelin , Alexandre Torgue Cc: Yangtao Li , linux-mtd@lists.infradead.org, linux-stm32@st-md-mailman.stormreply.com, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH 06/18] mtd: rawnand: stm32_fmc2: Use devm_platform_get_and_ioremap_resource() Date: Fri, 7 Jul 2023 12:06:10 +0800 Message-Id: <20230707040622.78174-6-frank.li@vivo.com> X-Mailer: git-send-email 2.39.0 In-Reply-To: <20230707040622.78174-1-frank.li@vivo.com> References: <20230707040622.78174-1-frank.li@vivo.com> X-ClientProxiedBy: SG2PR01CA0112.apcprd01.prod.exchangelabs.com (2603:1096:4:40::16) To SEZPR06MB5269.apcprd06.prod.outlook.com (2603:1096:101:78::6) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: SEZPR06MB5269:EE_|TY0PR06MB5470:EE_ X-MS-Office365-Filtering-Correlation-Id: 3db9a535-d13e-474c-8be4-08db7e9f939d X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: IBWtA3jI6rnDxZb6lrR73kAJN6p6z7pmvbGDRFzFggeJJ8yxyC6WnYaFBVipIcD8Zu2RimIf9jp7UtiQxTyL2KzMycsXXL1B8CpwzioiV+x/kEftRa4n6zAx7tlAOI04TSigDfCkVeBP6TKKp0HX717FEuiq4lLzyJa0KBKlLuIOueGV5odWpdq/5acf8Wik6mYDS4M2qeA5wbP2EoLEh8KGfXBhvPnhyr/xlX++8Iy/36EnDtEsx+sfnnq2QE+Izqp8Lr/18ndcqo2dv6lsrTW36WG/Bap0SGfLbuzOmFZHEkC/TSvoxNHTJEpQaiv1ZPICSi6S/84Fig0VwDIFn2ecsz/YiA9pmZUrRUG3CqRaK9/hDI065jOcCgW9VNer6fBOvsxa/vcOoEkhI6MJVzDzuKANN2mLk6mHaOC0WlMmfDL7MNYtsLHOPoHMzGuF0b4nQtbg2GMHH4BhCNCeEwrVjDRS2kZcNM84kYRAZD2BeO9FMOxApD9Uog8sPbK0dvAdXZAh/u5PiZHK6hClqViKdBJHVyZDO6SqxQKWUar4l6521jLI+SC/i2UHZdp6JCijO82dQGfXdPVDtKY8PDzruD8HWsu5qQdx2XhM61GUE3h8I/Jxu9yNN4NufuCe X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:SEZPR06MB5269.apcprd06.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230028)(4636009)(376002)(396003)(346002)(39860400002)(136003)(366004)(451199021)(478600001)(6486002)(52116002)(6666004)(110136005)(26005)(186003)(6506007)(1076003)(6512007)(2906002)(4744005)(316002)(4326008)(41300700001)(66946007)(66476007)(8936002)(5660300002)(8676002)(66556008)(38350700002)(38100700002)(86362001)(36756003)(83380400001)(2616005);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: 5SsLIPoBwpGZrkdm6R/6lBBzvhWPs5ZmWHuRWj6TNrtMrPNFt8YwI8lPXiBsG3TzmV509o6/aqq1sBr8c1G24Zi/ECyo6y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JEmbfFFqIhpfkU/QcAzqAxUZs77Nec2sA4KlBmmB+ABZH+qA/f3rnoAKxeV4JPO9ecxHRNPpJn4H4sFC9uDVIgUkznwQpYU4BACYLEA1H/C3H1UiURO0vVn0/PZySLmFNzFyMQRSXrM8JM33abrWJSyfo3EzOmfBcv05Oy8ggc9ENABFkn6ulF3pR4uq5GZcKhiC5gurIiC6fn1T/CHZTsDjT1fuT6MOST0BhUrA0hweinKGEpxeFgG8zg/Le/Mwewn8MJYeHKURKaRwt5HqFa5G1zFYVX7hEykMs18guEkAvZZ1X009q9C09zFrIITULgGe9nrt0JaMeSQSA83F/7yuD1U/E4/kL4g96vA1ZhIomzUPKJLwT7MrTpkjsWa0CC4d5xsnW2kcdEjWy6X5omZIGPSNcw+dpf4G2T X-OriginatorOrg: vivo.com X-MS-Exchange-CrossTenant-Network-Message-Id: 3db9a535-d13e-474c-8be4-08db7e9f939d X-MS-Exchange-CrossTenant-AuthSource: SEZPR06MB5269.apcprd06.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 07 Jul 2023 04:06:44.6558 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 923e42dc-48d5-4cbe-b582-1a797a6412ed X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: Pu6D3A2C2rYWjbfzee5HLOV+OdE2kuu6Y9yI6Yu2KU7DofOGFqAJRnCzMoy99jlGncwnVEt0gx4cLI4Zuo8Z4Q== X-MS-Exchange-Transport-CrossTenantHeadersStamped: TY0PR06MB5470 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230706_210656_206880_D9C79C34 X-CRM114-Status: GOOD ( 11.28 ) X-Spam-Score: -0.2 (/) X-Spam-Report: Spam detection software, running on the system "bombadil.infradead.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: Convert platform_get_resource(), devm_ioremap_resource() to a single call to devm_platform_get_and_ioremap_resource(), as this is exactly what this function does. Signed-off-by: Yangtao Li --- drivers/mtd/nand/raw/stm32_fmc2_nand.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) Content analysis details: (-0.2 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 SPF_PASS SPF: sender matches SPF record -0.0 SPF_HELO_PASS SPF: HELO matches SPF record -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID_EF Message has a valid DKIM or DK signature from envelope-from domain X-BeenThere: linux-mtd@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Linux MTD discussion mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-mtd" Errors-To: linux-mtd-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org Convert platform_get_resource(), devm_ioremap_resource() to a single call to devm_platform_get_and_ioremap_resource(), as this is exactly what this function does. Signed-off-by: Yangtao Li --- drivers/mtd/nand/raw/stm32_fmc2_nand.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/mtd/nand/raw/stm32_fmc2_nand.c b/drivers/mtd/nand/raw/stm32_fmc2_nand.c index 10c11cecac08..2f9e43f64dd7 100644 --- a/drivers/mtd/nand/raw/stm32_fmc2_nand.c +++ b/drivers/mtd/nand/raw/stm32_fmc2_nand.c @@ -1922,8 +1922,8 @@ static int stm32_fmc2_nfc_probe(struct platform_device *pdev) if (!(nfc->cs_assigned & BIT(chip_cs))) continue; - res = platform_get_resource(pdev, IORESOURCE_MEM, mem_region); - nfc->data_base[chip_cs] = devm_ioremap_resource(dev, res); + nfc->data_base[chip_cs] = devm_platform_get_and_ioremap_resource(pdev, + mem_region, &res); if (IS_ERR(nfc->data_base[chip_cs])) return PTR_ERR(nfc->data_base[chip_cs]);