From patchwork Fri Jul 7 04:06:05 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yangtao Li X-Patchwork-Id: 1804568 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=BYOunOYA; 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=PAgW0rTH; 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 4Qy0Gz3Fq6z242d 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: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:In-Reply-To:References: List-Owner; bh=L8BhVP47eEPyV7mcSoY5pMA64tmC2V48nDzggii59ts=; b=BYOunOYALMPYs3 d08Zk0fqaIrWmpFM4dt3U4JtQ+T/yKxu7fUeXjvjoNTAGTFo0nPbqyB3mPzaNndv1RnOEANs5oK76 arxVCEpsxdbEJjGFLh1zTWfNj7ukZzq1BsnRFZYU49vcrWguu8+oQ3E8j4RcW3vjnoJrY2+hx+QHs QlmD6747ieeRdWlteUK+/c0Ta1w7PxS9XjH9+N3Mn4YAZwEHZBfDNexwpbwIk0ER7/lWZN9KPLQEa yhM8dMy3yQ8UUmrxmWSmxeYiNw0HtOIgIJKniCAWG1L+7HiXPbB40zCEjx+mT4FeX0x3F6UGys7eM qi0hNJlqRHvlq2a3RgSw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1qHckA-003PjU-0H; Fri, 07 Jul 2023 04:06:54 +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 1qHck5-003PgP-22; Fri, 07 Jul 2023 04:06:51 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=YsXkjT6REKY2c9b941TxU/mMeb6T5cKrPA+wNFWFESHHjSa4/Q5ehNcu5qy0fh+jE+sKv+xQdEx8kE4019LQhRDju6rejL17Y5bdAyOu0pWcQ3wp7HxNfXmZ7U6dyiZoAI1AxKbwoCzfBowbnJejiZuo/Xd2sUT/q8BecfnegN/+xviCmH7nAO1Gor6MMBjq/bLROQwrfsfy1fWsgb7fAwm9HIxiW7YsB/01nvFGUfelfk9FNgyhbD49m3e2zUqVMsABa9+1kQY/ws+uWU7l0UtOKW6JSzA5wnCEiht2ON3TuMhqonsBY4zDT0jWqOYFypShQkq/7yIR3BSy3aKpgA== 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=RLIjEIDSi/Gt4CbhogrAqQEpSG4L/IDdFUD/+RxMDXM=; b=kTZWl/jJQWJUbClz7YU0CVFMJqeLK71bwp8QD8MHJUfcY5bqmQMZHQ1JN5joAn3NW4U8VD4U+x5rxBSs8o7ssBZ1WA29BIznoqld9cfQrHelLx61oY1fYmyaT9vxmkyVXvGgXyAUCcTVft+n47zIyT5dgYQTKfIPcktXZFZCV1/69phsY0FEElMCnbnN3VREJN5hl4E49jZg9Im0LBSEv0Qjbg3sQelQBvPTWUYZ5ecXkzt9RJ4zkXEhz/kTvTF1cgxeV4G4Ps0hyUDg0AD9pvShxgwWPcNCaWKJ+Z98jBShooauHnbRt7zacSfEO1shptn3QHRntwpox8n2E1gTrA== 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=RLIjEIDSi/Gt4CbhogrAqQEpSG4L/IDdFUD/+RxMDXM=; b=PAgW0rTHR86PZsTq4n9ZIS7fOxvi+eEgDvTF7SmXvnOrss6FyOBnhat0ihyWY6Lqg2Eq0HF/D+LndrcUWl43H2HMhDlvRXnEbkCQQceEGdKDmvHpqcSt2BzGABBBZ1StLDx6uqVxEc9LALns+tc0OKWebTEAUoE1TIEpQdjSa3Zx0DUXn4sD6Ug6c/rY/AX7aINTlcGFrC+9rfhS3+95ScmWuRWUMFBJMhxpja9qjf/+Ek0jYrmx/PX2qFlrC6XI9aUJMu6C2wenNZ7VnoAknk1atORryeVzPLlWiUZ1KR0KzavIk8+ZkW3iAtnxcFXnrPGFf1OZg8NY2AIkWvfZ3Q== 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:34 +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:34 +0000 From: Yangtao Li To: Miquel Raynal , Richard Weinberger , Vignesh Raghavendra , Chen-Yu Tsai , Jernej Skrabec , Samuel Holland Cc: Yangtao Li , linux-mtd@lists.infradead.org, linux-arm-kernel@lists.infradead.org, linux-sunxi@lists.linux.dev, linux-kernel@vger.kernel.org Subject: [PATCH 01/18] mtd: rawnand: sunxi: Use devm_platform_get_and_ioremap_resource() Date: Fri, 7 Jul 2023 12:06:05 +0800 Message-Id: <20230707040622.78174-1-frank.li@vivo.com> X-Mailer: git-send-email 2.39.0 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: 3b6d8d70-e1bf-4ec9-acf2-08db7e9f8d5b X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: Ove5HzqVHf4+ZMTX9g0aJ7dPKdAwHWjAHTf5b3hrbicUD7g6KsLt53ghh84jLbt2v4YoSA0UYaMYbTtyIfpEmABzT1/8d82892RUtora31I5n4+zEW6uCuNMsuL7zTF+Dl+KwVi7dzFPQtkKGO29qFNtHyFyPjmvEPGPE55zKZj9g9HmHTPH+k6USiGWjh08Jwtk4QwDLMvyT5Pv0ENUGy7VkGLp0BV9pjLnIq8+2s5tc1w1prNJTT7Rv1seYneoXfmKTy7JldP88xDsMIWcxRpP+3tQ8ZD2Sy96KlUPQIJ1t4nt88Bl78AjrHyOpUmXjpRibXUyEYXjsB2X6PUuWfvZoGsHYI+WROYwKpvIL+eN6z6oJ8FjSDQz6y1QYWIcnXDD0j7qi8Au4xVuFNcky8uGxiaHM/ejgczASrgRfVM1k05mfu2aVWas16HBihXJbVcf5CdLarklKrMymRBwpzfnAyDAaAF4B8niwdw4IwBSbLTVrMucmLHohBjCo7qyyruyhOoLjG/55kdXgCHc4jf+7SHBbkKpejFVZoK878gQo+pyg1VQOgD2ZqYFzpiuq3vbmTfp1aWxWuiJxoSZrhEc14eDBU9u9+vG8pVmV9zsgkN+3nws0oSdnYYPxvOU 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)(7416002)(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: o5hfJDDmkBYVACJ1BHVV054tj9mkbxvdrvU+G3XVc9aJdxO2HArVCh1ehVOF3PhDIE7HONeBAvLrqAlN+RAsSJs16O9C7RNQswWHyAJ9qXahi4qEDRy26tgKA8OKk97aHmPoovRZUTzk0V8TVaMZbFlLAHk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63ShVuDx1QAezINiPmMw6XYJJiJ8s1EqA3ZZ1IQ0WDSoyi2cGYL4FLpKkV0vN+JVPq6MyzUbOCG7itdzMvJbvRKCfrVItKDIOFcAJ2VZQnoDeD9ahfDFzOCkK0mB+GDQyCMvMcLPK6Y9PARrN1/KNEy+zmInriz/YxYJtRqxmN4cxwzI8sMlVx0+nUDI/cz/CAVuwhsgyP2jLNFbXjH6/6wkde4KgtdghMwRUjTkb4Zcu/vV304k+dIVq1YjcUpHZmR30vRre9USB0LjCjtXdqv10K4dNRv3aeuoVheN7FMY94A64xWtmXfQyaSChySKqu1d3vxxTXwZzcD2C2teuSW1kG/uz0sAd X-OriginatorOrg: vivo.com X-MS-Exchange-CrossTenant-Network-Message-Id: 3b6d8d70-e1bf-4ec9-acf2-08db7e9f8d5b 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:34.1885 (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: 509JWL/kZ4gSjjIIzydOhzv7rzqQMbbdEFABGjay+zgsXDHRHZypav1AbFxIrsnTPicarLNAuAoir1rHHHvoCQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: TY0PR06MB5470 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230706_210649_677286_FBB07AC6 X-CRM114-Status: GOOD ( 10.14 ) 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/sunxi_nand.c | 3 +-- 1 file changed, 1 insertion(+), 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 Acked-by: Jernej Skrabec --- drivers/mtd/nand/raw/sunxi_nand.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/mtd/nand/raw/sunxi_nand.c b/drivers/mtd/nand/raw/sunxi_nand.c index 9884304634f6..db36bd755b8d 100644 --- a/drivers/mtd/nand/raw/sunxi_nand.c +++ b/drivers/mtd/nand/raw/sunxi_nand.c @@ -2087,8 +2087,7 @@ static int sunxi_nfc_probe(struct platform_device *pdev) nand_controller_init(&nfc->controller); INIT_LIST_HEAD(&nfc->chips); - r = platform_get_resource(pdev, IORESOURCE_MEM, 0); - nfc->regs = devm_ioremap_resource(dev, r); + nfc->regs = devm_platform_get_and_ioremap_resource(pdev, 0, &r); if (IS_ERR(nfc->regs)) return PTR_ERR(nfc->regs); From patchwork Fri Jul 7 04:06:06 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yangtao Li X-Patchwork-Id: 1804561 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=C+nrrJv7; 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=RCcivcgy; 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 4Qy0H00gtbz242f for ; Fri, 7 Jul 2023 14:07:39 +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=BQiXSG423G2vTA2LVnNJcZkowFOIerKKmjuIhUgja4o=; b=C+nrrJv7j8h15b qRJDfvTyzcoMwodBNdck0JBegl2nDoP31Ccb+K5HpWQ38arNKaHYyxDzCHhTn17AZZVtkPrXiLYeI VSypoYdpbCV04O1OpxlPtAf73zOmlcGpnMSltZbgFeBmIEoICzKzL+FflKizpq3mQD+lukgq0zDGX wk9KfoUyX0Q8JVTjsWnkcdcDRXGPJ0VE3W3VPcrXLvp3ATUP6/368sh/CzozIUNI3ilj3H2TtUMD3 SSgmr54c3/HMlkUaOp0HaIrc3dFVXtErfZWsvSY9upPNjYiJLs9Rj4pzsXDTXXjVThXdXpqYscZNE c5zVP7FSliszERnso1FA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1qHckI-003PrR-2X; Fri, 07 Jul 2023 04:07:02 +0000 Received: from mail-tyzapc01on20721.outbound.protection.outlook.com ([2a01:111:f403:704b::721] helo=APC01-TYZ-obe.outbound.protection.outlook.com) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1qHckD-003Pkw-2w; Fri, 07 Jul 2023 04:06:59 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=fWLzjXQOLzG83xsxTOMmtdU+ByBDhg6qcKE0Hd5jmx99AWQqgj2VCkHt4e/sVwbEdH+pbbPRgS0CSlYX1MJ95ztDMo8jLMZe8I26DN2fDfvHjyU9SSnP1Ek1HZU3A8RgcoxsOuz8YViirnJhHBSeojZy/TNOLqjERQQZ3rIwO9BLoB2R3Pq+sMtWJvUgEM9GZbuUamsGVIXvHmyc/9Kzr7fONl3yKvgSHiPq8Me0AE/92QDFfWiMQSfT7bHvGd000qSyPrEWEFabJuDGgdwaZx7OWZvlrp8UiefNP5TsV+ghVq6+Iz9Ta3zlTpUAu4sZpBCX7V36gXohyfoBE74xmg== 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=uOPiujfmumy5qPnC+xECA6xjofv/nI/7adzc/RmsMGE=; b=QhdM0Ph4IxNL7aUuCcMLi2/Vf//4PuG/Lib3E8hamUoe7xLUJw3CeT1i5dFrae8gdS7czw18Fm4FQkTIkI42f2zpQa/XQ+bcAblYmeJ4pnddRFugB8WuQwnEvVxAL8HfD49URSHDrP2Form2PBHE/a8vb+xo/1lxCBTu1UbnT2LQr8e/mcmJW3ayvvKudVsZN2X2VNj170LVmyhvqCca9qddK9Io7sGllBfqs5A+k21WXQMlxHnzXEWKF+dmyzbRqPYyyPTRAGVonJy31J/xktyw0tO9XGKE0PpQvOtH/YUxwifDDOXFqTzQcJk13ECU9AISvXiYGzF/2QbdtkYjQQ== 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=uOPiujfmumy5qPnC+xECA6xjofv/nI/7adzc/RmsMGE=; b=RCcivcgyf3sTtJWCVaU8lLK3c60rPeRb/QSWTqcfEIOyKAIJAhp/N4OLJVMOdWQBacJRfnc9ltmJMsDDJVcyhdQv6Sk00orGeH63EYS17AdHi3GXZfn7k35zbC1qeUCJfpIBuxSH9R8OboV7lfpsYqNHq7zep+7gIW/KORkncuWErkxvbiFlrqK7wu3SfJRJQ+a5XeEgID/+FWdwg9ZGJ7QiCQf8uQoh6OlgoKH3wSRJeLDUfCjh5WfzbxwSnIbNG91HT3u9vAt1HKGoRksbM3H4QswCuQAIgHxPME4OmexKIiWjPWxC53VGWjvCaiCM3FzT/RhY38a6wtR2Ypw+ug== 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:36 +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:36 +0000 From: Yangtao Li To: Miquel Raynal , Richard Weinberger , Vignesh Raghavendra , Vladimir Zapolskiy Cc: Yangtao Li , linux-mtd@lists.infradead.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH 02/18] mtd: rawnand: lpc32xx_slc: Use devm_platform_get_and_ioremap_resource() Date: Fri, 7 Jul 2023 12:06:06 +0800 Message-Id: <20230707040622.78174-2-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: f96051dc-f48e-4d5f-7ad0-08db7e9f8e9d X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: iiumK/UmRsYh6OG8V04MV3N/S2lN6yh+biyfMG3hfqt4/YkRR5CXa0q5qTKvhG+qg9cz2VvZyUWv8mpdmHfil03SXtfkfGWSqjpuKmH2LyYuqij5uqetVp31QR0h46QY2xKmADpDPAciH1g4JFHjws8ZC4pIb6vSphBO7KWtCLFHqW4v7GntYUZP3V/oAFmxq96QCCkavEQXLuNM5HHd12vg5qBROGJl5NPMh1gHj4R8z3EN8zqaVeDWoiQEIi/yxV5ptxMP8t0zFqG2spxePh49j5ov4dwCZVqfcyZnt1RCVzZLYjpwhVDrNtx+6OQgh3NI7lG6U8BhTSq8OM3/c6RYU4F5I0OMMF3BzeM+30/2ndAUWsf2cc3gnrR3rYYJE0n1ylaXDwR6ve6x+49+tKFZGm8/cdGbtVN09d0iDx+deo89P0ImeSG+aWbmBr7+EpDpayj9S+oTFiiAfHUQVwfWVykR9tSXLpRKMHXeG2qpFbonLuOV9cs5r1OkOLAGIVNU7+peFO6eSo9VItEZuqp4kIQSO+GJZ5a3P6RlCPjpLjYs3xmfcSjwwPloTkEURS+04AilIXL4lRyo2SRHvSQKCfDZgV8FmkoFOMyAVfqeQUcKgcU8zJdbyMJyTQxq 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: TuLGR4rCjEWuU/sToyXSnXkoZh36krdI35iI0CqeXR3/fQNupzwB9JJdg7fhQ88ExzNxby6eZkDb4w3ThXZCMIV7XL/wTpXt44oRqDModl2XJNXut7zWQ2u/Roe3VJGa4LerQCIVYdZSX55vLSVOAfut698XFJB0y4qb6YWxFmgjTaCxYLMDRenTvl0PH+hfEWcexdKSTv94XgdnZJFiN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XjjomBG7jlOFpnIbgSUuxffDLk6zTBESgHISnDS4zXI+F17ql+UzU/f8d7AuoxKU7Ojvot9tQBS7BdIuajEsXF28+nrySGMBhtSqwZdIcSiHZTuIfFLAIHDwADnWxciq0ym58yEc+Gx5v3KBoOs2kvb718hwx8/CPiDcjBz2mOPHKSsURrAdvdsYiLntyt+f+olQ/1x9XKB9eeLQ9esU2QdhMeUdeHsF0kHtxg8X6za4IxzQmLqBnvQ79wQcOS0Tl3EaNCWwb0zb0AOY0mAwLqlVaPaVLCMnamjrkUsRjs2wO1EMPPD/0bV/a3mGL0y X-OriginatorOrg: vivo.com X-MS-Exchange-CrossTenant-Network-Message-Id: f96051dc-f48e-4d5f-7ad0-08db7e9f8e9d 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:36.2711 (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: eMV9aq+JgPF/ioFF/rsFrA+zhRdupc4FBJ/sryIhe3erspANf3EbsyHuBQ+Sg0X+XOJM23gEK39Ma6ObHUE0XQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: TY0PR06MB5470 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230706_210657_957242_27FBAEBE X-CRM114-Status: GOOD ( 10.58 ) 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/lpc32xx_slc.c | 3 +-- 1 file changed, 1 insertion(+), 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/lpc32xx_slc.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/mtd/nand/raw/lpc32xx_slc.c b/drivers/mtd/nand/raw/lpc32xx_slc.c index 3139b6107660..2201264d3c37 100644 --- a/drivers/mtd/nand/raw/lpc32xx_slc.c +++ b/drivers/mtd/nand/raw/lpc32xx_slc.c @@ -836,8 +836,7 @@ static int lpc32xx_nand_probe(struct platform_device *pdev) if (!host) return -ENOMEM; - rc = platform_get_resource(pdev, IORESOURCE_MEM, 0); - host->io_base = devm_ioremap_resource(&pdev->dev, rc); + host->io_base = devm_platform_get_and_ioremap_resource(pdev, 0, &rc); if (IS_ERR(host->io_base)) return PTR_ERR(host->io_base); From patchwork Fri Jul 7 04:06:07 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yangtao Li X-Patchwork-Id: 1804562 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=NoEiGesy; 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=Y617a9/n; 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 4Qy0Gz1K2lz20cF for ; Fri, 7 Jul 2023 14:07:37 +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=oPO84D7ZVD6Bs5qzBn1R9yDTyE/EwAYAyAMK5M5qU/Q=; b=NoEiGesyed7Q8B kOZN+NaggnOyVXGEgp80TjydlBXFLQLf6kvvJWK84dXk9RjHmP+sJtDuFU756lnSbqsY16Z1cB6my 7neri9bm6A6E45wYFDSE8U7VZFPG5Y8TrBIoynFv+dbi4qa7Kxjw23MYvjJkQGB4lpjB5SMkTzzyg AxeUoGBvIh4w1wa56enupRAvNbDX5SId6anMVqLmxbvryP03zrHYMVT6BPaggHllpNjIBSO/NQ2MB IL//qzF8QaC5GbI6FKwzlqYF294QRhb841ZTTyqAJ78srarQrtDvlc04d7mBkH/UN1MnQ8KGmWqZP 6vYZD03ER2cAtzYwbVUA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1qHckB-003Pkn-18; Fri, 07 Jul 2023 04:06:55 +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 1qHck7-003PgP-2R for linux-mtd@lists.infradead.org; Fri, 07 Jul 2023 04:06:53 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Iq6ZUCQ6KzGF1jUOdO3UB3fzUE+ltEdAGYLzLgraTL/E8FCe5rR6bQ5B14hJlmnXHD1Zl6rzg6iKHg5Yhv+9lI/l72dh4M5xW5+p3mmuC/dvSmr+LvQOhbUsTFsPzfhLXI/AV2b8QkYwRJbEaO2FAf8uqggx43f+SeUEsXIgFI4/VXrbeSp6ZCc+41gAWt6dPjyg0Ov0/ZONVYqAMJAvdVpsp5S19d8fBa/xv8BcU7uVyooJVc+7Ud2QnUANfm2zSvU34j7+swi6KwOHB2J7HEau9HMoNqZNGws40cKqxfH5+DBrhT9qcKppAelzElUkXEj5RZhKX8T19lLrG1vIHw== 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=ipUKdMlVF+i+Cwge672wAT5nGsYk9M+cH8Qu2fYtoc8=; b=L/141FFx+/xbBpbpmuplMxpDb48l5esBDlR469Vzis5ZXOU2Lf87KXOc1kuTysy7tbYdr+2mCwKmHOn+wbCtIRcavyQwiLW5KpzfZMs7rlyyq6vJvaPAfh9cDjHll4afpNrCSupftrDr8sp3hsL3iBHKSG/Enyrjp8jcZmAfIyvSqhZRoXLp9hdcP2cHSaMfNWPOpc7OqhaqgN0oIgIQf6BX8fofBkseDv6J+wXCmyk6dV96KLc7nQKpjy4kJEOa/Yrmct7mgHXr5xsA98SB+qRfXbQwdGcG3FitCw0KYTY/fVWkGVCpEXCJwkdu3IUISOxArhug9hJqvii3T5xzpg== 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=ipUKdMlVF+i+Cwge672wAT5nGsYk9M+cH8Qu2fYtoc8=; b=Y617a9/nMhE+p7J+PViNEyBBuxAOhG5wgYdbvekle262Zdv5f8O9E/rKF/OTWTv/492ntyVDfJQgmh08Kh0C5V2Ua34AcYPoiImIHahrz0BbcGQLOk/fo2WqT8lIRnKw+jBQ4EHmHDVCPP7YZ+nPM3B7CUsW5Onm12gTkSoC7R777qZZJQ60xJG3bJHeSWv+Csg2bvdqkhaTW/Vlm52pluwfjLYCCYZwyLMnpZ1fhr/zfcVuyg6E8pvM5DcwRvPO7FF/ek/UxtCsWaGQZ8af+66Ntc2yvRnyL/fL1XGpmpb4oUKEou+ANBRDdmrKOPrRQStbsOSmo43KcLxvK68D1w== 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:38 +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:38 +0000 From: Yangtao Li To: Miquel Raynal , Richard Weinberger , Vignesh Raghavendra Cc: Yangtao Li , linux-mtd@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH 03/18] mtd: rawnand: mxc: Convert to devm_platform_ioremap_resource() Date: Fri, 7 Jul 2023 12:06:07 +0800 Message-Id: <20230707040622.78174-3-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: 29b62914-ffa7-4811-7434-08db7e9f8fc7 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: BXcewIYhCT5SBdGXf7eTrqDHtmqXZdCrL8cn1cGUwJCv6oNTt2tHY+He2Y0QzwOVDCsk7Oqc19OlqBXlw46Pn48SNBND/vtcrLomTwexpOyjYfnF7344P4NLfKFsKPQqzFpRt3kuju7XktXQkB6iACUXrDwIK1ag+j6H3A5GzHnA+nOwlClP+sJ8YJETgo+gf9+pA2WR2MTHsaAFAxYhvwASM7x25JFyrLCkPuV0FkqhJhfAPNaZ71n2FmoKmnCZ5w3x5EAGrWN31aTvNXKjQxhZxElU3ULYmJ9jUECyWYuF+jmaK5m79HpHTS+EGzzRDpnAWjc6K+tghg12IXi48MYDXcBKKekMn0v5UNv+uMRtJmUQEP1zBt6b7TNvfwwk5MUG6GQ68zTtdxDfNLFDzwS2dkURpjNyaLuA48uOsKXuqFMVKvXV7Drf/Vp2qTyuMKcy9vn+qbs3odHPcNdJ55Qu4ll+l7fwg5cksOrkIJO6yx4lFHn2V/qy7GgP2HOLFJVavCxZxrumGc87W8F29JbZlqx604L8MarqLhcLrBZoSE1WElNSOPWObNWnSgu1CtTtgEyCZUpWH252789bsHsb+QaCa9SmBjgDczfj7m5+dEvLlY0tOsJ/O1DP7up1 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)(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: uD53sLu830oollqJIbL/ItoltrZiWGz3EHwgc5MuE/Vm1UiWn2ZIPRECc+kcLKg/wPQXLWmR6JAF5P4CoF30jKNQt4/xlJIxfJJSusksiCWcyPexj+T3YwsPZxBGHSivYVaqAJpPVsMM+NH8wCZUxVSSfnzO8xRZ+9NMzmMkIzsx0lsTlfucTt6V5N1RTpOvJ86OZ151RFeA78yT21eriP7Aw8jjlpU4SSmgvDVH2WfArH3TtKDK8rJyidEbatUXfktUvDG6fbkkOJ6hOdgMkUs0DpdYK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Ylngvk0NpmZ4YM/JvcLBmrT3c2qgQQwHvsQ8CxdsGDPlOv+HtWKk15BSdIoh9KuuuBcsgInv7urgoxm2Trdf45opxWuNNoS8zHoXJg0ELxJcKgT9t3XjwoELbyEAs5kIPju6GcfXvS2BRE4kgLnKNZnxoSA7NCmRdYuk8BMV5TWA9S3NUxT/SjiJY1m0SCs4KtdovzS01veUIC9R4mRtQHAJ6DMjslLb23dQb X-OriginatorOrg: vivo.com X-MS-Exchange-CrossTenant-Network-Message-Id: 29b62914-ffa7-4811-7434-08db7e9f8fc7 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:38.2013 (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: rwLne7y8IAW4KsMaQ7Frynd5BQ0YdST44/ZM16tWUXEQFID07u9UKq+vetsQt7uuGddTFrnCkXkO+miBxFg9Rw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: TY0PR06MB5470 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230706_210651_803875_21A9C9E2 X-CRM114-Status: GOOD ( 11.41 ) 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: Use devm_platform_ioremap_resource() to simplify code. Signed-off-by: Yangtao Li --- drivers/mtd/nand/raw/mxc_nand.c | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/drivers/mtd/nand/raw/mxc_nand.c b/drivers/mtd/nand/raw/mxc_nand.c index 3d4b2e8294ea..2f8dcda0f435 100644 --- a/drivers/mtd/nand/raw/mxc_nand.c +++ b/drivers/mtd/nand/raw/mxc_nand.c @@ -1 [...] 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 Use devm_platform_ioremap_resource() to simplify code. Signed-off-by: Yangtao Li --- drivers/mtd/nand/raw/mxc_nand.c | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/drivers/mtd/nand/raw/mxc_nand.c b/drivers/mtd/nand/raw/mxc_nand.c index 3d4b2e8294ea..2f8dcda0f435 100644 --- a/drivers/mtd/nand/raw/mxc_nand.c +++ b/drivers/mtd/nand/raw/mxc_nand.c @@ -1696,7 +1696,6 @@ static int mxcnd_probe(struct platform_device *pdev) struct nand_chip *this; struct mtd_info *mtd; struct mxc_nand_host *host; - struct resource *res; int err = 0; /* Allocate memory for MTD device structure and private data */ @@ -1740,17 +1739,15 @@ static int mxcnd_probe(struct platform_device *pdev) this->options |= NAND_KEEP_TIMINGS; if (host->devtype_data->needs_ip) { - res = platform_get_resource(pdev, IORESOURCE_MEM, 0); - host->regs_ip = devm_ioremap_resource(&pdev->dev, res); + host->regs_ip = devm_platform_ioremap_resource(pdev, 0); if (IS_ERR(host->regs_ip)) return PTR_ERR(host->regs_ip); - res = platform_get_resource(pdev, IORESOURCE_MEM, 1); + host->base = devm_platform_ioremap_resource(pdev, 1); } else { - res = platform_get_resource(pdev, IORESOURCE_MEM, 0); + host->base = devm_platform_ioremap_resource(pdev, 0); } - host->base = devm_ioremap_resource(&pdev->dev, res); if (IS_ERR(host->base)) return PTR_ERR(host->base); From patchwork Fri Jul 7 04:06:08 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yangtao Li X-Patchwork-Id: 1804558 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=2K5V78LO; 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=D+cwlUNi; 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 4Qy0Gz2lBfz242b 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=VmMa4fbZqmlh4ZZ1CqdWh2HFNUi/sEqu/WzIkc1v0CA=; b=2K5V78LO6Llg47 UZk3B6ZO3TirQWK+PSAz3GsL2hCcc3Lt+HPgn1syrswb0P7B+5hYcnoxY/ICRvnUpT0ZK0+cydt4A SxzgbVdxY1m4+roFNLx6+AKxdtvEbm+cJTAXEFhdBzgi5aHrSPWhdRcleJD92Gx4i6OJvP8zZmIkU p4KDIpVjhl5nRWVNrHugtTAqIQmnAYggoKvk458Aor3NFeAKPqV5g8GzBXAmdSbD2d7clH3qMU9PV wmL9/JLXXjHl6A35C5HvS88Jmlf0CqJRizV/CfDvl5F9Pha9AGEvGyW/LMfmppGoAb9xnC+7qzJL1 tr0c9A9M09bm0T/pgUKw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1qHckC-003Pl3-08; Fri, 07 Jul 2023 04:06:56 +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 1qHck9-003PgP-0l for linux-mtd@lists.infradead.org; Fri, 07 Jul 2023 04:06:54 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=H2iK9HNCwYIWZthKbeOZ07NRiL6ZgkntfebdqAQJf9YM76VueRIKQD0OcbPUuEV6m6IC+1Tx2DfUGwqpK6RLC9Y2X9axrw1a9q7NI58xOcG4dOrp4TLpuAubbljCwQ4IOM2OMBjmaeEzJQEpYTMaX07lfFFt7N5W8LFwgCgnPTK4PSOc1wVw44w+m7kSbjkIjHa16wkVa8tdbl3nVoP2C2zSzJTqywXi3MImi3b1Z8HVqCGsEhj1pJgI71DE959Lq44m060o/D99oTaLYjQ5+MSS+5lM4sah6vIVQoSMlWn91sjNG855mw3/McDJg4s4BpffkqfwfDFnQQBDKdXXTw== 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=KW9CPVjpjNwBilYdO7l2jc/rsyVj9Yu4udnRwh901K8=; b=gDWDltraHIJE+mwMB3votALiII4gVOFxb0HQZrQwJFRMlhoTAZWbuxiNL+/9UTxLkBS+WOqABu53WKWXBJZ5eVOek6xv7EnSp92eAUV6A6+HLoSdZ8FOTFfASY/L0beTxwaHgDygBhAZESMYpGfdHWMTlLu/PjjYn4EeVIg1H3058O54qXf6I9GX7AKsBq0G8qW2QdSy0zemiHMm4zVt8oMhz8gWaEPvXZ+iSu0GAc7gwinkFKg42kiLZ3fNBvnsjNA4yYHt9HL43+g91wb+uH+xAQRe3hhze+d3xNS4835H6dklmFgGW38HrVVQcTibcV/cj4YzRILanwyE0SEYPw== 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=KW9CPVjpjNwBilYdO7l2jc/rsyVj9Yu4udnRwh901K8=; b=D+cwlUNiiex2VDTZyaSSZz0riX4eWoXoctPouBzwT7P91qH+QlnGfNTXKGSMDs6pY/ocYpyqmXxJfJBWu/MIUj7O6too+pkeSQjbFe9mryu0EEH1W3BL95AioF07bxa93OXXKBFsH0Tb2KfZys/usx55pCSefCnZ1aWMnzkGR7Z8WzSjxMPmJ++F2miKOqi2lefVpeYJmgQlN41v4Xvskk0ndaRg4jH/1R8MTzXIN3CootT7Z33z2b32YyTWkLlUYVM/Nfo/+gjjqZTUwBSzRFERcYOb3ufF/1y8+9fJps/IXDerk9GIZ780d/1IzSOpvwdM7F+xF2qdmLg6jp4F/Q== 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:40 +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:40 +0000 From: Yangtao Li To: Miquel Raynal , Richard Weinberger , Vignesh Raghavendra Cc: Yangtao Li , linux-mtd@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH 04/18] mtd: rawnand: sh_flctl: Use devm_platform_get_and_ioremap_resource() Date: Fri, 7 Jul 2023 12:06:08 +0800 Message-Id: <20230707040622.78174-4-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: 86bea49a-1b09-40a2-641e-08db7e9f912f X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: nbv/acj9YWepplY9C2KwWfnHUoK3lhU2JPX1rV4etAsDPJXcnUO6uy8q/4tarjPOlKTRvTfIsr5YTlnGnZb1zEO+marsKvYJm6lXPDNORVMB/TMv5rXf6RBjgnn+5ox2ixjTHScsJUfvH7ratWE2zY57ASDLQIwIlf6adl9bLVA9l/4Qk6/vxU0uBy/4HibtwQKtF6410xCtZsTbiP9f9tlQw+NSH+HywUX7x3TOEJeAYxFIEpkQ4YXH3pvN0EArJXkaHsD+uN0P97fw5c+U27xLOez6AvXMaxu/zyYFVQCgibuUJE/cCJ2BuHEbmirKlQ7zRr0xjwZTCt8jLRCNpCxTxTCRgyLd0h5juUB4lX+K3QlGsajdRKOwcNEAormzLr1D2GA0GCuKR681wy9EweBTSnv4jAHPjMYFDFes+c/Eq0oCg0vChjAyVCt1QDhQaAaPCmd9Jqr/kehdvQog020QjpY/+t8Td2s0PLTHFZOZzGQNu6tp5b8RY2scfU06x15Fmv2UKrEWKHXY0lRiYl6nH8e54U1yrjKeOiM4bxMlLG2QcaYFKAhCb2y2DxVJihFvOmgZiBgWQKaAwppOQ+4SrajsSMaKg2s3GQG0m45KPC0UG37v4jC2IJ55xkbv 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: e2gCSOcOk9O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0Dc6xZ/M1xm09LnGyN+4d8s2hItqi3CBwN+GNUurnR89gMlm0fBpkeVSZypmbK4cK7UiMVRKfGgI8m495QoYg4liEXgCyftQ5KQDBtS3bGutWAD4D+1IORdGKWZNwKZk+ZNZo2cROZM8PcNOyqsqu9MRw7eSeENrSysvxR6Ugi591Uh58CpkyVmFkdYtER2H5Om7HZKLSQ7FYaz2om6zLuBIr7wNHBd0EEOeoyqFKHHzjKmXGxgl2h9GpzpW5Zl12d3W6qqLlUpA2S6ztZsY9vBwF8AdDXzZL2Mu4jbruYV06sdnBIk4nsdkJUgy/2+xN1K1zkGNuYPLmHzbdN1GA052zVen71Y/uHK1YTgaUVpfG0VXxsh/OCaG7zXGqwwCnd31gfCYbqnqzqWTUwBOJoMVEeAPOsu2nYZPj3EGuMNU3LByOyk5hOe8u8xXR6DEaHc41xPPa9HwEsSOddl80X4r+DqhP9k60Mr48vIVyYYNnm7Nw03t2WOCW5t4++wjnhm2BOcBBw/ X-OriginatorOrg: vivo.com X-MS-Exchange-CrossTenant-Network-Message-Id: 86bea49a-1b09-40a2-641e-08db7e9f912f 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:40.6125 (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: p8xtbfpc+FHtaisDWqWJ9o6K11LWdemr05UP6cc3EtjTWECtwguM05VHAt4/iHhlnoNWysyg6cT/5f5KkZAbPw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: TY0PR06MB5470 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230706_210653_279568_2A0C78A5 X-CRM114-Status: GOOD ( 10.62 ) 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/sh_flctl.c | 3 +-- 1 file changed, 1 insertion(+), 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/sh_flctl.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/mtd/nand/raw/sh_flctl.c b/drivers/mtd/nand/raw/sh_flctl.c index 63bf20c41719..db243b54c953 100644 --- a/drivers/mtd/nand/raw/sh_flctl.c +++ b/drivers/mtd/nand/raw/sh_flctl.c @@ -1124,8 +1124,7 @@ static int flctl_probe(struct platform_device *pdev) if (!flctl) return -ENOMEM; - res = platform_get_resource(pdev, IORESOURCE_MEM, 0); - flctl->reg = devm_ioremap_resource(&pdev->dev, res); + flctl->reg = devm_platform_get_and_ioremap_resource(pdev, 0, &res); if (IS_ERR(flctl->reg)) return PTR_ERR(flctl->reg); flctl->fifo = res->start + 0x24; /* FLDTFIFO */ From patchwork Fri Jul 7 04:06:09 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yangtao Li X-Patchwork-Id: 1804570 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=jdCbKjW7; 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=nBzAi1q8; 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 4Qy0H04qV6z242g for ; Fri, 7 Jul 2023 14:07:40 +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=3IHlXkdEj6xqKw9ZncJqSg3rmQOcgO5Ow7tr2+/NuHo=; b=jdCbKjW78QD0bA 7KMoZfLsuC1eSMnpdytjdTbq+Ra6b6exHqFm5tsEGPBSVTBTBWep7hRVaiUZy1R9LC5n7kKgP5JQ1 v9kKQJaTGOojYomG/B97NbGVwHz/cDhaAn3XAPOjXGpdsRYW74sj//LfV23l1K/gvB63xLDzGCVT7 ky4vFIahcB8W873jM4eYt5v9UpKJe9Y29Gvi1479aJGUPb3jXgm9kbXI11HNZLmrGtNlxbLoPs3zR B9OyBRRT12M7lVNWM/sSGj6uNJjIJ/5wQLd4FUGPNdMY7NP8oZkW6cNerYs8EFHhKPfQYM0H4ODat KZCEp31rZLUBQazsdmUw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1qHckD-003Pm0-1G; Fri, 07 Jul 2023 04:06:57 +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 1qHckA-003PgP-29 for linux-mtd@lists.infradead.org; Fri, 07 Jul 2023 04:06:55 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=TaIWcN2YVClXp/ssjUJ9aPnigs/9f/CgOGi1mid/iKkytQsuh4NF5XbCyRvLwKcfKZvD1CMZ93Y76ewf8e/Dk2zx9shf9nfQF8a+V2xa3dj8KT9eCL5CpI6djMQ6MfleVcUlit3auprv11zlJDZrIod22K4BkFytkatYJJ4xUdiml8tCeNfbNYbXxamDA0n4rPcrjDcg3B06yxeZ7JZt3pbT4hD0De1oSSRIHd+yQLlbbWUxQvKIpJWn+roYTb9rIUb6QSONzgPzzaSFH10buvwl/j7rOcstt5bEaLJqmATxQ25f8F2od6mOFQ8tqOii+YW83JX5qjP7abojNziCqA== 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=udgfQd6/i/Jnf6563xx3A7VKmqOwhDuQSXcGbPkVVAI=; b=EkYw02CP5TWyE0W9jcI3Pp2xcCPoo7ifiQZnOXGPkovbJFS6f9GubYMIdEZkmcLGogXtsHNvRoLAZ87eEqnFlScnxrlK9c98+Y0n6wqcO1ZMPrbS7PjE9dDc0CdTWEzkTd6Y5o0DdmYi8Q7vD9E/jvCboLZb3dnzkwVMavscbEQOi6Ig/mhnmq4yyLAn77kyYBuXbMgG1YWBNPdv4ZweIFxKMZCgdUctgXLnvP3GJWMd3B1VVz5N13qfontkCcZ51HgRaNgGNLvpT9EN+hqxByJjVLIgs/R9Vg0y2X6ufJXmPuVo52ic0oElvBJ5L58/emrEuDczZUKpj5W13a/1cA== 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=udgfQd6/i/Jnf6563xx3A7VKmqOwhDuQSXcGbPkVVAI=; b=nBzAi1q8C35kdC38wcxPy6LHsTiKupiNG3gPfEIz7o+aSyKuvcdYx1B/+8CM7aVol5qTtAYTbK8vKTP8gkxOGnS7i/BrZHrVoGuv3noSnyGl7/zt9AqpyGLh8simOjHsICQ3YdCkbddxSepm+K5qD8WV5JtiFLlsC4qiDrD8UUA6axj92P67BCjQ0B8JVhZjAgDasXzozz6Yk+YK/3q1/z9ZMQPKCPlOJK+n6QaxfMcTSxoZ2NFTpivpbNGYuCv+ndf/kSHTpaYbmPKpDu7xZqffu8JgBhJk1tCCETW9jVkmegVwYUmhjshWsHfnzBRPrRDyziKJ3ev3w3LyoCFx+Q== 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:42 +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:42 +0000 From: Yangtao Li To: Miquel Raynal , Richard Weinberger , Vignesh Raghavendra Cc: Yangtao Li , linux-mtd@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH 05/18] mtd: rawnand: omap2: Use devm_platform_get_and_ioremap_resource() Date: Fri, 7 Jul 2023 12:06:09 +0800 Message-Id: <20230707040622.78174-5-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: 10b3e078-afe3-4448-ac0e-08db7e9f9248 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: Q6xP5/ek3yYfYK2KUr0dFrXGWzG6biQT3X90pMISYr/jutme9fHLpPXedXmxhMjAv+f/vRcNFl29ktFyc6Mq/9ZZ+icJ3PA4sBnN5HRO6NCSqy4xp1YWiUse+J9l9kJQvTxbRhzFENvPVDe3p+eG5g21zQXJstqxQAnlC8QiFli5QjuVuEF0P6uHSbtO4Nbj0bcMwXjJpQn0ZXk/EQw/+z7uQ4FXOD7EIkXypc6zw7OQB1lh9kOl+qkL4RWAxUjB9Gk3dDtCq35C857hJHrZfy5CxqdhzD6MRE9EmHbXN8RS4U+mls2a8X/ctyZ8RzoVHVtR4b/E7s8a9YUrVYFymjItbCEWApL/E1/IFZWVIWtH7pFWZd0HBmkaCRHAo7Vkj5NgLOEvVlseVPJcl5DyhdBm9DQTK4vOKZrrpXYOLeVzXJte3QZy4lvplMGTOj8xMvo7MESnz4Ijs6Ff4nPaChx/54sk5DBF0qY61L++XChuEmHTBVjGPSaFJ1mDI6K9CrcnMhSXP/+1z7U5WwR4smW1w8mhM4kXnxPWCIn/gSM3yri2I3t4mBvOtr6hDsyK/nl/4iuiJMS0Ad0oAK1N05RTRJhjz7uZDqY7lGlGvosiGt8f995pkh9X51NZ05xK 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: Qv2EKrlOvEwW1tWIMbZ3oiqeq6+mCKv9uIENu2RlQpJvL2osa+H5U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/msPxJVgiocLLgOfRApgWUv3dazynQMQphonPu4Ukiu6DtJrvHVsF7C15tBKXuTADHfA1h/kOn1t85dS6Fy4yQai7+JH0OERNc+E81C7Zhy4iCNTdp7Hg7TjEatPhE5SyF00T+Nfwpw0Y0C6+s/GFNbpC+DRaOBKDFWCI2H5+VGucuyaEqPHomIav4tJbaslu6C6xO600kN9Ax9ywolVwxiJwxJa3vMr0+67qTrV6GMHiWiUJOgoSE60xawH8/aU1qnlHbgXcyBBWnuWfD4yDYT3JAB3hqxRWO0HMPg7Qy8vcxL7MSlOSm+AcDEKkFnIl5aJbE3Htqrb6yRk3LAlfwEQs0wSI9hCd2osOCu2sfT+i2EBSgiVtImM+uHjGVrHjWIvohwnLETEo7rrjZ70O9ohzHiMQKYGvSziB2Iq1cmhp9j1J5tByEbGqPp8AeTw+4w41mz/MhG+itWIfa X-OriginatorOrg: vivo.com X-MS-Exchange-CrossTenant-Network-Message-Id: 10b3e078-afe3-4448-ac0e-08db7e9f9248 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:42.4326 (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: Fegt7WeuoRPiWkCuU/UdFsxs+sijPA/npfE6+vxIU1l+r0y84/5Kgtfvfeuw2F7AJhmmmo5DW7zSElb5zC3BKQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: TY0PR06MB5470 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230706_210654_714617_B8BDA656 X-CRM114-Status: GOOD ( 10.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/omap2.c | 3 +-- 1 file changed, 1 insertion(+), 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/omap2.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/mtd/nand/raw/omap2.c b/drivers/mtd/nand/raw/omap2.c index db22b3af16d8..277d16f1e0bb 100644 --- a/drivers/mtd/nand/raw/omap2.c +++ b/drivers/mtd/nand/raw/omap2.c @@ -2219,8 +2219,7 @@ static int omap_nand_probe(struct platform_device *pdev) } } - res = platform_get_resource(pdev, IORESOURCE_MEM, 0); - vaddr = devm_ioremap_resource(&pdev->dev, res); + vaddr = devm_platform_get_and_ioremap_resource(pdev, 0, &res); if (IS_ERR(vaddr)) return PTR_ERR(vaddr); 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/ECyo6yOKmVflejL/c9DQ4lE9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AzqAxUZs77Nec2sA4KlBmmB+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]); From patchwork Fri Jul 7 04:06:11 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yangtao Li X-Patchwork-Id: 1804569 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=pIzEkSAS; 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=R7lFxEbB; 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 4Qy0Gz1g3Lz242W 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=INP7y5hSQCxDpXl/86aNEvvznmeRBGgIKzbaxhiTU9U=; b=pIzEkSAS4C+C7p s9xg5Q/2lIP6gFhwzvYzjXZpzdg/fkYATTvo6I4cQiz87UbZb0Chpgir7f6Um+BAzPMEoyspGGa7p Jhn3rPl2LbGIcc3aJwBMMSvUzBhej9WseJM8nKaFbKsnquvahCligBW924PyxczM1zO1NGdFsc11B jCwO5ZLxMG29ZUqswcjMXeDOln7VN6HV0mwNpirjbUwzpIcAmGB4QMiWNZl9puqVrDUbwbajNzjOk ou+mnUL80BYRWF0nKcbv5XV0HuXqzvsLdX4zGfR65AK0P1q6cR/64Alkb2uQefIoDAJWNOYmvzVTx +5b96TRtJhpftCql2MAQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1qHckH-003Ppy-0x; Fri, 07 Jul 2023 04:07:01 +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 1qHckD-003PgP-1z; Fri, 07 Jul 2023 04:06:58 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=EdhbN3fS2E5q6N5XFW5tNpxBzsAVlVVaDDeUOMN5Lh9u4diqSnl74RyDz/8+JPNNqsdIGYEFAlrla0amD+2OXubfLidNbHIphwTlBKF8L8mvGmpyGv8DobKFlkZcO1uXlIslYfTPXX7vzFDhBtgV0lf8cgB7mSR1ieFo0x8tvumZHx9BwwC2b2Joz7qyLSNfNW2jJm5CCJ+m5Chae1Gz2AZVsKfEjZXn7EeYuzpanOu65VINlf3DA+1xfVaO5iIEGipQnkbKZDI5RvmpPPUyaMLsqYPKtAEblEKYy4XSGr0d75Vvd7c7VqrAXL8BQTH2c+ozmr2KMH0psi87x4dy6g== 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=sgm7eE2bmKEI5fpeOmzp4sqjc2lZD0DlhNw0jAUyOzI=; b=NrXjW1ShELyOlghPggHOn2cpSrXnM2AdlMyPScXiUefY83ucZsDEP+RaddgMpMtudSH896um9yKVEGWnNBIA3rREQxXPGkTjAzhrHQTVjCT/gUPjjvApctr3BQ1Vn1D03z07ybvdf5wiXrvNS80HhAqTWvpVhYiWZUrldzlK/hMa1ZekeW1X/hUcsmLpI6u46NjzD48CJqLZVrHTqJjGb2nhzTBMJ2zE0UHet3e+eH+vJm0z0kvRNaFpkmHhR4ejOy0LtCj7fRnJJeEOHP98XKDewTMyO4yNZglHsUmI45OcfOebyYrfbKOfLvjZvC6b4AU5IK+w4RpjWw0Pqm7FvA== 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=sgm7eE2bmKEI5fpeOmzp4sqjc2lZD0DlhNw0jAUyOzI=; b=R7lFxEbBuTCjdyuYXzSPThVlDoXzcQQchCxW1Q+ZyEc8UTyvb7cTvQuK1Qve0nr6gqQIzV5CiQ0hZlHrm3h+MJKvbNiR0Xww3sade/fz494lDoNzR4ddcDGU1Qo+dyq8oWShkP1mB7tZTg/g3f0yQi+qvYiPA8Z3JA0gwtkXJ/Jn22JKnLNGgdBUTvf/+JIkzBNl36dHmIBHp9OD27bCMZAlPsFwboB0J9AxNfpLv//fKKBNbwIQYxG40Pk9GxnGuqMfSoIOTiB93EN45qaZPlVinx13k1qxOW/QnbUx2BkkZSAYx1hGM0uWITqZBnJw7GyQsFDaWrpKHmFVRyGk1A== 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:46 +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:46 +0000 From: Yangtao Li To: Miquel Raynal , Richard Weinberger , Vignesh Raghavendra , Vladimir Zapolskiy Cc: Yangtao Li , linux-mtd@lists.infradead.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH 07/18] mtd: rawnand: lpc32xx_mlc: Use devm_platform_get_and_ioremap_resource() Date: Fri, 7 Jul 2023 12:06:11 +0800 Message-Id: <20230707040622.78174-7-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: 615bddec-fd8e-4f6a-4865-08db7e9f94cc X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: NLSpasnDCy2t3lQ8+0S8/w2PHH+UjcNH1dT+HwaEbm2gUSMjtwc0WW068wkUAY+3KrpZfw+aWvrFo5lJMGdL9RxFgZalOq3/LQVHCLcZRSSfxPnp2bF8fTcxv6w1JfyBIdyV85MqnA6Ya8dj/jcrSHTzcKZQVPn2VdAf7oZIbV4WxkcIpYcSwraaDzBw1ITaFVRypi2cKQica4T025pDU0yaAwgurAK6ceOb45QOGvO+h8QVQqvlT75UprM1PVx0b94fB9SN+ZUHxIOIX9rC8niB8LHUjn9uztEVdSj/ln0aQ6i6NPut2fPjaLWV8dLPzgEtZLupyL/RIwVMbiPoelkWqxGMG6qcPs2kqnIkOMNWvA/K19eULr0asO1ttnr263WYuAIfB+D+G/zLV8B21lH+cHnhvByBDa4dmDjfVD4NSTSY/5/h2vbo9Qhe9O3l+tLcJQ+nWdLGghK5tOZ7OTKSqwsk6I0D9QraP2jHGiH/rIe9As0rXNCAADh03SJIS30iT//2AM3N9o9WRxI1U12Q18KFtqdIqrdtE3cAcp0KclT40sl5/mQ08wmPK5LN+UmK0N3avHyCEzMFOYQaneh4brXUoNz73N/+HaxqaYEsx8Ox3skvEyAi4LX1SSsW 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: D8SnOpo4kQqf0aNCirXSU7R5dniL1myJIYG/sxzgvuxKfx/qPTBokbb2Y6PeCqp0wtxjd5Q0EPaAQEBytqTGLjGqz+TuZNR4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pUPeoKqBejC1u6L0ugxIVBlnhfhweI19LfZHwgU9rcbi9cvzCDN3eUHMgtlAGJGvi6Nh8v7WtefkERVx9ClV2NHv/rabYpM0jGC2vWb3iGNFA3pZ7I49S6ofLqs8CSzvSB2hOnfUKm9LzzoEc+YclRszb4XR0t+2gJa7JSgpZ5dRMyMYd0CmP5yJg3Yv18LcB57fcvwBAzeHWap7UZsxomSragooeeC7PGXxUs+MQYfoBqU9jt9RFkWOs8UcR2YAIqXpU1z5EcUU+4XpcSyrpQLjiE+bw0JYu8MKcrXF2EcPnD3brXomZ3UeCr+PEU5A4QY31qbxUob46OORE1Ipfd0Gh2inX6yW7fFfTnOKv4BXzH9JdjE6OTaxm5Az6gALuloEVpqG585rYYMT0xHu92kVARlpnJ8tQQXpxF X-OriginatorOrg: vivo.com X-MS-Exchange-CrossTenant-Network-Message-Id: 615bddec-fd8e-4f6a-4865-08db7e9f94cc 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:46.7237 (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: zeZuty42X5GDQMdNttLnt6NU5nrllTEUUOuRGsQp+m5jQPGKF1cDPd/75P53MJxrqDekrE+jGxFRqvu0lEeO3w== X-MS-Exchange-Transport-CrossTenantHeadersStamped: TY0PR06MB5470 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230706_210657_675845_CF30DB05 X-CRM114-Status: GOOD ( 10.56 ) 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/lpc32xx_mlc.c | 3 +-- 1 file changed, 1 insertion(+), 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/lpc32xx_mlc.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/mtd/nand/raw/lpc32xx_mlc.c b/drivers/mtd/nand/raw/lpc32xx_mlc.c index b3136ae6f4e9..488fd452611a 100644 --- a/drivers/mtd/nand/raw/lpc32xx_mlc.c +++ b/drivers/mtd/nand/raw/lpc32xx_mlc.c @@ -695,8 +695,7 @@ static int lpc32xx_nand_probe(struct platform_device *pdev) host->pdev = pdev; - rc = platform_get_resource(pdev, IORESOURCE_MEM, 0); - host->io_base = devm_ioremap_resource(&pdev->dev, rc); + host->io_base = devm_platform_get_and_ioremap_resource(pdev, 0, &rc); if (IS_ERR(host->io_base)) return PTR_ERR(host->io_base); From patchwork Fri Jul 7 04:06:12 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yangtao Li X-Patchwork-Id: 1804564 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=xj6m3k/u; 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=FASkjbtn; 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 4Qy0H06kMLz242h 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=4ojtUl8oT7MIml8zRDAH/GvBf9IfEyOW2Vpmq2K0mtU=; b=xj6m3k/u7iyCWo 15m5r3c1F8dQWTxGXXIhEy1kdUuJbs6HGtL4lcgMsWnTl1Iwv+zg1EkwFQW2KwZTLnPpQrLZYVolo zm0gvGQmDA7EAlKs6+5LSDs7QEPWzFJu5enaJfFV4Gtg+TxIANu2kM2LEMgvBEsoTgn5Z7TI9H4cU FG7uRVQHPl1rHPN6EqvOjxiIoGrf3Dch64hAl1R/eLTeccM0JonxXx/8Vxz2WG3xiUZwshwlE/Rzj iB1NAbiHxhjTFBquCbM0B5e0BZ0sBsdY6MvUfisbak2sdruUjddAs6hpwBXEa0hZYtVKFiF6dm98Y Exz3czx4292igluo+V6w==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1qHckK-003Psz-1M; Fri, 07 Jul 2023 04:07:04 +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 1qHckF-003PgP-0E for linux-mtd@lists.infradead.org; Fri, 07 Jul 2023 04:07:00 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=BYa9FCTr/eE5QdlZXVuSMcNSg0aPnmf6Cq7esY4cewnDbRKmKT4E0IwVheK3m/V6l5Po3nhPaynBGuopvNPih8Xk9Sw6wyw1OX9Sen1j9rmNi6iCDv5gBmHK3fkXnzOwdqu6lWmaTGc4oKZT1nVbCMSGltGDTVV4NsyEZV3y1OHYDuMPeSoVfiFQxOswGxIE/hfqD7T9Hfpxc+QmhMd4+HfRbcRYMdAa0Cgs4pW1nXfPdw1SzGpP/fuMFw4USkJOQxRdUekg27bjtzEOs/BLu0DHCPXH0Hha7AtcA3hFv4Oh2GSdYRMJv4nBonmlrX5XdMVD2QFMrF+2kE7dxjkctQ== 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=oKvDbD2UhnuQuWo1K6WXRj7t6N4tYLBRnZSfVSh4zDE=; b=GA431mLMrvx7wudr+5b7evimqhDpmn2L71gSYWpoRAJoqANMwo+cgyjh6h+2Wjns+GIS19T+Ict6Ryav8pdYec2ofVo8JP4wasD0hjkYggRv2vLG79ey5EzLx9DqHzpyhuwUu5spYXAatgThZ0vNpO0saC+Fexn+NGa+4Wq6fdhLthLIvIq1lKALxApCElKneCRMLopmRvRp2knSlmvTorupbQWefxpwIVg2Zyk6NdCDXel/+GRb/1jmrlWK4CrXSgzRNwbNwMGUKKNxinRVwP/TzNW05q6jIEkda7AIfN00RpHRIfvEcibEGxMcG5yZaJ8Hz9hxYYQV3wE5Os7nSw== 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=oKvDbD2UhnuQuWo1K6WXRj7t6N4tYLBRnZSfVSh4zDE=; b=FASkjbtnbAaC1ukWO8l4ROMARBZYR0vkie3JrYUpjks00PG5pjE1RQbK562gdzi4nvWGR3LS05wVn8IRvqgQt7YHmP4/L2uvpTsB3NyKKkz+lgIJ8eCUQkVeKTdreBL/eL7eEF1OMZWa84agtqnLjvFbJjxfAY8nRlzgmj0lZ+eof/j4zNweaHjrhaxJrLg8eqQPNY+NXQhDy3AkC4TVJk4EsF/j4Y3A0r/jvvguBougruWzQG6sX9AVDq8DHDr7n4mTvvnUaZ4WOZ2/dQ98lFaYYzaJ6nN9cUKcUKdVvOXS5YoxfP9WZCJs6dXlIaRDf+Jq+my8epXlhy73SIpR5w== 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:48 +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:48 +0000 From: Yangtao Li To: Miquel Raynal , Richard Weinberger , Vignesh Raghavendra Cc: Yangtao Li , linux-mtd@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH 08/18] mtd: rawnand: fsl_upm: Use devm_platform_get_and_ioremap_resource() Date: Fri, 7 Jul 2023 12:06:12 +0800 Message-Id: <20230707040622.78174-8-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: 3857dcd6-276b-47ef-1ca9-08db7e9f95ef X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: rFQSeAspfp2lDFKlxzMlPhTf3CbT70KjF/itr0/ihT9zHgsBBmvOvMHWUZHtpX+h8PObOqACrVj3RRSp7MuRadLHFP3Cv69TCKmYRqLbtwJ1I6n2P7qyOG9RvVmdOrgktO+rGBqRR8fJjIwIDkFx/jP5wRPsyW3BHa2jZx+BZy7slfJK7JBp/p+3IXptnW/L+xkk39CKlnyIKnf/DTG4GJPKZVyIXXceNkbCqVV96Aw3YSVa/AQYQHNj7mZaEVz/q1DedG+pqp4wBkb/vk+Tw+KL1JYM6V6xRUhTf5Om81aMP8VIvE22vnxPT2QDIYLIf2lwli1yxogo6K8qvC+V+8KUYdksL/3avfg8reqtNdo1938mGGomsuqRt0cqqfK/l6Ccvc7ymu2lx/hH/N34y6biqrzWW0eZVXHdWSZIFPCcsz3aSB1CDZH2fqOdg8ODWDSdNNFgpEDMB6Ay3KlsLzZG65KIrn7nBpIIdDDTfQKNVeyF2zhjgq5ziBnpiXJsC+l+yGSs5hMsHSTM1X64HUAwZS/wwNiE5UO3eRlR1NlJcJ3JGi0zSsxVJjSnVjcETYQ++GyQdigQOGDMxCUeZ425VJslTQgysMo3/tRNTGAVsoewUtktWdX3AJ8BvxaW 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: 2+91pixTliuzBm287BEnS41LFXujS71RJmAANe8oHAoazx6U8JMg+MZKbeChNQlyf2hWxj7qMsQGb4Ik4GsZFl1AYx3GF8pcaNhiGE7BI+DRRJpbXOPu97uXuoAsUa59rbLjpj6zHIS4V4IpCkDmIk4YCOtqXVq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R1wg2RX9qBQ88id8UhloWunHJt2Bt3GJQJ4QuDE61CvyY3Ur3FiWH6D1slrYv0YIZkBkOBQqMjiCpnXdjkI3m8yPx1iFEkyLK5/gvxQ2vcnXjUc+iphlAyTNKAY0GY0A+PZoj6gi5Zn35ugvEGP1w1dELZYtCbhb6G/RcFwbOqjtN0lLne2gGe0ERzqwHzH1cZTkNh7K8MFs1q1GHvAX0YCPw5ADFDUBoK9PixLhZ/xPaW8lhikB+56INRNTYxuBb3gCcUkVjyYpZmIYc1r6SM+i7Op10AG5//ePKi2E9nuh/J6FjLyOjlBGXjz0LqvHwrp7AfZq3CFV3/K5eNSihgLCF0GqiPumTmW1eq X-OriginatorOrg: vivo.com X-MS-Exchange-CrossTenant-Network-Message-Id: 3857dcd6-276b-47ef-1ca9-08db7e9f95ef 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:48.5376 (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: 6bmuMV//wz8Ld9Kobf/NgWmQO9I0087/ej25+LwyF7dhO18bvDomWkPWsa6LkMgYBZdyQgId6OXW34xoFWKMEg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: TY0PR06MB5470 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230706_210659_117912_AA822464 X-CRM114-Status: UNSURE ( 9.95 ) X-CRM114-Notice: Please train this message. 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/fsl_upm.c | 3 +-- 1 file changed, 1 insertion(+), 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/fsl_upm.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/mtd/nand/raw/fsl_upm.c b/drivers/mtd/nand/raw/fsl_upm.c index 086426139173..f1810e2f2c07 100644 --- a/drivers/mtd/nand/raw/fsl_upm.c +++ b/drivers/mtd/nand/raw/fsl_upm.c @@ -172,8 +172,7 @@ static int fun_probe(struct platform_device *ofdev) if (!fun) return -ENOMEM; - io_res = platform_get_resource(ofdev, IORESOURCE_MEM, 0); - fun->io_base = devm_ioremap_resource(&ofdev->dev, io_res); + fun->io_base = devm_platform_get_and_ioremap_resource(ofdev, 0, &io_res); if (IS_ERR(fun->io_base)) return PTR_ERR(fun->io_base); From patchwork Fri Jul 7 04:06:13 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yangtao Li X-Patchwork-Id: 1804559 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=NKRbSNOJ; 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=ObyaVLvm; 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 4Qy0Gz2SQYz242Z for ; Fri, 7 Jul 2023 14:07:37 +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=Igh2tXOGfguX/2R5JO/XCRWEO7fxdTMafmi1EmwQSag=; b=NKRbSNOJ5vDNf9 C6tjIYvRYXCvHGUh+Sq7IdvPNckoiZb1jiqQacARirQpXALTYvT0LFUEaLDAI2rKU0kTEXw6uxRYC bhYCcEW4fbqvmtlRRgSAVB9cPAIbAMj+8vSV+WP9Rj3G15EfX8UNXLkgYkdKK80b2z3Ws/6gRTuUR kHHeJaw8DKiMfTlx0X/ENyC9DrN4N9qUiAdk2z1ckGQWSfoM5LJm6foPdhwnHnz4cQgSdTfajBfyz ycN4ZJ/poun1FNIM36zcwzW7rD2ouFfV2kaiiXHovwTXbyV7AsDISBn7aL9wIUnR7kYHHFLhk7USD jc3Zs0FxmdtWn+N4lNwA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1qHckL-003PtQ-0W; Fri, 07 Jul 2023 04:07:05 +0000 Received: from mail-tyzapc01on20721.outbound.protection.outlook.com ([2a01:111:f403:704b::721] helo=APC01-TYZ-obe.outbound.protection.outlook.com) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1qHckF-003Pkw-1a for linux-mtd@lists.infradead.org; Fri, 07 Jul 2023 04:07:00 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=TZM7Tc5hDkOT69Js88pxqOGaO3PEu3uDjBmaYdEULhFc4evpYOaa+nN/if20TwO9y7Z7oxpzw1KFDFm14Nt/U1+mjXGbey6Hpf16TbtohYQDqBgP3wRTWKxN/FFYU7tnxsc8dx050YghhH/Xp7adHDlf6Ikc35SkGfbsXmB3dpC0X3l0OPNb4VGjW6P/j6T8+PD/K1pBJ95s+f2pdv1+ZpXFWwnW5sHIzOuLV2U5QPEExh90YKNEIpA++l0G/odvAGFqHl58JDNeuSsQolLuRd5y1FLruBSx67CtG8witPNfoxzTOeoWf3q3L7C2l/0XddP7SbskWguCtbC/dPMNJw== 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=XInITyQsNMj+hfMlycmip1bPjJnMPN5QO36XTxhOSb0=; b=PnC33IUE2EujqQSHR+5Jx8FxoYib1hvO/AtXdL+Sffj1v7nFUUGpaMIls+6v8JAJ2MQfmVk5Whh0isO2dh3n0mG4E+cW+Cyd7+94nwtH4Dw63uYP7Iw1s71Ob2zqE8S71RqLDGFm1hilRZ0YjD9jixvR0urKgsVQXW7NUfibw0XaMrAsrMsb87id5UyMcUyyoibZ0wKrYWP4v+VEP7r1vIDNZWi66fHf7wXckYFS/VvVD1SaA0QapseIauHBEnQJbEok6PLQK5eZPq1r46V0YuwH7O/jQe+gU4P60Hx/5Qvg5KsD0Cyh7vsCcDqm55KTgt81h/Jnds6H2JQiiSk9Gw== 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=XInITyQsNMj+hfMlycmip1bPjJnMPN5QO36XTxhOSb0=; b=ObyaVLvmSlVJk21tsxwsMcF0PDLmP8ybuWRmPgAR3XGfaa6QM4FB1kzJuMAfplIM6Xx32FlFHSh4YeuElps1DYSlDTnWKWTlvsbT7PvQj85NFWWifH/NHocJNNrZGcEHlCwkBEIpW+PXqps9XGFnt4JP592nyf/WpOso5umzWRNwK0FP+royF+1a5sb/l/N8A8C0muXhyD33BgCG3Au3Ux+TiRddETgV5N3CCbLxqmvsZHmXXVA3DH97C0FaWAIjunhZZDDR5TSMmhgVcHNmdwPtqa1hESK8e22BokU3eT0qYKP0ZjGlJ+nxh3IQMJ3VXBw0IoOevI4LQIpRXT4KMA== 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:50 +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:50 +0000 From: Yangtao Li To: Miquel Raynal , Richard Weinberger , Vignesh Raghavendra Cc: Yangtao Li , linux-mtd@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH 09/18] mtd: rawnand: davinci: Convert to devm_platform_ioremap_resource() Date: Fri, 7 Jul 2023 12:06:13 +0800 Message-Id: <20230707040622.78174-9-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: a5fb7b64-c487-4187-d4aa-08db7e9f971d X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: TD2NlGasPM9NTUX0SMQUAbFkYkYpaNyz+BSgf9Rxhki2+f2tkGnbkE5wfh+ILBw3x5gsAHCSjkSDk5GRmsIUnfY6tyucfXa/fzff5LWR4uaHk0ci2t2Mq1DA87Uh7hVF9/o/pYzv43U/gMoK5f2d5xxOy7FDBn0l0P8+Bwb6tbkYMLlvURTRTA4o5Uf3Gm/+ZwbZycg9PWcd5faIfTmHzowQ3Y+zzQNxEV7uoZv+oUJTijFiSTEQPdK6A7cVMDbRmnquJlE+/yiZxpPQUZev28KIExCizuyn2SC8MzHSyObfWP/tR/8Q9ut7ux7981wPlcIwP3VH2N8MxJA7Quw6OeuRKZ/tC/qg0hjCQH3zfH2/vCc0svP2go5DxcYjO873vwM869Mog5EcJWhWOW8st0PB7r9uMESAabapo7gFtB+c7eLUM4sbrobhLpbOH2mrcthpuDEc3qtUp8IXIsSS0DWUNUjoyjeDazDJPHtyJREq1vF/ojsf33eq/NX3qNLnU1IhDAgKdlIGoVdzQNvFJn8MTHEVZVoke910042W7tkjT5PkiDdMSpjwWVJrZ3phCc9+G+/kJ9XJM83IsVmm8WonA0rVl2+/z5mAzZss5S/kKN0vNlXNxApWH92OrUO8 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)(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: Gii6EgFVwVGiqwDhZ25MD5k2tnKOyvYLInN1ej+3tlUv6LfELkUqdnkgki+kaXOFA8YnVV/SSdncBn4Je09iSNZfWv+6Z8hg/RwEa6x+XzUBpDT/YCZ2OThd8tsuiCt2FhBOw2vocN/tLl/FPnapEyt8QkqTiCtL/huU7WqQVHVLMR/XkjrpLh7bFmAbIHa14ePytHKo6tpWn8CrqnXmk5wg+f2scdDVpLXkCj3QZpdComczM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mCQCCySlaJNtVm4QOXybj/4Ti8Y+5XXXwl5SwquVOMtXRnjyOIOVbtmY6Nlyae+QdbNF+0dU5ytoT4wKvykZVt1VN+AkCIfXDgiEhEFq5ZKRJiCU2f9BYlgV/lc3peVN71oQS+vcFpdFmhYM/1V8Zt3vgTFikBlUqk4U4vkF7Zmq7+2bx+QLDz2inEKE/DhfLSPO/wtGoHViXJc9gugW6z7Pupfnu4rCYW0scYq1KZFrrOy/Zheduph/GNwgTWsjlFBlv/6zgLv X-OriginatorOrg: vivo.com X-MS-Exchange-CrossTenant-Network-Message-Id: a5fb7b64-c487-4187-d4aa-08db7e9f971d 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:50.4563 (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: 282XpQA4IWoYnJxmCtXNNruJtMKRdMp8sKzYA80b71RqmUxyjFbdRULCSURqL+1so8+tW67chIWqyptzcTnmqg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: TY0PR06MB5470 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230706_210659_551094_DC9C82B6 X-CRM114-Status: GOOD ( 12.83 ) 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: Use devm_platform_ioremap_resource() to simplify code. Signed-off-by: Yangtao Li --- drivers/mtd/nand/raw/davinci_nand.c | 21 +++++++++ 1 file changed, 9 insertions(+), 12 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 Use devm_platform_ioremap_resource() to simplify code. Signed-off-by: Yangtao Li --- drivers/mtd/nand/raw/davinci_nand.c | 21 +++++++++------------ 1 file changed, 9 insertions(+), 12 deletions(-) diff --git a/drivers/mtd/nand/raw/davinci_nand.c b/drivers/mtd/nand/raw/davinci_nand.c index 415d6aaa8255..2db1cd1d3d03 100644 --- a/drivers/mtd/nand/raw/davinci_nand.c +++ b/drivers/mtd/nand/raw/davinci_nand.c @@ -710,8 +710,7 @@ static int nand_davinci_probe(struct platform_device *pdev) { struct davinci_nand_pdata *pdata; struct davinci_nand_info *info; - struct resource *res1; - struct resource *res2; + struct resource *res; void __iomem *vaddr; void __iomem *base; int ret; @@ -736,26 +735,24 @@ static int nand_davinci_probe(struct platform_device *pdev) platform_set_drvdata(pdev, info); - res1 = platform_get_resource(pdev, IORESOURCE_MEM, 0); - res2 = platform_get_resource(pdev, IORESOURCE_MEM, 1); - if (!res1 || !res2) { - dev_err(&pdev->dev, "resource missing\n"); - return -EINVAL; - } - - vaddr = devm_ioremap_resource(&pdev->dev, res1); + vaddr = devm_platform_ioremap_resource(pdev, 0); if (IS_ERR(vaddr)) return PTR_ERR(vaddr); + res = platform_get_resource(pdev, IORESOURCE_MEM, 1); + if (!res) { + dev_err(&pdev->dev, "resource missing\n"); + return -EINVAL; + } /* * This registers range is used to setup NAND settings. In case with * TI AEMIF driver, the same memory address range is requested already * by AEMIF, so we cannot request it twice, just ioremap. * The AEMIF and NAND drivers not use the same registers in this range. */ - base = devm_ioremap(&pdev->dev, res2->start, resource_size(res2)); + base = devm_ioremap(&pdev->dev, res->start, resource_size(res)); if (!base) { - dev_err(&pdev->dev, "ioremap failed for resource %pR\n", res2); + dev_err(&pdev->dev, "ioremap failed for resource %pR\n", res); return -EADDRNOTAVAIL; } From patchwork Fri Jul 7 04:06:14 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yangtao Li X-Patchwork-Id: 1804556 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=jYKb5LPl; 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=Bp+IGgls; 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 4Qy0Gz22kqz242Y for ; Fri, 7 Jul 2023 14:07:37 +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=JK33zOQNp2emrz2aiUWmXsNlZd/yxvV3jGVjU2gn5Tk=; b=jYKb5LPlfaKmzx 2vD2UVCoCwURYJ4vygqIH2TJCN9DMM+bBFGe9RhWsCDl/HidEY2cR25VOGM3oPasp0/4RX/oBG2Dv yZjFOmc2jP/aJu/Ba2iqQWUshMeMqaGm1dPLYl9Zr/q3rdhGcPfMLgy+6tzKVifK/7+QmNEIfETf0 YzeIPC1OT7/V7duvTBFAn5wHB3mBSzid2XiKGSR/uJh9KY88ZsUeSI3/9vEe5nW8UX7HF+q608/is FKWz1x9LdWSN37AaOgAtj1ZQ8z3XkcDEHL+EcJOpyl6yJMASilcDVQ5h1pH0c05DUjO+CvQMxTOim Xe5jIcX0Y15BeRTl2dsg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1qHckN-003Pve-1g; Fri, 07 Jul 2023 04:07:07 +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 1qHckG-003PgP-2I; Fri, 07 Jul 2023 04:07:02 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=ax3CyInYUVpNh1QUaQs+4P9aD6+UtlI09xGxLIMOCsQ57b6BQYc+xK9NCKvqFVxNloTG4TibI4VsUDy4T8UY6sTDOL/kMsK5Xlww5U6dverwzulY1GfGUBnvrqLVwE/Us76X8mpUiesTOdKOaI1BIUn8p/loRO3AA2v34uhwjpG3llLmSAlTiWnbNqGKw9eLZv2sBrTi7TuCm0bZ6zxrrnfI6KsLAM8/mgQbf3kYBC2HhY716roYsyoqPNUaJsAdPjeDHjmVxxB7/9DnRzzb7R1DtBKyF+R93Hds7MX/77xXiVrlL6o4gG5WZNsxF/oi29/kBZgFESorHmfBYIMGWw== 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=2q2+f3UaUtrv39e+e3MvLdBDED5EJrbT8+Jgrx1WuyQ=; b=iq0GEOI7GtIG0Mff5+FBHxGmWyueKig/3J5nJk/8mQkg9kFD7HolrSBCg7WrDQoYkjsWNJayoMGIqVWkAUR+RiJnWYe3jTjnGFpCH0sVzyJooFKGwZMa6mWcENeVqkVDCcB6LWj7MKbngs85pBsuPk9XDS9yGHsUx/NrFu0fCkPQ2e0zukKHYKGJpTiAd2MPhJ+uMUlIhgKfbWk8cYXTvLntN4TyHClNFj7B7WOay0NVOIRiaA62HLdfohJhn5cmFPhBpuutc01npbRHClKl5oNYbLQKLXXtsPLb9A671u+Bt2RiAwx0OrJlvlWcUcOpRriG4c4sdxr+pkFAK3HPTg== 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=2q2+f3UaUtrv39e+e3MvLdBDED5EJrbT8+Jgrx1WuyQ=; b=Bp+IGglsMA91j6hCJiKFP2p+QiavofrEQ4Hg7zjasgkGjuzCS0d2Ug4GkaQSiry+56Ar9yvywzUlw8llaZO5qD9Hiw29B42lG4mQb8xgm5dPh6Joa9arWCja+2WrXaeonLwz9OsLtjKQEu8r8tfk2y1oePpiXWbBfZUqbTdWpptR4ySLQIVvYYMC2Wolqbw4U10QtcN5+3c0sjWRIzEl0NnOIW+FjHepOkfyeA3FA2zMN0k4xHi1oAHO3KsdWK+92rHER+I9oBdB7FL/HWM9Wf1JuUpJCQMwQvop6DvV9ux+CsOUyn2yqtCHOmYh8GOpTngo4/02GyYuvYYE+KEyeA== 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:52 +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:52 +0000 From: Yangtao Li To: Tudor Ambarus , Miquel Raynal , Richard Weinberger , Vignesh Raghavendra , Nicolas Ferre , Alexandre Belloni , Claudiu Beznea Cc: Yangtao Li , linux-mtd@lists.infradead.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH 10/18] mtd: rawnand: atmel: Use devm_platform_get_and_ioremap_resource() Date: Fri, 7 Jul 2023 12:06:14 +0800 Message-Id: <20230707040622.78174-10-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: 0dd4481e-b5c3-45c2-5278-08db7e9f9870 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: d1uj8fa7Xr3yQ5L/HzmNsiBywlz+cd36XsMfdle9nSCFbPyjDxXaLQBlKbNp01YhVZ5pIwOEbTSMJNehT2QO4wrYBkPOM+1rf7HuktxXgDZ1kD8iPeE/JFMcFtael8wapSistgpk3N613twGUprRZy+2ZysMGQEsOwetlUaCM7JvQL2eNnFmeFtQU5qbzEVK1e++WfJc35bU9A8BTfJZ/m0oi+whaW567XddmQHVJSJquvWGnKGRcFh8H8+JFn1A73ZPNtXxF4oErqPzCcgaKhYxS0amWqrKc5Mv0UeOH+kUY7wOnJ+mA8xf2hAaXtujnwdYA6HxCNNHEfbeaceB8hBEFBQNH+jYavm6A55CE4j97z6LD/ofKAuYh9aOH1r93GuNUfSdD4bXfj79Q8ihdngltKVcK/1sIPdPW6lPYeGXdz6xAzykdwIiAz+xP9NfPLtKizzVEbdAE61aP3Hqd6afNntMuC2c/y1WPRsOO1XMnWJ87n1OP17Jb60rzuHl5ktHX0RUq+2sQfmfLnpv/jVpg1jMdzpBacksx0+P1Ah1cps46xBaXY7ZQcVOvdVX+nIpXlXG9TOd34GcxJ8tnjH7MgMVhW9bjxp+BfVTaO3718W0M4zTRyWI7ACO3DzH 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)(7416002)(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: 185zHx+9n97puVq94Czeth9zzrevhpRC5JubBrD9IE9GWkFMrg4ubDIrQiKJPm29lA0oHafWHAHGqzHE8WbLYQHjqeeqpvc7bn6D5HZcg8bbYppw2g0AT53mkRdHym+RMTw2lhdlAR+KIDiQpn7CVHjFdOfs4V77G2+Qvhj5JHqqvGzHiC3/QcBnuWptYrl1cqaKCs8XJhhUKuj/mBQHf8+dJt9SJUdW0NEmIcwV2ookBF2+Z2Csw4K+Cv/94J08SPu2En7jIMxWLEcdl7uA+4A05VPL2/lF2/j+Lxb1Lm0RT2f3gSp/hJPlwaqEDyPGujQ3mKFQmL4ch/k89IIQjzKhrhMiu/jyxlogG/8K4DdQ6oZUAkDYeKv/tlgLgrRfVxfKsw8ZTsBzhtfQMBZTMQ9va+VZGr6RA1nPQbkNh0rEtlpiwxsIy+IdQVnhTiS1TebF3iaHMbob7UhCaLZeJlrYm2vqfv2ft6xo1Rzx1Oc1vJrqu6Vo53n9H0AhKM44+l9HDYmccsacQLRetKAp+K3GUTM0fd11jpdegdsueF6zR8wSoG7RLL10ORpKXi4BvhM/mdJnwp0oxCj9i4g41bFZaxZVfb6ejVJ3Mg4phSszjHM9Ho+M1zpO7sqWXXMflFZQWdk6CAoYW6ORJ/7X2MeGkyRVez2oc6yu2qOse7cxHQLUNwfG3jdoBC2paTJOcTj5lcpuEoEE8Ws+vezm/UHNGqepzYJrFN/OFKBGrab5HpVdObyW7TYUCGIDvG0wwVrs58LuUEh9b88DNeLZ+5UQudt8+wt+7/yrocZPt+J6s1+YJuWwk8etisBncuBbw8Y+mxMN3/PL6ABmby5htkFU5lriuO/4topgY+8VPfKfRTnQVEgky8IJ+bBQh/QjAMXhM/uGxnwXi7HOmnwGqId3euOJ0Jw1aGL/nhhTVR1oM1qskuuielEQrHcf5Pyp8eEYgVwnsCbMSl5TRSfVh1ldm45qO+I8wvJb4H8MW3s75uRm27urpI8bzwrU6KKAhC37Hg4AfvWzOqJVvxx86yyfC2G00mrXxaOVtxBLGFmR/0UQAq1Q/WtvvG4Fh5SDRj5N8hXB9l8GAnB20XzosSh4WReA9Fkp0tGB6g/Kvj8rzgCUFLyIHxUbJlVqkrrFsY/KR9yC2VdnsaEGyHoIXalnKsNkAdDpu5irAUIStgmZM1MxdzRgfRluDEW1DloQJsgB+tVHzppJXG/ocKwFYmiyH+lgSmMW7FVUbfrdrdAf/ko6rP1kvt0e4gF3A0zaMS2r1+Y9uTKA+blF8z4KiOlaYbFDHUV/mUxIml3TyYQczO7EOVgnbP2SObMID3nK/nsVhmpFR9sPC6duqY0kVY20qEHodLR1JhzuXL5/6br6zsGe1B7fIrpzwsDfQQ0HFEoL7hFtD4yS/Iuv/zIxC5Vkgr71p2me3coDBpTNdlp+YckHlFut3YQcoc2WoVLFtOJpCxVmemWKOt1TzEx/oTeYup2LZklhBetQ3lhPWjelGkvMPqOveBeZ+yx5O7+6fmSPfsRj2+GJfQw5zmsG7FqC+DFsI5Hk5pL3w7YxkLaziT33+n37Zjs0H8XwFZW5 X-OriginatorOrg: vivo.com X-MS-Exchange-CrossTenant-Network-Message-Id: 0dd4481e-b5c3-45c2-5278-08db7e9f9870 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:52.7549 (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: C9izdOpqDKAb/esxGMHs7FGQte1KimDJHa4kw3Px6HR2eC1YjTw2K1uCWOnerWJDRCqSCeLMmablsswPfhiZtw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: TY0PR06MB5470 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230706_210700_757251_A8268B32 X-CRM114-Status: UNSURE ( 9.80 ) X-CRM114-Notice: Please train this message. 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/atmel/nand-controller.c | 3 +-- 1 file changed, 1 insertion(+), 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/atmel/nand-controller.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/mtd/nand/raw/atmel/nand-controller.c b/drivers/mtd/nand/raw/atmel/nand-controller.c index 81e3d682a8cd..3f494f7c7ecb 100644 --- a/drivers/mtd/nand/raw/atmel/nand-controller.c +++ b/drivers/mtd/nand/raw/atmel/nand-controller.c @@ -1791,8 +1791,7 @@ atmel_nand_controller_legacy_add_nands(struct atmel_nand_controller *nc) nand->numcs = 1; - res = platform_get_resource(pdev, IORESOURCE_MEM, 0); - nand->cs[0].io.virt = devm_ioremap_resource(dev, res); + nand->cs[0].io.virt = devm_platform_get_and_ioremap_resource(pdev, 0, &res); if (IS_ERR(nand->cs[0].io.virt)) return PTR_ERR(nand->cs[0].io.virt); From patchwork Fri Jul 7 04:06:15 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yangtao Li X-Patchwork-Id: 1804557 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=bRkkWRs2; 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=qGRN3jkB; 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 4Qy0Gz0tmYz20b8 for ; Fri, 7 Jul 2023 14:07:37 +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=6WkQdKy8rrQcO/DX+VCTH4TbOXfoKgAnrybDi+HbCAQ=; b=bRkkWRs2SYuscD wT3CcOQYejmP5zu5ez3aJT7KxHh2aVUDtUQGegYhYeboDmu+Df7s1+ntAL6PNZRjmQSne6q/JPEq+ QYNXSFkpJY2guLofFVJJP0tlKp9tabMuHnPxleFHlxZXot/b1mAsd1oyIfP8WlwQVIKOXg7kufpgx aa0UNJkfdlMy6HdfVNPE4P18g+tm/LfNltfdQ0XNfFNsOdbrdTBpy7Il22NGISHzOvblf9DJ4N1eX ZlvVA9yeqAdljW59vNTIT1iDxBZAfzkHvvdtTiZd26M77VjUnvCAbr+2mgQVyWXBrv9ti7VvORuAg /ZqtqnTNeRnA+pnkmdtg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1qHckP-003Pxr-0P; Fri, 07 Jul 2023 04:07:09 +0000 Received: from mail-tyzapc01on20721.outbound.protection.outlook.com ([2a01:111:f403:704b::721] helo=APC01-TYZ-obe.outbound.protection.outlook.com) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1qHckH-003Pkw-0L for linux-mtd@lists.infradead.org; Fri, 07 Jul 2023 04:07:02 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=KQAziniRAkYTyHUBumjyd5OxbMuh3o7v2Im/KTMRunNCEtHMMV4uPcASPuH/be8LNmqHvz32OvvitSxbtiSTi3fWIC3VVGqWgba1TqMSSyjWlZEHN+Pexw+D4xJEEf23576RoUgUyMEHNbhjgq4GdOg2B6VDqcm+LMwRgGBZM7etz+loxsV29dgq97MceJMJ48unG5PUiEpb8JzeqEFRVpkz1FAVmWhIkM7cKDp6lx9KJMQE0Zplm1+QLxZva40ReraVx6MEaR+fddiV3W/3dXkH/8g00fChxP8z5NSVJoXMqNLqKEIMR1tLw2UWVem+BDEArtxnLMA1gO2rJ9RQfg== 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=W0+iI7AY1yI8a+yrMcuBIJJ035tveqmejoJEjMArvlw=; b=LUslpXhed2Qeu/9w504+d40ZfFK5FYrVLhiGI0VEvHXf+OUProRd+Vd+SHAVFHsw0IjYuVG035JKEZtxsWfCAQ0PEJKS9CqfhS4GXknZ0Va9b+QHh6ZV9YTovFoMJbTcUsl2iCApT3/qUA7fT284QiwjhAbGFYoYtVB5foSGosFYi93f6EuJ8ChVKN5n7jpvsl5JATUcjBoGGFpWgO8FFVH/zXFJHIEUXOyceUJISVwdwV2131DNKdfgvCbSZa2yn/1dm6KzrV684y3p4fQCMlpOfVRY1/RQAE057Wf2ciiIDvDQBTtrK1ANzfjObR31Mt9RhMN8J6qI0l8Y32afug== 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=W0+iI7AY1yI8a+yrMcuBIJJ035tveqmejoJEjMArvlw=; b=qGRN3jkB8GhJ6yHUXUbEyGB32dBUFeluWjdVlhg9g/5C/mRUWaGRO+Gqyt5GZ6AqYlgbn41QDAMCJaBLJp6Uee64rQ1HhuDMqJAhuAwu2Pl4QZao7oXEVF2PnzoS5PQ0DPUkdnbfwOZNjPE4KpL0rQaScwDgOfkXrhY3MjvJDRdHc3TZw8wG7rVIlg4ce+bedCQrae5KtNoBwdwK5bGXGQ28X9dbc4ISguwggUUe+RfYVGfH57XOrX6Y5v0VPDcXj637sooTUBaqHaQXAvwlJ0yuG6qQJn/E3AHORRwuqDYiaDU7lgLNis+kfvg9C/MfvgIPO0++iG5DtNJqbBAH2g== 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:54 +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:54 +0000 From: Yangtao Li To: Kyungmin Park , Miquel Raynal , Richard Weinberger , Vignesh Raghavendra Cc: Yangtao Li , linux-mtd@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH 11/18] mtd: nand: samsung: Convert to devm_platform_ioremap_resource() and devm_platform_get_and_ioremap_resource() Date: Fri, 7 Jul 2023 12:06:15 +0800 Message-Id: <20230707040622.78174-11-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: b1fd0060-9c9d-432c-d5af-08db7e9f9984 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: fPAtZTwIVgvRBjNhZqPcU0/mP0XuAiJXC9PaRRCD1MIIbnHZhxi+p2Fe6oFC4FDQr4jVgCSiXU0mdTTGPKWOUqBRCKH6xiTZ42Nx2Rre91U9W+CWk3/Vnh14NAQM/u/JOBZHd5Og3eD/1Hu+ill4lHh2RnL/wZKE5B8PAvLTlD2hlx1dsWvZGoP4ffiaeLntysUSazapgitFNQTqygSBgehJhPCD9Q0924hGlYeJG2OCC6UmAnPgDmlkwyWAAMchIsPNCg5rJ29K4nl1ozqkxLLQu1aHN/vMaG3KCuGIF5Ik5r7yxygI+HqgYeAOjwklnINd4sxbdyDxDb8IiM5aLXZqX3YDfrsFn0JCJfP113vv3h5T1kObKBH+CovNNKyaqlG1NcyiFvggfFnJxBR6c64UxrlYpEP+zqfEdioqrqUNJqMZ7LytPIxecATsNNjoq4Lr4ylqdbdY1owozs/lMdE9Liy+mTHO3olHG13gOWZFkTBcVVtbFf6+O6iJnnF7bm+qsW+z1aghUJ1nzebkj8dz7QuRejOjJaXW1o2zKQaX3qL0PVVLmL6VyrW1kVqEIDDFpA/x9D7izYQU3cVX27lECttClJvvxG/9z7rlJxyFG/y7UcMyDlZwlJoocqY2 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)(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: yrrKd8NvaXhXEJm1qjp6MSCLYc3qGi70xFKH7tJtyJFytwApRLfx+5NEhYx4EZgN4Mp4N2MnEEib/WStpZXUj+4i85RdJyQPxlKBXBNgmT7dK+hsRfmdBucC3T3+0LSmg5O3++lG0z30hOr3WMgmVBGAtYDcMcply5p2HQERgHwHpQUjMvH8X89Suhov+fWOhnlyTBpdoLqM4Mwk7zH465KGw1C0ybhlUxdkQQziqaKfdCBQtTk0y1oJmmtxCBXl9vrDI6lP4xG7UMQpRANXZKcWw8C/YA4tp7aFB0knVWf55h5pqwAj3SV7lqEaBbTxrOEwrtsfrZszG0lzfkddi0QLwyWoR62bAF3p33i2UzB57szLZSzeZD1NejB7Pvyf7SW1yPJkXZn7M9aDNwfsD2zauUtT6u4DwoACiZvrKQzdXUw+I9fa2jyNy8VW9v7QZw4KESNYcwYTolJk+fsJpNNa68VYHTboCxm4FXSwQcA8tsM77ATdaNDhO72CmnlYYxHY9a3rvS1FOlZ7pdkDHqp+p2DG+xLi8+P7L/beuqEqz35rNYnJMntcBryTZKB9si9XgzHZUS2waQrP/TCzit+xu1yntUeNL0/0KDT0/0TmKmktiOs2W6V0VABfhHP5HXDQJp/N3N2iSm6/mlORNxEdX+QCGkzdgKBEcj4oTH1TyV7Vs5RTUbHthiDmXtUFANTLXdxRCAVwlrR5rVMafBSeop4+ZgvJ5Kkj5/W/jxSHxfbedM3btjS1hgZtux3KEJMNm7Nde9MeDJpXdO6bzjG7ADveK1DTIdu/B+kmpgEJIW3TZItIo3731KM0SDxST7UvYMp7a7c3jKeLqGRii1CrBFE540hbcbcjisXUt93mszx86Ra4jGL8pM7/vKT39F2OHNqZ3YCBySCknOypskM+TvwrZv2vxdpxcZ80Opw1OUas7NnOQzHZglKiCTgejjNUeFxlncPajGGan5IBX6AqCjMXdl1QYX8IjFd1X+YFBVhltAboDAyLkI0haosk09o/oUkj1F3xameiMINMv3lKeaGxdaoKpUHzGBaU1Xe9jJABBq923t0OmAnNsLnJ/PWqN7fKDvyXcojHhDh9spYhUl4ZuC/2Wf2xkoskBugS5tjm8Lu6Fr/etwRo+N4KrWrVgBrDeAOjA3vqIabMOUh9QKcPct9VCv3ffKTQxcAaPwKO7+ZXCndcuoPeug1DpojX3Z2Vfu0/EjwgUUADpfKhQaeLG9a+Gy0wHr6eOst5VQSh2eh4xRnE4pVs4nw8E+s6hn4IMJh0PLJj83+WepdUft5aoZ/R/rWQps/cU9q84vL5ySs+p5qHJGIfwXsqsZRwPqiOl2Pv3Iro9Camwa73ii17ELQ1KLbzqnEQmbSYTIuum1FXbwIYi/2AKr2HQM7Tltt0GKE6L9UCdikF5XJhDjfAAnOD++94pLAzBKbcEEJpq/+16Whttr/95VEtdeZwdcSYyhr8mhRXk+zSsTH1Jo79/uDV3PrMwxTzgSvHvbyIlZ6kdoRf2Iwm+rybkqWW9d0BMT9WZhfouV3qMWCA0W8FV+NS/cuw6Wt1LqpnVA/3rbnC/gSIfvH/oAUL X-OriginatorOrg: vivo.com X-MS-Exchange-CrossTenant-Network-Message-Id: b1fd0060-9c9d-432c-d5af-08db7e9f9984 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:54.4860 (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: Tmz84jE+1ngclHaZkw1uGw7/IiCaGCgTv4S5VTSmNNHrSsRVMaopk3eKhPOJw33TJwfjNh1vK2HWC7w9ThPeaA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: TY0PR06MB5470 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230706_210701_152364_362C540D X-CRM114-Status: GOOD ( 10.22 ) 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: Use devm_platform_ioremap_resource() and devm_platform_get_and_ioremap_resource() to simplify code. Signed-off-by: Yangtao Li --- drivers/mtd/nand/onenand/onenand_samsung.c | 9 +++------ 1 file changed, 3 insertions(+), 6 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 Use devm_platform_ioremap_resource() and devm_platform_get_and_ioremap_resource() to simplify code. Signed-off-by: Yangtao Li --- drivers/mtd/nand/onenand/onenand_samsung.c | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/drivers/mtd/nand/onenand/onenand_samsung.c b/drivers/mtd/nand/onenand/onenand_samsung.c index 92151aa52964..fd6890a03d55 100644 --- a/drivers/mtd/nand/onenand/onenand_samsung.c +++ b/drivers/mtd/nand/onenand/onenand_samsung.c @@ -860,8 +860,7 @@ static int s3c_onenand_probe(struct platform_device *pdev) s3c_onenand_setup(mtd); - r = platform_get_resource(pdev, IORESOURCE_MEM, 0); - onenand->base = devm_ioremap_resource(&pdev->dev, r); + onenand->base = devm_platform_get_and_ioremap_resource(pdev, 0, &r); if (IS_ERR(onenand->base)) return PTR_ERR(onenand->base); @@ -874,8 +873,7 @@ static int s3c_onenand_probe(struct platform_device *pdev) this->options |= ONENAND_SKIP_UNLOCK_CHECK; if (onenand->type != TYPE_S5PC110) { - r = platform_get_resource(pdev, IORESOURCE_MEM, 1); - onenand->ahb_addr = devm_ioremap_resource(&pdev->dev, r); + onenand->ahb_addr = devm_platform_ioremap_resource(pdev, 1); if (IS_ERR(onenand->ahb_addr)) return PTR_ERR(onenand->ahb_addr); @@ -895,8 +893,7 @@ static int s3c_onenand_probe(struct platform_device *pdev) this->subpagesize = mtd->writesize; } else { /* S5PC110 */ - r = platform_get_resource(pdev, IORESOURCE_MEM, 1); - onenand->dma_addr = devm_ioremap_resource(&pdev->dev, r); + onenand->dma_addr = devm_platform_ioremap_resource(pdev, 1); if (IS_ERR(onenand->dma_addr)) return PTR_ERR(onenand->dma_addr); From patchwork Fri Jul 7 04:06:16 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yangtao Li X-Patchwork-Id: 1804566 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=2MLGgo4E; 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=fzEegoIw; 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 4Qy0Gz1wrtz242X for ; Fri, 7 Jul 2023 14:07:37 +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=gPmu/g9mKnEQMNVYIvfqQkDkzWvbsvsd06r0bmLsMHE=; b=2MLGgo4ERGqAso fgKcXZQSnK2BAD/qzg0J2ZF2O3iY+zvqpFCZHA2LEnYPiE4zpsDlRKkFucZ0NA4yKnPLhynNPlU3Y TdxwCvvda4Fvh/2CuAQR+obRJIvCRSCJC3uisz3L9Yml+hfF3QBCrI8xNG9a96phfQqml789PmjYD 2q2qXubl9AIGoFjl1AkhiwBw0wgMa0YZZ9wC2VxllXzvzHlMj4F/qeNQde8iNzmkMq88SO+cefHp+ OxA9e06B+bYNmzmRzCmW4t8HV7KS9CbO5t7uE8MMRZQwTO6r0ZzbmwDyosWZCXvSWo0Vjj0J7ojdY ffsQOLpeihBBDv85+Rlw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1qHckQ-003Pyh-0a; Fri, 07 Jul 2023 04:07:10 +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 1qHckI-003PgP-0s for linux-mtd@lists.infradead.org; Fri, 07 Jul 2023 04:07:03 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=DF+su9SEvbbKhuEbijPEKEzUxHEMki/3p7RFxhLMhd8eICmV2mdqpf8MAljE+cTbHazlWRaZzpBhMIntg1ZQpTZS4s7sIDFHKEgLjtZcpagwdyhVlbKormWdcTKGW/j4x1eUt9b8yq5xaOabtIa9PrabBfoKDvwlnkHtPjNQEmHG3ampfDc6YN2eV6b4/O5uXipFBQFdNKDCmpgJUCyfdkKK15KF8vq8YJrCRddwwI5hWmtB0Zhlo4ykU+c/6TXhbe6B5iRrf6X5GSpsRnXkgmihi6HzrIzx9OWjDn5T/QupBO1NkEllM79jvTHO72KSE0xD0dvJKJ4Rl1aRA+TXyA== 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=MjRAjnMaal/P3wu6xKBSm/lExPY9h7o4aVevsB2dRGc=; b=AAPSEBBvifVdYs0uaBLDf6Ie5Mu6Mg9QkqWVR3QrzAqMhodgQxLCyiT3v0/iTa+JepW9pxorEYTF2bR7WUi/iBxiJoD9UGqXfogh8TRe5C7D4gblmIsqwJx0ivKZJXCfpfuLwyfkCl0WgIATJ3VLsocJWgXoYBl6jBkdCvVmyqlrFwaeo3PlStnR2i1q5dXev+rolNNHcZ6p/ph2dYj/MZmV/hlFq0DvzFQOby8fJICo4qvz/crsSP0ozqPLavbhAFWWziMjRXu4g3aSQVQQ5nh+XD2c+3PoVhVI74Mu4WSq0K0LOMHD4G70EVdbr+Z4meScvq0IwnwdWUkh/2VUTQ== 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=MjRAjnMaal/P3wu6xKBSm/lExPY9h7o4aVevsB2dRGc=; b=fzEegoIw4x7hDl+vbE2Is+xYeXEtA34Umz1IXQu0/jcpNHStLQDu/TaHZ+4r/WTqSz5G1lhFS2ks+qN0CkEx0YcPMTTanz0Fp5IcN+XPOalgORe3V/F/HrC9/F+o02oif15J9I7G9Ro27PJrwCh4E6oenrKjmSbx7FtneiD3vyCCDsSLKf0ciHbrHVWVVIhqsfQEDEgGbxLJ61qwVkJtWs7Q4TGGjbtJtrzeopRm4myAAM799rF8MkwFXZ4Ukfa6+X34WrrWs/eK3Wvtn28RSrT8VGs1uL4Wxq3h7WN1Gj7ZTs1o82OWmITJ+wq9cMCSdpSvQtYkjGX8+x5PCj7d5g== 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:56 +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:56 +0000 From: Yangtao Li To: Kyungmin Park , Miquel Raynal , Richard Weinberger , Vignesh Raghavendra Cc: Yangtao Li , linux-mtd@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH 12/18] mtd: nand: omap: Use devm_platform_get_and_ioremap_resource() Date: Fri, 7 Jul 2023 12:06:16 +0800 Message-Id: <20230707040622.78174-12-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: ce92174c-ac53-46b1-5936-08db7e9f9a99 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: i5Lk75gVTI8Ys6dop0NQoBiOQl+s7zxTtbopvdg6XnFYocV5Nzd+qNFcr8BgBcmViyfZMn8FDUxZueCjLA9zZb8AaJ5gTMPnPndGRiN+7VG3dc2iNJvElKI406cHqQxhKbgFGN485FLFL6/83bMeXRsm3GGU3uAEo02FZqqP7nHlqTJ1XDNaqb38oZM8DtKpOBToUdgQSYRN5AaCMn4YU5WIpj3t7nqJOtOwDXgc75nRIwEReIjGVbjETVfFnr1+hxu+mxZcSrRA8JXwuCnvI3VxQSTTKn9yum7TEKH3aiPdc34myGAznpErCcEcz7pbcolo7n70KE9CVCbL+wNNLBjyBN3IuyNJGBPvH3+ECBmYsg1FKGrzXj7XeyNqaD+/QOESuzYwLmDm4R9/K7tx9LTez1uu/lXLaWGsbKeDk+97varM7OTjyEvhFEasujMVpplAWrkZAOAEEGHN66rKihbprmhtpXnHqvX/sq9Fy6pgfqafeqqiW8dvFzKYeZPzM1kuI6rmHC478Dl05pTXNeky6VPkWnXleieCEic3t+4faPmQbhUDvcswFcjb6O7Gf2rJRqYblmLa9bui5QoDToZ0bhMQ4g2wt0s0uq90XDXbBArzLURaTsMWJfF0pH+0 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)(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: DW2QilqYaCZqg3tgAtLh8xw9a4bLQhP10V5DXSg78xGbpq5Cn6sUKIutl36vABYpyErBA+YbzkiczVaHxIqAv7NOFFgS3g4Aj/AwzrCiQYCrE3mlEHjG6dzbInyhp0ymHUPgKi1a8xb5JcjanCthyJuArBnSAvoqA9mzAM2kUw9zMO/cC5ryGmGQNLDQ3EDSlC/xlfyTQ2dGmAkKUr3o/8m/crtn1kaaaM9jMgUMb8UVzZ3kXd0mvllCNPquudHrSrBbKSz6fl/GTMd/UtUyEqIo7vWj7oYLld0x7iPhVoWlo+SgVC63krcXtV2dbuMsLyhNai1CsqjLFllOIg0VOjcUaAYQRjEhY+AVAWxUdDocMZDv0x7AqsgOtCLWep+zq68peZ+8C5PL2z6vR3huEPoMRfwxW4+vyOKDKLO2DXlZYPnhY9vqt4ZOu46GtCEvmgehMyK8fcF6x9ZuOk/3FnQVE2ghPXdG6p/1ZgaVvWQqKo3Ex2gXxkANcgR0JIdgQq6A4aheePpEGiDY7ZGBUdc+uhK/VAh0H5RfFazLN+KW8/MbV9TelYKzlDM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ac53-46b1-5936-08db7e9f9a99 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:56.2988 (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: 2jAMAFfSdVWEdYURdmpJiRb91UVbsGU1UTuGWX0w168BAdqeZ5eaDENLaxGN4eKOqAmBaUAzyBhY3iEJqm7lgQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: TY0PR06MB5470 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230706_210702_317403_D75C9B8F X-CRM114-Status: GOOD ( 11.90 ) 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/onenand/onenand_omap2.c | 12 +++--------- 1 file changed, 3 insertions(+), 9 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/onenand/onenand_omap2.c | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/drivers/mtd/nand/onenand/onenand_omap2.c b/drivers/mtd/nand/onenand/onenand_omap2.c index ff7af98604df..b39aee023103 100644 --- a/drivers/mtd/nand/onenand/onenand_omap2.c +++ b/drivers/mtd/nand/onenand/onenand_omap2.c @@ -467,11 +467,9 @@ static int omap2_onenand_probe(struct platform_device *pdev) struct device *dev = &pdev->dev; struct device_node *np = dev->of_node; - res = platform_get_resource(pdev, IORESOURCE_MEM, 0); - if (!res) { - dev_err(dev, "error getting memory resource\n"); - return -EINVAL; - } + c->onenand.base = devm_platform_get_and_ioremap_resource(pdev, 0, &res); + if (IS_ERR(c->onenand.base)) + return PTR_ERR(c->onenand.base); r = of_property_read_u32(np, "reg", &val); if (r) { @@ -488,10 +486,6 @@ static int omap2_onenand_probe(struct platform_device *pdev) c->gpmc_cs = val; c->phys_base = res->start; - c->onenand.base = devm_ioremap_resource(dev, res); - if (IS_ERR(c->onenand.base)) - return PTR_ERR(c->onenand.base); - c->int_gpiod = devm_gpiod_get_optional(dev, "int", GPIOD_IN); if (IS_ERR(c->int_gpiod)) { /* Just try again if this happens */ From patchwork Fri Jul 7 04:06:17 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yangtao Li X-Patchwork-Id: 1804560 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=1Y9McFg3; 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=H18dDafH; 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 4Qy0H12WZDz242k for ; Fri, 7 Jul 2023 14:07:40 +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=vPkIg5ZALpfwkD3cO7QdjfogwM01OdbPoXJLDi7tRx4=; b=1Y9McFg3M5Gifa Jvq0Bw9T6aOS9m0hDdBvNFAwgNhs1V2E/CAFoZ6HpGSN6uYLopJMhCa5T/9J+1Sz22Zdu9+WRv53k 8xtB1wue/50lnb1ruqOMbqkRoARzrNkgGlXcJrQ4NPhIrsFth/Zs757TT0V5vU1Y8U0NnQX1tnbr/ zTp2BkwrhPsTCwYXoLtEx8ZjcNEmJ0MJxsE+eOxNCm2E7J/R2mjmkRzazB0jkjmRCWaCKrGHwzU05 OMKYontzX5tbvy+OCvlKsHgVX1b+VndhWss1q2wW0119P13PUODOE6SFlc8J2wPHKlBNHPFNuHVvu LBgRCIC/loZfHnBaejoQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1qHckT-003Q2f-2p; Fri, 07 Jul 2023 04:07:13 +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 1qHckL-003PgP-1F for linux-mtd@lists.infradead.org; Fri, 07 Jul 2023 04:07:06 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=iDzQs4QYLasDVr/Zl+mC/X7NH6tcFr8i5IVbZaVUSNzEiOW8akfsVGgFJPETSgVCqSo3oyDHb893QlqRF7G5GchlwQaQZ8ruCA8phwvxdwSdtgkO81OHBk32UG2a3jN0q8pWwskcRutaXoSUQNohYkIIQYWQTk1TwBmGjMBGo8YCmGzsNg0DdV+tL8tNYSdaEP5mdaAn4tquBogU/Wlu7uef/hdFOVBrnuE1Kk/4RfHI7RJLe9n1NrYM5oc98jMkHnzo2vI9h6hW75DDOiCUFNvUppoIqY2a2z8qKjkLibO2rfH3NqLNRfCDv7xcUxiOG3I/XSv8gJIwZFxLtPstDQ== 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=Ex5qMBJhPDKU9mlUo7og/N+zrqM9JiXGgE1OAbeDZoA=; b=mben+RHxb8ZT/Pqm5TcHyktexfQxPCJuikP7imhX4MTuG34s8f48bgyhlPOwtlUpSNkOTxJr53NRFeg1mzSacUSLSCVLqKsylqYzjVa1iSkZeAa3uFrQ47Ql8a2ELOp78pNoxprqSoU1bXSw2205PrVhEf3u2eT554XM53LWS3nsBURN0It0X+MUGrfRmk97BOI2JC+4rNDalWbnQfZRapv74G3uOlzBmpDB0w1J6HtLWjokNwfCXXMdMlh1IUkYyydUIPI9TLwTau+WzUWr4M1nq7UimCpjUMrKQqiXPdjaxBY127D5AyqlpIr3luCnV4imxF59FWfp+RbRxs6gBA== 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=Ex5qMBJhPDKU9mlUo7og/N+zrqM9JiXGgE1OAbeDZoA=; b=H18dDafHqbdoF46OJKCfLax+kLF9WVtXJsKH+f5lDClfj2T5tTlvfzTnSwkvrMrcubzHh/58kySxaNx6SEzaEMRqQTH079WP0HhnsHOi49kJWTFYB449nue0OCivxg/FG4JBGqhNoha+r0LqaJsITG4pAwfH+YnYK43iEWJoosAsoANeVJbxdwzpKq7fxS/J6sj7pUvtzaUNMrQvIrsCaLOigHYqK3ugwKOneBcUdf+9LXQx3hmy+ZSEXFHQYjkyDtab5Kv/BAHrQIIrjhj0iUzcR1NTVK5chPPX/FuDWWpkpOwfO8y344xV963EC0um2XfLWKpo7MI8LdLHN6K0NA== 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:58 +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:58 +0000 From: Yangtao Li To: Miquel Raynal , Richard Weinberger , Vignesh Raghavendra Cc: Yangtao Li , linux-mtd@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH 13/18] mtd: plat-ram: Use devm_platform_get_and_ioremap_resource() Date: Fri, 7 Jul 2023 12:06:17 +0800 Message-Id: <20230707040622.78174-13-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: f8206cb7-daa0-45e1-5395-08db7e9f9ba4 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: wt2ED02qokqI/sqBEGN6Y+cTurMk12sSkjMbJIkZATZE4HLPevkVO1Ys9h9HdDejm6PwnsO1XjrZp73tnMacdEUnD4FbXO/mflqTL2Y4YWYsRKL1yARX82ok61WOQrvr8mrKAG4XZu/Ax8dq+xuWAhYbkgLDFNoKeHxkxald62ztR2RL4H1pD36RkqTKfcIIZz0OO5vloSxRSvLFSdimJDqopZcprJHIX+9NSf7LLFDgooMcnjDIRdF9fZYC0M3KI+ekuyOJeIILsP3HRAd70jd25vq6Hb9Z1IBZuWgemRONsfQyvH/YasUWaVoRm29GLP6CSR8bBhPQ7h//56x0Nqt0Z9lt+42AlfRNYs3dvp3BN6QUT/ceTZaKE7nC02ErfdlQ1dyNGBUnbi2oCgyou6G1jswrogf8/fqGnhdZDI9iKPWvMvYADXQ42okBv6IGGIUQofbQXW6I5fmjRMOAhXYvCAJBzPWi0HMGTAVAKpHAJQMfg7Ymt3tSvZmZa7MacNXZUIS28SWQhPsiA0NdBo8XJLYZz7ACiyLEjYlAskC4XlrS9D/VUYkOacdk6lF0BXI2Iuwm+4g3UcZL2NkQOB5jcx/1+D0M5usvVAUGYnqSay6qehGfSbG83qHYqMyX 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: ne1rxtTyhEDY0hyeLctEhOvcD0DyjNxbwTLmMq9dpcnZOSnlHw+GNDoJ6N0Hv0WQ7VNW/IURgQ8q/gV7VTyFJk/RwBo5cwwg1wSG9t7u5xnZfibBiLLDh7dQ+wfE+TcNjJ0MrKc/c9gQc59KHGUL7PMPdSbJxHuV6XcRV71MQEBueqi+/Ca/BL3/GvQdLGu1gyGfnxmpZPqpmCPwYgDeWP8y5I8lijpEaTbkyNfWENBba+aCRwBwjuzENKfYT40tkYxg+NmpgOW7CCWmuKvYIvXjkMcPvbQexya9QfZ5KL2OBGXgHOqTtU0E/kxA7wx69D1LTXa/sSg9aib3b/HIkg5eyIu7vWRnHpVHn5jxvejgKg61J59+/PyqDNy2ykAB3momC4T9R72ZE18uLrmbwSJPqG0cT5opSx7WTF2notQEsNs7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bCTWezpvy0Fj51PiIalqrp96WyJJGH0cxnt7rI81tfOae8OhXFh6Gq35aM1T0lj/e3rI9H3ItBlxxVV+zP0awW3L X-OriginatorOrg: vivo.com X-MS-Exchange-CrossTenant-Network-Message-Id: f8206cb7-daa0-45e1-5395-08db7e9f9ba4 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:58.1429 (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: FFfK7dlfKS3IDXcKZmCb3kImpBqnfwZiU96xQqiA63jkTkSv16yokhY14iDPcjs2XiwImSFm5Nfg6xOwMrfRng== X-MS-Exchange-Transport-CrossTenantHeadersStamped: TY0PR06MB5470 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230706_210705_428294_BEB0CEA4 X-CRM114-Status: GOOD ( 11.71 ) 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/maps/plat-ram.c | 3 +-- 1 file changed, 1 insertion(+), 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/maps/plat-ram.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/mtd/maps/plat-ram.c b/drivers/mtd/maps/plat-ram.c index cedd8ef9a6bf..4c921dce7396 100644 --- a/drivers/mtd/maps/plat-ram.c +++ b/drivers/mtd/maps/plat-ram.c @@ -123,8 +123,7 @@ static int platram_probe(struct platform_device *pdev) info->pdata = pdata; /* get the resource for the memory mapping */ - res = platform_get_resource(pdev, IORESOURCE_MEM, 0); - info->map.virt = devm_ioremap_resource(&pdev->dev, res); + info->map.virt = devm_platform_get_and_ioremap_resource(pdev, 0, &res); if (IS_ERR(info->map.virt)) { err = PTR_ERR(info->map.virt); goto exit_free; From patchwork Fri Jul 7 04:06:18 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yangtao Li X-Patchwork-Id: 1804565 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=YgP0G/8H; 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=hCSP9vfH; 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 4Qy0H13PlRz242l for ; Fri, 7 Jul 2023 14:07:40 +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=MIZuD5Ete09w/p/Bw4etI4U8nUUKpEzDW0ibHTsHRmA=; b=YgP0G/8H+dtv4A tTuuAxX7KBMfewa2vNPzUtxoXaZnf7yMDkUlUeem+O7zuqAMLBRBOSvkYPU86pM0ToLmnl8D/6P/T tUafAlMe2pOZcKsxtQjdRuoEE4eIIus0LoXIXUjZYbtPQZ1LF1tzu6M/drs1odnlu1Sy5ix4A65kA YWwoUgFMAfS3WN9Paa8ZzQUIhgCPcORKEngyMcovkkd4kCsqUvsgZU63e4Z6N2OTNKUgicNvc3Ao0 zfjz43/w29TKdOp59VHkX/6xRUEz4mFcveVjns/9dSRP5p4+sEzjnLr0oADcVo1uFy/QLzNyKYFwM fxFnsxhAaUaWeiX2FINg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1qHckS-003Q1H-1t; Fri, 07 Jul 2023 04:07:12 +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 1qHckJ-003PgP-2n for linux-mtd@lists.infradead.org; Fri, 07 Jul 2023 04:07:05 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=aHmJZT+p98ybDGVZlzWtQ3BeG3pWUhJ1HZPU4ApmDwCLk1cdFCpOrhMu/p+DHdszWVcNTLjk7qazEuwfopHWBjc6JfBBs81ulHFq9wq9xjV+xHSJLcBrRChEPve+QkHN8ZM7G3dQTEcJqDqmKwdOC7ciOVk364fhkFAePROlihile2MMBE/kl34E4ncosVaUUvrctyE6P7amSWbMqbT6SBmJE7e+RM2HbRq7NzQ+qypV6JCaQauntaEZMJZWWr3IhqJdBYbvr9PhqeTvMzfIvVqtnA6xjSsavvAooFrXAdhOkXgvhDTut5H8VEwS6OCZVAJIogJzi7fMpsUqaFySXg== 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=aLnedmqp0Liv3jUq63+vBWQ6QaBCDUwtBoUs0ehTfxs=; b=I+8RyEA92Ud8vG6NjQEtHSY4VFqJlY1rZwqnlOFZREFhRLEEGVjwVh+IH8h5xfXVZnQZR6tLM9S+ygS2Mt/pIi+ln+uJ2Gd7TyQepldA2cPHbybQLF6Lzj41+wnBa5lOf7lKz5DsY5c1zBiCeecNiGmCwQgE/JiZRDMsUHLtLaZzCkaX5xp+PrWHaVx3oHe4H5J4ddWw1rS/PjrDQFCeuA+95eNQj+Sls1Bc8A9BUTRnogTP97623CjCEwxMuDfHgm+bWMXrbOoY4+h+9kgw1eYS9nxck1q049tICky5Z7UUcYE0alyZeAS6hFynUnGqFs0v0jll7HvNIe0OBpBlkg== 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=aLnedmqp0Liv3jUq63+vBWQ6QaBCDUwtBoUs0ehTfxs=; b=hCSP9vfHnDSb62tZdwrWhBT8UOq/Lr8Ngif7OfSZMl73NGcg+toL7JvG0Haxsd3qCOJdGDg/RXKiWU0YQyZbN8mkZnHHj44BYa5+ACzrkRK5q0bht7Xc0YVqFjpGUceKla9fSh231jP+EuXSYmVccS1rWFDEH6Qwgod0/G53kvXxIHBenFg+w+TxoPANE8GdCL564bRLjoDE1AoWeFkBaTO02CENnEigqTGSQPJJjooB3JNEnvTPi1qubX5WbPNk4aLK4ZToa4gwFLMlATPigl2HyogarPydo1Oc7wz3IsHV1Qi7/Nj9ngNbMCueNXmtGUFx1F+tLk7JaO/SCSWRWA== 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:59 +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:59 +0000 From: Yangtao Li To: Miquel Raynal , Richard Weinberger , Vignesh Raghavendra Cc: Yangtao Li , linux-mtd@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH 14/18] mtd: lantiq-flash: Use devm_platform_get_and_ioremap_resource() Date: Fri, 7 Jul 2023 12:06:18 +0800 Message-Id: <20230707040622.78174-14-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: 472c6a2c-ba51-4a72-4e27-08db7e9f9caf X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: Q3s0HuUM7nuaUU8c0NuUzJshkF6dzkn+xnCTpwvuVJVQGt/gU4xxxegCVOXx6VDZBjViY3TJsxsF0STqC6AhqiI46DcGtMRqJOHy8j7Auj6FjQ2xgi+LyFvYniUmUSWHhbQ/rD3/55mtTTm/hllYvCOeb2OFSGXxZX/JniUb0xI+Hp1Jl/K1g+yUjzvmwCFanm58fzhvcCyXpgxFbsc8hzOzs/gGwjoFWUbPHf9cQ1WMVEdZp8M0jXzGBopiW3ORbqu9zUcbmwac/xtAQI3TZCb6IrGcM4xEu4XlfCPk3jva8Hu2IlW3WKj0rKaTWYsvzi1QttI19Bo1WyPPHFIbL1csZszpEJcaFrWCcSPFpEl0bA1aiDO//s+qA/hURAnR4YEiwc65vcILYcuc74hSdH+cap1brLmEEKIJoNmrGB/E1DrkWX/VFWtMEkp0xa32A8D3EUtuKQ9L7t35NB4t/C/UP8u27XSPaWWq1FhaiZsPvOQEDRqt/6bRc7OZaI0r+4KCF4MqCOkksyP51uz5wfH3fgxZaX/tPgngzgjS31F0ZnpcUApHdpEY2NKI1LXaxODyuleVfvsmRue6xz9fYRhO9/XGlVmzZNlKLBbcTmwbwEjcZOO8cn9FOF42uYBP 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)(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: wXLgUhHDv14ZRQsbWk9pB2b2pXeKuEfVJwzB6O+9QwHNSXQQU+aYRMW3Z483IHScs6LdHbcmvpxbRvmidJmtuAW6faN4MKE2+5OvtgXvubM/usy+CHCZNeXUmxwzEna4S/CNEwPqCI2A2AaXJvMnsvK5wT3kYwmI1sCQ6BFVPQb8GrGt02Ae1tCZtqv3Lca1Wqsivcoz5A2q15VibMfz0ePzE19Hz9+X+bXGoH+xZKgob5i8mMbMXwoGeiqoQbxEgm8t2c6lL0RTNsn6LCVeton3GxHQPuEWrSp+xm3y6K2BCHaSMXZOTwN9g/W4KEQW+KtPTH42oxykpV0nR3f3s+XtFtOEzwAXwvqWHtPsmtshGGy8JaDD0u5RbSipiXSUMeNA7yMC7EzXFLCosViObNE9ksEvdCs1ezFKCEgj06b8Pip5enCWD4hzMnrD52iRkgVI2EtuW7aFwLjd7Tg15vFxqOS+K52kLjRDsbgzz8MBryeLZYR+Dq1GDV/E7X6rraHOZvcrhQLJul//gcCwM2VOQXQ5RmDoi/tqOP6l4PL1nmCkUIJ8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Id: 472c6a2c-ba51-4a72-4e27-08db7e9f9caf 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:59.8000 (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: KjAfgKtV1skAXmvRE4FS15BWsKedXEOQ5b6cF2wiYYFx16cWurtqJMkGUZInBb2etn9N3vrUc9rYhae+Msh2dQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: TY0PR06MB5470 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230706_210703_910771_079D193A X-CRM114-Status: UNSURE ( 9.86 ) X-CRM114-Notice: Please train this message. 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/maps/lantiq-flash.c | 11 +++-------- 1 file changed, 3 insertions(+), 8 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/maps/lantiq-flash.c | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/drivers/mtd/maps/lantiq-flash.c b/drivers/mtd/maps/lantiq-flash.c index 67a1dbfdd72c..a1da1c8973c0 100644 --- a/drivers/mtd/maps/lantiq-flash.c +++ b/drivers/mtd/maps/lantiq-flash.c @@ -118,11 +118,9 @@ ltq_mtd_probe(struct platform_device *pdev) platform_set_drvdata(pdev, ltq_mtd); - ltq_mtd->res = platform_get_resource(pdev, IORESOURCE_MEM, 0); - if (!ltq_mtd->res) { - dev_err(&pdev->dev, "failed to get memory resource\n"); - return -ENOENT; - } + ltq_mtd->map->virt = devm_platform_get_and_ioremap_resource(pdev, 0, <q_mtd->res); + if (IS_ERR(ltq_mtd->map->virt)) + return PTR_ERR(ltq_mtd->map->virt); ltq_mtd->map = devm_kzalloc(&pdev->dev, sizeof(struct map_info), GFP_KERNEL); @@ -131,9 +129,6 @@ ltq_mtd_probe(struct platform_device *pdev) ltq_mtd->map->phys = ltq_mtd->res->start; ltq_mtd->map->size = resource_size(ltq_mtd->res); - ltq_mtd->map->virt = devm_ioremap_resource(&pdev->dev, ltq_mtd->res); - if (IS_ERR(ltq_mtd->map->virt)) - return PTR_ERR(ltq_mtd->map->virt); ltq_mtd->map->name = ltq_map_name; ltq_mtd->map->bankwidth = 2; From patchwork Fri Jul 7 04:06:19 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yangtao Li X-Patchwork-Id: 1804567 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=Eh2O5cHF; 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=fGbAgGqz; 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 4Qy0H162Yyz242m for ; Fri, 7 Jul 2023 14:07:41 +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=KaQoufmBkUtEq1HqoEv2a8tjj41C845Axt2HQYKR6/w=; b=Eh2O5cHF1JiXw2 WtY2TaKFimOCYB2A1xfKexkKfqpk3nrkWkTlBykdJrR4xJsIChUhIsmGt6UoJQ08aIZ9W0P8v5r2H fXkRzjWKpNdXxuKpcJqkAAmWDH54Ukpd84eS9+Jks8mVUlXnIjjBbtk8OWRJxqcZwfqTLu/9tLDeB PmvHSD8VwXjUdzIyiM03hSss4t4TAvg/VOGSlAmqId3NFrJTW/uBAUa/PJTxMCCxBpQc8HCgJ6jZk VSNJ8VC6FbuLEksLf+Niv355hEstBeod/1oc4FT7Od88zMnSep3InIbJzAxjTPyJJJ042j2j6c2Fp hgU9lFruXc/9CpkCfOaQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1qHckV-003Q4F-0H; Fri, 07 Jul 2023 04:07:15 +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 1qHckM-003PgP-2z for linux-mtd@lists.infradead.org; Fri, 07 Jul 2023 04:07:08 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=mkNsfmQNw9da33dmgg2ll8VVvGHLpqtg2MUKfcsI5hknLFXUR9+kqnIC/5vBR7/n2IA6xuJ0AtUZvWI0dSyoJZeCmmulKncVdK2m+Kap41/RT1L6ENCBW8wVxLDRkJoZvCyfG+ug0hy0D1oXX88hrIh40V6vi/VN+yBnXnLL3npPJvIqfGJ3zdlbQzc51BGlw2U5KoMorneWq5hjeo5gcyCtRkZVtwPzjiccx6EPHLK0ZE0E1/Ns8j53crTRv5FcSpAglsZmPtZZKHs84kXgjmYJwXu6LeEXIhsRsO4qf8cQ6Zi15Vrspf7hop7hDuN4MQWW5rkuAd54DcPuT/bxWA== 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=Sls+Na2mUCbEQBglYboXwewsLAk1nUfvVEOplEK5ZVg=; b=Yo1EmnU9PvMMixFve8FGKkuFcckuSHb7b/n0MBhNc0pDwOlp4yrbuhJ3u/Us6IgV1hdpbBiaByYSVrtL0vk5BfGkNTbNZgTypQQB/Xq9DuO8mBpQzWeD3+AnUwwqd2Rft8M+5W00+ikm19h89YgyDlfcdtVP/Qqn5sCmHU17xm2SJOjFQQc0xZtavHAEjPYf+BfqP+vzZe8P2BqfgpI558B4/VdhwtmYUZOzi6u0trQrleTxilmqxnowDcpXfK+TOrcHI+o5gxJ8i5INYZz7/kHYqivVlU4JgJUxL9Fc7YTYKuboNeRk6fD0k7TK/qLo5CmjVkDN1Jt19nw7utLApA== 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=Sls+Na2mUCbEQBglYboXwewsLAk1nUfvVEOplEK5ZVg=; b=fGbAgGqzk70ZWbWtlelaXkdeHlW+36opAyyRrblpNVT1PsaxsvRGV9kxx2fBEfsV0olrm0sK5jQS8NdW/6mWCGe63N9Pjko17FZ1SwPleMvDGxn5SU+bpmbvb+LIiWDt9v20Stc1szCeHBSZcTmWAIIvBARWMF1lmlIpJaZcwvUSiGZOBZ9+HGlvRSHE2UK0NpVHV+F3XdLK6oredu/SSg7uzqHwR/KdRGnNPzy6yIwhxi/n1IgyNFrnNAyJSqKE8bwHSXDpGHle6kMbyUBgIImQibifwr7rPeDbAFoQ+k5G+uqmuyF9/VRZt9wTCldZLhk38RREB1rX1qrMBM4NnA== 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:07:01 +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:07:01 +0000 From: Yangtao Li To: Miquel Raynal , Richard Weinberger , Vignesh Raghavendra Cc: Yangtao Li , linux-mtd@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH 15/18] mtd: lpddr2_nvm: Convert to devm_platform_ioremap_resource() Date: Fri, 7 Jul 2023 12:06:19 +0800 Message-Id: <20230707040622.78174-15-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: 2baa1dbb-a169-46e3-36a9-08db7e9f9da7 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: bRffRDcYrPtJPwfappE4iiezeEYre92QO7QZvGjtDtmf7E/OS7/KpqLVKD+qg8ida6y3HmAfsv7QMJMoS6WXwTAA9MSQlVgU8nCEr0dj4tz+nY3/RWUrqn95A0BlItQNjpK01kdS/UuRXriUn0/qeWTIgxZSrEeNFpvfYOQxyWpzLHC5z3L0pRG7HOuB2sPCaXA7byKxBZZRPV3+du/JvOMwiDUYcL9a0E1Zv8xSTtbSXW99HoK9xn0EiTlksTQPQ2pF2cRduTO8hbC5PvFBytbYSOHk14Cjn4+3U/eLlkj1cq4gmC7dN59Y2na2b17GuBFSQ9TDNwHPxhe/MdovATr40nePGrFiOde1cmqmMZsFb5c4oN7NlyfDLlgQ0coTYWoJPeLqIsePGXxOBfFVqyXbHvN/mVqEWo6JgKgJHMucz5gO8ojCX/6/auz9NbMFp9iLurhTzTCyqxGj5UsJ4aNLHy6Jfe2zgZQ4LRgG7BEmABUq8lmXBxVIiJQwrYRlEKZT+GpohdxD7j9lsMKs7qw9WFYcwRK3lxZ5vwx+6jegaEWQFzSsIKpQXMfRvZKGCdu46yVl2iKp4yiz6OfjTYzxOSK+llvKGlcock8EKBf+WLp8XHIUeX5wjG23Vy4V 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)(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: 0m8R2xXVeNyPaypWwtbsMXuwTXF/M6rCRaZgvLovrElHzR/tRpR0NBCDEe4+C6/goHN5dPe8XNcWVCpZOV+4Pm/Tm3tSdwbQMFAneIb0YXeVMKgoh/yyvr10gJ4M6WsYTn+X23NSC8DJgyEY6pLfECEFhnAS0wXieFjfVsAcOx2mm201cmrp9bSfMVXmmtYE51/YFDJwRe6StPzBTIUE3PthO8rPIl4iXDASes2EzOH/ExMJ2kqtdC+PLjUWDDC/wuqIEEgErmBzt0lgIEreKNFPas3iIJnPn2ATbnCnAc+lxJ98Gt0Equahir0fUUcDizu9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EU7A8/A7AgrAiLXwa5bC6cztkLby0I2EuLLI2jpXhqO9Rdga+9o6yHmAzOJ9MGw4Y9W2fegXRJl3QWfVPyneScuehRA6An01EZ2xI/rrJs8HRMJi428FSA78mWWg/+uUMGlCy5fTBuvu0g2uynTtW8WMVsj/VvhsKgG2vuPxNg0m/2CEObgHMDyN/woN+JeruG7p X-OriginatorOrg: vivo.com X-MS-Exchange-CrossTenant-Network-Message-Id: 2baa1dbb-a169-46e3-36a9-08db7e9f9da7 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:07:01.5315 (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: cw+rCn/BVsTD3bPBkCk+WNOgYBcwS8n9S5yY4eOFeuqfjX8f2CtncE1gIod6ScMkoEtrV/PKDt36KAm7t16lcQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: TY0PR06MB5470 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230706_210707_007849_3109106A X-CRM114-Status: UNSURE ( 9.77 ) X-CRM114-Notice: Please train this message. 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: Use devm_platform_ioremap_resource() to simplify code. Signed-off-by: Yangtao Li --- drivers/mtd/lpddr/lpddr2_nvm.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/mtd/lpddr/lpddr2_nvm.c b/drivers/mtd/lpddr/lpddr2_nvm.c index e71af4c49096..f4e5174b2449 100644 --- a/drivers/mtd/lpddr/lpddr2_nvm.c +++ b/drivers/mtd/lpddr/lpddr2_nvm.c @@ -412,7 [...] 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 Use devm_platform_ioremap_resource() to simplify code. Signed-off-by: Yangtao Li --- drivers/mtd/lpddr/lpddr2_nvm.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/mtd/lpddr/lpddr2_nvm.c b/drivers/mtd/lpddr/lpddr2_nvm.c index e71af4c49096..f4e5174b2449 100644 --- a/drivers/mtd/lpddr/lpddr2_nvm.c +++ b/drivers/mtd/lpddr/lpddr2_nvm.c @@ -412,7 +412,6 @@ static int lpddr2_nvm_probe(struct platform_device *pdev) struct map_info *map; struct mtd_info *mtd; struct resource *add_range; - struct resource *control_regs; struct pcm_int_data *pcm_data; /* Allocate memory control_regs data structures */ @@ -452,8 +451,7 @@ static int lpddr2_nvm_probe(struct platform_device *pdev) simple_map_init(map); /* fill with default methods */ - control_regs = platform_get_resource(pdev, IORESOURCE_MEM, 1); - pcm_data->ctl_regs = devm_ioremap_resource(&pdev->dev, control_regs); + pcm_data->ctl_regs = devm_platform_ioremap_resource(pdev, 1); if (IS_ERR(pcm_data->ctl_regs)) return PTR_ERR(pcm_data->ctl_regs); From patchwork Fri Jul 7 04:06:20 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yangtao Li X-Patchwork-Id: 1804572 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=PfxofWlg; 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=YTlqnlu6; 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 4Qy0HD2nXNz242Y for ; Fri, 7 Jul 2023 14:07:52 +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=nv65AojoHnUyfD4kWMwyahutmUeMAAsVdM+UeQk+XRY=; b=PfxofWlgFdafre j56/2TJCCYvEeNS641RSBTUCUUv1f2HJz+TApQSdnrwP3pSHHa1jTQCtiWr49PrAznsw6zOWUDKiS 9HwKSHEE6l5ZvuYCHyzP87MArMqiCUulhno+UuEpqvVWEsb64IkspkX4TTydaVz8noqqj7BzNw23G FYCy5PBVr9NraBg3Ottu9bC4ogijhgU01lP6KMrLiSDFHj78flgGmJnojlBzoo/IBhtzb47OXOGCz MjGlud+rsKUgzGQX1OPeZDbrdM9NDeJClON4QxbAiP4ZZlOjwf8/W83GNwgluCsuRQyfc9W9IC1Hm q/BsbPtNJvDozImQiE4Q==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1qHcka-003QDU-2D; Fri, 07 Jul 2023 04:07:20 +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 1qHckO-003PgP-1b for linux-mtd@lists.infradead.org; Fri, 07 Jul 2023 04:07:09 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=cScvd866mxtlB7evb8DI64dPAACuRrKdFaeL6igOsGwG2N8dCTwnrdXy2lde7Nkiyql/l4HpeDGdPVcKOAsDoQl+rhRn3ahNrITt8FXDkbfHqjnfM5PYdQDhWP5HGy5m/yg6UXQ7ugiMcUsT4NEOIn1vMgwZH7wWrFIWQxCWOtRu7Zrd/8kHMTQDVLjBFEu58xszfHl0MmNsN961nOXGYinXPO6UTD0U5/s6RV0uC46qic5UpYWFhl1illZKaHy4mxGs3Vl35G8O8brmoXIPRz9yShrkKd28gbl/DwNX+IbWD+5xI0yMDQrzLnJ/Tud685HztqC4tsEsOvw6hy3+8A== 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=veaGrOk4W7LBkRnDyPIaURF3ICTTqQfsGdlLPhD04XA=; b=j1XLYi2T2IRqLuJscEtrKRfQkIpgg7pCqhrjgT4OT5CBT7RLqxUAsRQwp1fiabxVMMJGL5bpKFeijRc6rN44RnTcEvKW2VUCEBNO2RemNwXabKo7UlRRSQJWx3HUW3yz17dbWlvI3kjp7ZiM22s1UF2bvVEZzbyKt0BfOXoXtplGlIeHZKhOAF+1CrSDvYEo9JfmPFd/PGCC5UVx3w2z/qwPWPo2zeZpDvFern3bx26wYZODN4NVDTcxRG5ebHojuKhBthULrDvqpM7cmxTP8z2ucPLIwHTRBOfDR9ATTM2Y4pxtYUOdBmHN/Ts2qhexlkeHNOpKbxdYsSJmvfjuhw== 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=veaGrOk4W7LBkRnDyPIaURF3ICTTqQfsGdlLPhD04XA=; b=YTlqnlu6L9JMLEIWi5dYfyKdCIKiGNFcy03e55MmwLEN2yTRW8/2XhhTT9StrDX6k+jkh5T8F2Gk6moaIqBLXZykUfb7RChQuSAWwL581Va1RsofCqGerh6pb2IJ3BCHQztV8VBfnyUZp9qCEOvOk4SYitEPBUuXp8LUMxGTY4uMocL4jua+F/B4Ulc69/cZ2+BQoG/OgS/wUQ0k0qfgJxNGOT6hVDWKJlr7fQfRCpOvHcEj8II92S6IaKyDyv6reBIe316kdYt24BbEon3e8MivrPziq58BZoIUeEFkvompRn7UkSC92G0MrgEvRQ2NYIomk255LuNycnWX7zvc8A== 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:07:03 +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:07:03 +0000 From: Yangtao Li To: Miquel Raynal , Richard Weinberger , Vignesh Raghavendra Cc: Yangtao Li , linux-mtd@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH 16/18] mtd: st_spi_fsm: Convert to devm_platform_ioremap_resource() Date: Fri, 7 Jul 2023 12:06:20 +0800 Message-Id: <20230707040622.78174-16-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: 06272e90-4bab-44c9-cef2-08db7e9f9eaf X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: AqO5+ElHY5/gMEJtW1BFprlCEuSO2YO0IVDgJ7qwOUF08/KLG/M5TTRjnUdOV9fpbgENo4BFzbqbtWV1KrCa9geIsWz0R1rzDxve24smDfwWOu+oqT8UVDzZLGoep1HTwlbAPfwjD6DXW/QSlJ/eHHZE7PCUGX8ZfqHiB5Sc2Sc7PvVqvmH5d7UdsxvJlsheAqzhmvcBtgd7Li8QEzVpAaUi+8L2fpeA0U4GIokbeJG2BHk044DMkHdOHBGmEvkjxnMvL3pa76HWkRdoCun1Iny2qmbu9RzVrG4JPwulwMIgUYhXzt0/CBaEDccIqKtGquFMKY0n8Jrff37+EKuf0iNIayIwKushHr8Kx1n+H/f/qmyGxswTaNxOpCWq8fI/y4lFIxykC2gaJohGkAC7Cp6USULs1VL+f4SpWsxbSoqVCysk2VyrYZ1qJLcfXEv4bMbXjskQzifdvcv3cR6YXN9UQhIV6vmUDRikfvLCotpQ0ctQTQzV8LpQ2lmVMFCkpA+NOH+ltYtlAi+zTTDvBqVWixIYrUyClOGq+mnb31/bePEmSiUKl5mlZ1CdebYNgYVDq6df1Y3t7tNh/xEdT8FeydHFGa5GkcizLQpHZOp3Wx3I6iiS54D3TYwxFbxk 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)(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: dnM7iN9DcD6PlImcuEwA9F2jAITlSiwFLcyOcY5t0oWejB5r1Rdz/egOlcbr9nJlfvkSPjnhvRKw4aKRpdiU6zxUdkTZ4CPIFiZccUev3obqfjQ+fkH8jOwT2/FKqv5YsaEiE3K6G4bKC91S7zFpASNbxplBA1oKHhS95zsRFRrAk6SjIaogkpvzHQf4M0musFdYP+bagkQ2t9kbL8010laUvb6csors/1kZY1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kezsc7/sizb0yjnhMhK4iXPoMSSj+HXw12hEsuryEInwAyoVZCFSmMR6Y/nwnT+YUU8GO+9pL7G+N9iGCG1k8NwMzPN5RUAn6a97F4y0E4q+ByBFyDayOvY124OpzhhKwvF9Ge4vQ4xrFbQq6Xkpz5DuDg2qsZ/bWI4+NKq/0Iymor8yZB9zVfrkBP/reysRwST2NKliAIB8Nlf62iOzI42ly4QltG8rvLuHotGRfDOYIZ7lsezGxv1mcnszuRHs8pc/LZIAxIByxCTrrGJd2Bbi1OoqU4mGrj X-OriginatorOrg: vivo.com X-MS-Exchange-CrossTenant-Network-Message-Id: 06272e90-4bab-44c9-cef2-08db7e9f9eaf 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:07:03.2235 (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: aQG71+L3xJ0l2pOqWtasg/SFhLhSoVrCCTpMyDDIc3CnZpKRpOoe8mwcaJG+S/V0ho1zfZK//W22+/Qno0/gtw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: TY0PR06MB5470 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230706_210708_566288_1AD958AC X-CRM114-Status: GOOD ( 10.31 ) 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: Use devm_platform_ioremap_resource() to simplify code. Signed-off-by: Yangtao Li --- drivers/mtd/devices/st_spi_fsm.c | 14 ++ 1 file changed, 2 insertions(+), 12 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 Use devm_platform_ioremap_resource() to simplify code. Signed-off-by: Yangtao Li --- drivers/mtd/devices/st_spi_fsm.c | 14 ++------------ 1 file changed, 2 insertions(+), 12 deletions(-) diff --git a/drivers/mtd/devices/st_spi_fsm.c b/drivers/mtd/devices/st_spi_fsm.c index 3dbb1aa80bfa..95530cbbb1e0 100644 --- a/drivers/mtd/devices/st_spi_fsm.c +++ b/drivers/mtd/devices/st_spi_fsm.c @@ -2016,7 +2016,6 @@ static int stfsm_probe(struct platform_device *pdev) { struct device_node *np = pdev->dev.of_node; struct flash_info *info; - struct resource *res; struct stfsm *fsm; int ret; @@ -2033,18 +2032,9 @@ static int stfsm_probe(struct platform_device *pdev) platform_set_drvdata(pdev, fsm); - res = platform_get_resource(pdev, IORESOURCE_MEM, 0); - if (!res) { - dev_err(&pdev->dev, "Resource not found\n"); - return -ENODEV; - } - - fsm->base = devm_ioremap_resource(&pdev->dev, res); - if (IS_ERR(fsm->base)) { - dev_err(&pdev->dev, - "Failed to reserve memory region %pR\n", res); + fsm->base = devm_platform_ioremap_resource(pdev, 0); + if (IS_ERR(fsm->base)) return PTR_ERR(fsm->base); - } fsm->clk = devm_clk_get_enabled(&pdev->dev, NULL); if (IS_ERR(fsm->clk)) { From patchwork Fri Jul 7 04:06:21 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yangtao Li X-Patchwork-Id: 1804573 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=iTwDZ1Y3; 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=MuSEbVII; 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 4Qy0HD4rjZz242j for ; Fri, 7 Jul 2023 14:07:52 +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=UBrqz5C80xrM/ECeaXINFcgJdKIFuoNsavIZISHBU34=; b=iTwDZ1Y3tAzYLF S0Ebfevcw3Mg7tmMJSelVAV/264DFkO9CogaAYBRAI2p03QNhoOFNEdr0jeUSZtJUDxs5Q1Oy3OZk AqcDIgL18ubjshbJMu21xJ6/1F8psoRoTYgjSTnIcccUTBAHdRUWr2ZBXI025xMrY3uM8jMZm8oLD YzsE45d+fgtSJepmbFVnyoMewGrz5FiXp2waoTdQvQ2NQ3PJUdfwu606O0dRaH33rVycG2Jw6Wdew e69/a9f3NTJJjeo/PrEPmxeGi6+EvcsRgEAE0w+coRHlouU8NaX0Okn2BW2T+LGoX5UcrOy2TllAD QjnXfxLp+VL4lzJlIV/Q==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1qHckf-003QIh-1r; Fri, 07 Jul 2023 04:07:25 +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 1qHckQ-003PgP-0I for linux-mtd@lists.infradead.org; Fri, 07 Jul 2023 04:07:11 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=dqjy5b+JKBEJ2uMj0Yv26onCbsj0clz/yektES3ZlR/U5MRrTrnljXfeNccBZJG08JlPhjk/1Gau9yOBjpTGQ7oqBAXOmxJECe9Pb218efhB+EJmTrtuGgclysjn+1oLSI6oraTNbEuT4TASNfMrZ1fCgDkcjPSkj+vyl4a6GGWte+vluBuY1+ZAcn67ZkOaL00tqMUKbNzz52fa2NDJSw+ufZ7ZGj27LM9owZg2BsKmrUC+oPbS6LTrB5ABJIPiWKwy4GP2RdRORd0u0D3WplEY8owXR9f8YCsrf1WUPBzLkZ90SCwn5+LYoSAtH8Bo8oPHiZcZuNY6k7UBXTvP2w== 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=Oiux6bfSStl3D4931E8/30VqNTqHrgttlUkj9MFjPTE=; b=X5s8LXvP1vG1nLY8k292kgiMz8PoeisB0eXw39dQsHimdRkexmm7oFF/nDyhAbQr86m3al6BMTYCUMKmKCckOYsY3bWfDHrwMsGlONn0KZGsmIsqwY2zjBPONAdzwG7rYJPy75P3ixvsE4MCYlErEpfMd4IyFcUi5eAlxbhf3y+emrihIVmBxEduUKo04lC9BiRE4wC/cP2LfCfW/GtjIp9ShwHraWYrX7S4QQzDv+P7tXeEMlKeAJNgFPlxKEwXyL7uHmE4oloo+zOM+dWf9++nkng7FfhQjEJ3UYUxSY+3CWxoZcPuKoALnQUcI1ZSbcc15fyDexNi2oVtPyxCvQ== 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=Oiux6bfSStl3D4931E8/30VqNTqHrgttlUkj9MFjPTE=; b=MuSEbVIIngkvCxYUNXZelmcV7y5/hZYXoM8tHg5Ue2kXLD8Fbp5zae6t67NbUW1H5kLi3KP32LGvIRI4DQ20QaVhzGqiPeWCt1Fb2Ix+0F2MSpuNmQqrtnzvoQCZztegcZBfLdbsBNVKH+R+vgvCoCyCaCXPdFBO/GaTZPQO33CV2OQivkJagInzGN1Y2mU/vXHVNLNHVqaQiau5sl9BVsR7dtyQ10w1Q+4ygHvVTF1p8fG3OLKF+tGaXIcE/6zoePiBFLKG2ne5YZqyJnlbinxmRtBIvPtY6xZn4WJzlPQgngF+5rgOIM1z/Aq5LzOX8HvbrVQhgpYJJhC3k9M6pQ== 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:07:05 +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:07:05 +0000 From: Yangtao Li To: Miquel Raynal , Richard Weinberger , Vignesh Raghavendra Cc: Yangtao Li , linux-mtd@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH 17/18] mtd: spear_smi: Convert to devm_platform_ioremap_resource() Date: Fri, 7 Jul 2023 12:06:21 +0800 Message-Id: <20230707040622.78174-17-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: 340b5357-43d7-4f68-04e7-08db7e9f9fb6 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: mj9xTZ1L9xsSKdOBO9gf4dx6AnsSSr9W8tZy79MakTJ7gP57iLIg04rMKtoARW3qwThxRvLDP67A5fausi4p87faPGFKw+ZQ5437wmA0zWxTwW/yMzmN7NxfUMzNSFD/kMwkPDQLFHIqyo80dYRITSRCHd86e9Y0+DASET28/jy/cKbIpchrGME8ZL7INqKp0MG2ZvYrtq83/YnBBpLvx2ql/jfWUNPHODkVventbtrJ/KJcJ/gC82M7sdYSQXFhhDLIIwrv3mxPKgCTu4b2fmgZMT0vGyt7sGrDFMu5Ss9KapdHUea+Sczbg2S1vLaJPDG6Yc/E6SskLVLQLbxPACRjj525GCK25gN38bojoasll1LvhyVtbPqKpuheLbVrh+n/ocx24W6gHEpVJvxH2AdOaNIcYxUNHAJj5tcBigIMQo6FNNxwn0SitT78qcLeo2Od3GVTwAgjgO+anRBaUcSZUPYxmfoFjMm5HcNeY2o2aGI6IFt2zly4qsfsUVifNhQN1NncIyC1M3Ot5/eReeSJy7MF/xxQjesf+1N6EgIDidYzs6qL/Dzr5vdKrKW00+JIaIcxwcwCGe/3XCOxwMd5Mwjx404hUaIeetm08PVBw7z5ccT5P9vqJyplgZG3 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: 8WIUIDg7aJGW4Xc9RCg2TPQoNkWbTrqom/eJGvWFpTzawqCSMcedF5l/lA7ubgNwT3MNov5TvvROvdKXB3Pj8fh++sWXEqG6mdRrgQKDRmpn9moG45tRhiLq5P2LyG9pqdPQHXBKkbXP8iMdo47+MyKx6lmH6FZiRaODl5vwP51Kwjk8PXJiGNqik9cHXnqGyF5h6rsQ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85Bvjp3UkZJYmpJj7Qd8KoGxDROWrw/JW679qasBscFAm1yFM6Yz7Zo6PS4Idw90Wu+eb5N3wI3Y3Jg1lO5QqEzk3c4GysJDCxKft5b9OhJcNjJ3Nj4i9vTY5tVIYAi39xpnqevcjep4KHC/BEqTU4/U6/EZR5jFGQ08+/wwhC54OFE0yb8sayTVrgiDcKGHtE2ynNe4pggDtmXMfptXPQiu11uAeF5EJgD3z6tfMPTsO1j15gpIguNO8oHmFgZzDbqRlw+XunyKSbAf+eVDZtrHn3S8pgBiAkcnQyt8bLsNHjiYfsrXdDCgfkvFbea/yOjZckr/NCaXmU3Y X-OriginatorOrg: vivo.com X-MS-Exchange-CrossTenant-Network-Message-Id: 340b5357-43d7-4f68-04e7-08db7e9f9fb6 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:07:04.9453 (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: ZoSDHhg3U5GuZITXkYdRmbPXk9D8s3zID/eR8xdSo2P1qI0UqhBiOAnBy0Nz2O7+WCt3jtm4+S1J1tv2La6nFw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: TY0PR06MB5470 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230706_210710_159333_D48DA75D X-CRM114-Status: GOOD ( 10.15 ) 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: Use devm_platform_ioremap_resource() to simplify code. Signed-off-by: Yangtao Li --- drivers/mtd/devices/spear_smi.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/drivers/mtd/devices/spear_smi.c b/drivers/mtd/devices/spear_smi.c index cc17133be297..93bca5225116 100644 --- a/drivers/mtd/devices/spear_smi.c +++ b/drivers/mtd/devices/spear_smi.c @@ -9 [...] 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 Use devm_platform_ioremap_resource() to simplify code. Signed-off-by: Yangtao Li --- drivers/mtd/devices/spear_smi.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/drivers/mtd/devices/spear_smi.c b/drivers/mtd/devices/spear_smi.c index cc17133be297..93bca5225116 100644 --- a/drivers/mtd/devices/spear_smi.c +++ b/drivers/mtd/devices/spear_smi.c @@ -937,7 +937,6 @@ static int spear_smi_probe(struct platform_device *pdev) struct device_node *np = pdev->dev.of_node; struct spear_smi_plat_data *pdata = NULL; struct spear_smi *dev; - struct resource *smi_base; int irq, ret = 0; int i; @@ -975,9 +974,7 @@ static int spear_smi_probe(struct platform_device *pdev) goto err; } - smi_base = platform_get_resource(pdev, IORESOURCE_MEM, 0); - - dev->io_base = devm_ioremap_resource(&pdev->dev, smi_base); + dev->io_base = devm_platform_ioremap_resource(pdev, 0); if (IS_ERR(dev->io_base)) { ret = PTR_ERR(dev->io_base); goto err; From patchwork Fri Jul 7 04:06:22 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yangtao Li X-Patchwork-Id: 1804574 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=Nb/Jzwlm; 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=HGU8ZvzT; 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 4Qy0Hc2Bmwz20b8 for ; Fri, 7 Jul 2023 14:08:12 +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=JsJbQdFJYJ1j2HZ3XiltRNpMY2cxVCBsDQ9hOGPYl2s=; b=Nb/Jzwlm2mSaB0 rYp/e4379xIOlho39FaGtSNlRc6EE9J6Cja+cowZ+tuDx0PkwaHfRRH34lKY9rb61Jw7BZpjDjlbb mTtBcu+xWCt+CkyokjH39JSIHQGKxzk9gZJ2YFGOpVpGZljsS8XRYM4BlqqelpDSJw/Qi3vl8v9FK 2NkKH760pMHEg6NfLwB+JWDGmYYZw6ZPJLG2L8TT6S9zER/ChiRKvAN/i8w1eArIJZgQPtHeW/MD/ wivGKV9whjO203/GcdIJpe00SAalw6YL7bBhcCKDhjomI88vR9tsbhavz3wS8eOC1fQjAHXRVvrBt 66murijsWkjYyYe7ht4w==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1qHckx-003QcU-0E; Fri, 07 Jul 2023 04:07:43 +0000 Received: from mail-psaapc01on2071f.outbound.protection.outlook.com ([2a01:111:f400:feae::71f] helo=APC01-PSA-obe.outbound.protection.outlook.com) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1qHckd-003QEq-29 for linux-mtd@lists.infradead.org; Fri, 07 Jul 2023 04:07:39 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=KSibSDJg+dziZZPkGvp6T+j3GS2M6UWEjLs4FuNzRS/vj77aY6EJnw0GlL8nWOjAl6AuqlEBGZfY+fXRrcCztVRph6dlfTOwfEqtfzFyl07NJ3mqWhu/Pi98EImvvr7KW6FQ+KDuVwVw578yzYA/E5yV/ZOO0bKufVkuV3KPuq722k4Bw4OizXUVkkOtzal2F6XrN7LnFt4DmBxz4cBU7IWV9+dmGRzw6oBivdubBUUuCM6ZdKy7WlNQMawA5m5+c8kqfPQNZ6l5+G8M3trfbPeNrU3bd875Ba9u0F2yShGBjEbyBxbj+PmjgFqa66IBsHGQh6OeOR9jJurjiFQQoA== 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=q3B+SLIcgP87LG6wrX/sVGPC2eK5c8Quj0o2bFw8EGs=; b=NVluT0xzuRTtDrAlQSzwHs5l44NlQkD/FzUA5+HAOQMhvpZJynIe4vdp8gorFbCg7i7uPOcCmCsA289A3gTzGvztFXujmKbGE7z/QQCu/EWMtBsr0ItxEM76jVUUQwqWUzRW8IZ2pnndqT6vRMQ1H3b7R5EauYq4g9s4NAprcuPGST8jDY4A6rW8UnpYppYRDw9I9skB3zAbC5l0sk8vMsN3ffq/aO1oFWKaNaEW+SH17zs0JZneyz8VlNhIdVmHmievOZkAWgl0ugUXmWlx8LxAMPhQaawKadm1ZxJ9y6jOJiGX9AhiGEzCiyp+jH3QnrYXxdzTL25Rm+icoP3KMg== 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=q3B+SLIcgP87LG6wrX/sVGPC2eK5c8Quj0o2bFw8EGs=; b=HGU8ZvzTG3shzzsGZX523L8An44+A9RhPNH2jtOOLEYyjQXe/A4W8csSvGzk3wFYorrxfyTQZe5goYKMjtkIwyossCCB95tVw4HqiCkjda2kRNUKdscYyleojjpfHVOM5U/gGoxpAjnbEv6ADZWq44/07xKRf0TkyBTN1aipuphNXc6vFAmRUvoAtT/YCxGxFHlqQbIolYQ9SavSkPcNcJ+INqp9/6qyn8zt34TAk8Zj23JBtccnqkgvt8aG9HhosXVHyPW2imepYs24PKs5dKbUeQg1lUGddvNpkofz3Fes/9ZhgsxEEEakAaGic2krbcH4GVLm6NQMcf7eypljVw== 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 TYZPR06MB4238.apcprd06.prod.outlook.com (2603:1096:400:82::12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6565.17; Fri, 7 Jul 2023 04:07:06 +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:07:06 +0000 From: Yangtao Li To: Miquel Raynal , Richard Weinberger , Vignesh Raghavendra Cc: Yangtao Li , linux-mtd@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH 18/18] mtd: physmap-core: Use devm_platform_get_and_ioremap_resource() Date: Fri, 7 Jul 2023 12:06:22 +0800 Message-Id: <20230707040622.78174-18-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_|TYZPR06MB4238:EE_ X-MS-Office365-Filtering-Correlation-Id: d25e9eb9-5f6d-4ffb-7698-08db7e9fa0b7 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: OXRx5JdqlnQbr6ZJC54DwVv+4/vk68fhcQ9SCjTESgjZF+Hue/Opp+2tm1BRD7+MEr/1TyIXjeIDI6wId/ec6aXnsJO+11nU/CQ58Gyv674VcCSjkxtoHmkJlRQFK6lfrM9SCiMObUGXzqWpeRYNIjspWQDJwzxa2brFHrp8lucs9zDD0j/netsfxhWzN5HuWM7SmobFzubkHECh7+1ZjR4JY/M+NYHWG/DaSyfHL7c6jm/AMH8gAq5aHiSAnEKcZzdqQneKEaNR3Zvnz2Wo+rK1uek+MZNko4FmS1Zje6F+P+I6mJ475BBJuwZMgtikGbxCfSQbl8Fu1cJwAJdUP1lHyOVPpsZm7QLmh4yOlO5AN4HEgNZUfz42ZMHyrxT8HUm/qfXE0hQHSgU1Y5Un7i3oRgJg1066Zz5Er+/O8rKL+3egj0mUCawz0GaM4snXr8E7nPpnxBpC9X3/pRBfbhSaK0Xc/6Pnla0crqwfvwbT86fPkwk8H1BP4w16z+AeF4l4xrlUkl3MzAVnPJGvKEeo+0/w8hqS34lchxlUkbvVcE9yYpvseAWRk0LP3es49T+leeDRfbSg+/tIH1lxVFDonMAvy4FqzNJNcYoFS0em2by83+JJAqGZfkElzSco 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)(39860400002)(396003)(376002)(346002)(136003)(366004)(451199021)(66946007)(41300700001)(4744005)(478600001)(6512007)(110136005)(86362001)(316002)(38100700002)(52116002)(38350700002)(6666004)(6486002)(83380400001)(66476007)(36756003)(66556008)(4326008)(2616005)(2906002)(1076003)(5660300002)(6506007)(186003)(8936002)(26005)(8676002);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: zQOawX0GkAFmJS397VSjnJNCeHgTfWqMxrN/ZuO/Jy3cGoMniBkMGzP9ebYNNcVjGMF4rSSZLYPL86yPLsMYht7WyeKqC3JxfkyctUWGNmq35VQIggKjfDjJhtmi0dU8Ls+87cqHoItc7GjvLeMRzKrQB/SPmGlA0cVcoq2gaEUN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Qs3MMrH+YimT0WmYbMHewWdo9agvA+Cyl43XiFUWTfGm+3yrQW/hf3YkUKgHq/S7Jp5aXxw1WvqANmUFx71E9wKgFtEtVAVr4CnUF++1oiYpiIqUVpnL9ciOxL85rXhIFs9ISC5BcOpbRU+qCyCb9k/ktM9+Aca9ch4WJZfaS+HNWiIiAFor8A3gWkkFpyzELphzvPgZRA96cduIvk3MFkmP7C1Nmh0e2T1BeMefNlHDCg4C4k5A6UmYX29sj2cImdjFU63us4UxvjQyEbDXkjyJpN4J6bCqfT5NI2+20LjnKQs5kExtK8qHAOUt4XJfD1Z7LHwVzdj5hGRWhWnu8Nma X-OriginatorOrg: vivo.com X-MS-Exchange-CrossTenant-Network-Message-Id: d25e9eb9-5f6d-4ffb-7698-08db7e9fa0b7 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:07:06.6236 (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: xqfchJHMVLlrKd5XY1c0luc2rBFZ9svev9OJ21LegYPsyROW8uMCSJmlId8YTZCBGhGFEUP3/FIJwklBK4BRmQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: TYZPR06MB4238 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230706_210723_728897_6F4401C7 X-CRM114-Status: GOOD ( 11.45 ) 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/maps/physmap-core.c | 3 +-- 1 file changed, 1 insertion(+), 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/maps/physmap-core.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/mtd/maps/physmap-core.c b/drivers/mtd/maps/physmap-core.c index c73854da5136..78710fbc8e7f 100644 --- a/drivers/mtd/maps/physmap-core.c +++ b/drivers/mtd/maps/physmap-core.c @@ -508,8 +508,7 @@ static int physmap_flash_probe(struct platform_device *dev) for (i = 0; i < info->nmaps; i++) { struct resource *res; - res = platform_get_resource(dev, IORESOURCE_MEM, i); - info->maps[i].virt = devm_ioremap_resource(&dev->dev, res); + info->maps[i].virt = devm_platform_get_and_ioremap_resource(dev, i, &res); if (IS_ERR(info->maps[i].virt)) { err = PTR_ERR(info->maps[i].virt); goto err_out;