Message ID | 20230707040622.78174-16-frank.li@vivo.com |
---|---|
State | Accepted |
Headers | show
Return-Path: <linux-mtd-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org> 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=<UNKNOWN>) 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 <incoming@patchwork.ozlabs.org>; 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 <frank.li@vivo.com> To: Miquel Raynal <miquel.raynal@bootlin.com>, Richard Weinberger <richard@nod.at>, Vignesh Raghavendra <vigneshr@ti.com> Cc: Yangtao Li <frank.li@vivo.com>, 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/FKqv5YsaEiE3K6G4bKC91S7zFpASNbxplBA1oKH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ep4TuaPDCIP+YqPUY+w0yEckOGNrEuBMggkn60MDMF3GPYsuCf2i+TQ4zl8hGqkezsc7/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 <frank.li@vivo.com> --- 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 <linux-mtd.lists.infradead.org> List-Unsubscribe: <http://lists.infradead.org/mailman/options/linux-mtd>, <mailto:linux-mtd-request@lists.infradead.org?subject=unsubscribe> List-Archive: <http://lists.infradead.org/pipermail/linux-mtd/> List-Post: <mailto:linux-mtd@lists.infradead.org> List-Help: <mailto:linux-mtd-request@lists.infradead.org?subject=help> List-Subscribe: <http://lists.infradead.org/mailman/listinfo/linux-mtd>, <mailto:linux-mtd-request@lists.infradead.org?subject=subscribe> Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-mtd" <linux-mtd-bounces@lists.infradead.org> Errors-To: linux-mtd-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org |
Series |
[01/18] mtd: rawnand: sunxi: Use devm_platform_get_and_ioremap_resource()
|
expand
|
On Fri, 2023-07-07 at 04:06:20 UTC, Yangtao Li wrote: > Use devm_platform_ioremap_resource() to simplify code. > > Signed-off-by: Yangtao Li <frank.li@vivo.com> Applied to https://git.kernel.org/pub/scm/linux/kernel/git/mtd/linux.git mtd/next, thanks. Miquel
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)) {
Use devm_platform_ioremap_resource() to simplify code. Signed-off-by: Yangtao Li <frank.li@vivo.com> --- drivers/mtd/devices/st_spi_fsm.c | 14 ++------------ 1 file changed, 2 insertions(+), 12 deletions(-)