Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp31373535rwd; Thu, 6 Jul 2023 21:12:48 -0700 (PDT) X-Google-Smtp-Source: APBJJlEjEMcmBvuAygexogXStKBk2Uxs9kJbbx8oqoFDXr8uqb7V39CEDg7KQyPigwO13pZ+vK0I X-Received: by 2002:a05:620a:4114:b0:767:26a4:ab3d with SMTP id j20-20020a05620a411400b0076726a4ab3dmr4907443qko.19.1688703167689; Thu, 06 Jul 2023 21:12:47 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1688703167; cv=pass; d=google.com; s=arc-20160816; b=KuRo2rv02mG7no2JBPm9QAjMrOg+S5FwxJEts9j9jSDv1Pq6gr2A1BxqJTHyfVzfm6 xaKkiCPzbfZtxJNJ3IlxCxn47EffCLiQJpzwgNUzWRmsDrR+SMdcLl1dOXHyAmIiwYhR 9UjVWAtp/KxSnBgxTFnbnF34yYdTaiBp0b9FiIfPdt067kOUu0HEAVKoB688lKSx3i1G lfHTEXzyueBEpMRSM2Oe20e5W6o2k4KDPTKQGTnoBn9SYd3VETcE14OhRD0uk05kTnPz facVkyWLY9qP2+Vel9A8zTwLs0/biwreeL5oAZH3NC28okWiNA+vXAVHCQGXUpfYa6Y6 MPQw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:content-transfer-encoding :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=KW9CPVjpjNwBilYdO7l2jc/rsyVj9Yu4udnRwh901K8=; fh=V/t4HE0MWlZFsCBdV9dmci/qx8dk5JuPSODu2Cp0woY=; b=bAchtt39zrBJj5d1QKLWg8zonzYUrjEDrocJ/YKvwvhfFjfJMvg6x2hQGN96jvyrfv a38HGKLsSZSKhRuUhczHTVsSHfb6/Wt3J3wQe4gYEfNx+q3JYwE2NsthjVqw05vHyqhe GZDiQmZwz0ISPmcsNLE/UT4ZH9saz81dA1kMGNBPWHYeCCcs609G3Bcnq/VuVNPsF2IH 180auwWv93RUaDpemaZC79Clk8Ik8ax2Mc7CyRFt6Em5+pkgF+Feq0dpWQrFiXoixJRF PRk1FdCZapj1SOq7Y9jTYJVlpadJN9VHcyRwmU6QEOju0EH7FZ7LpyvdBSfgifQw23KS vXdw== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@vivo.com header.s=selector2 header.b=D+cwlUNi; arc=pass (i=1 spf=pass spfdomain=vivo.com dkim=pass dkdomain=vivo.com dmarc=pass fromdomain=vivo.com); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=vivo.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id bq25-20020a056a000e1900b00674311392f7si2839635pfb.31.2023.07.06.21.12.35; Thu, 06 Jul 2023 21:12:47 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@vivo.com header.s=selector2 header.b=D+cwlUNi; arc=pass (i=1 spf=pass spfdomain=vivo.com dkim=pass dkdomain=vivo.com dmarc=pass fromdomain=vivo.com); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=vivo.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231675AbjGGEGx (ORCPT + 99 others); Fri, 7 Jul 2023 00:06:53 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49630 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231280AbjGGEGm (ORCPT ); Fri, 7 Jul 2023 00:06:42 -0400 Received: from APC01-TYZ-obe.outbound.protection.outlook.com (mail-tyzapc01on2103.outbound.protection.outlook.com [40.107.117.103]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0BA831FD8 for ; Thu, 6 Jul 2023 21:06:42 -0700 (PDT) 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> Content-Transfer-Encoding: 8bit Content-Type: text/plain 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: =?us-ascii?Q?e2gCSOcOk9OFJRJyVWD7mMn1FWp356IN3SLAwZUVW6mN5uvLWYVNmkMSmq4u?= =?us-ascii?Q?RGfyQCbo9hnIZ6hESRXvMEpT7JR9J6EMehqnLfJPMJZ3hzoWeeSECCU8ttEC?= =?us-ascii?Q?svPPSDdp5Nz8c8DaEhZ0jrOQW6kjjpvr8iWx5COkhp9JFj1b/iOSw7mJAITG?= =?us-ascii?Q?s1LBEmdSGcWboF1CG6sTxGUqJlrn7rMQUAI0VE25JMBr6s6EyXbNOhWshTMg?= =?us-ascii?Q?H6MWjSBVIIjJbrVgdrrSPhO/451QgltCfU8bhiqX+/+vT35c0xomODgjN2CU?= =?us-ascii?Q?n0/XrNOxs2W2H5vZF90KwS8UTYisFOLPLIZ/TOPoDc0/Pyb98EMDDEV9honA?= =?us-ascii?Q?A2j9BY/JilWqGCXyfQ5mR8TrxBgIDW7XJCUZ/KpJR8X70ySzoAZhy07IgGCh?= =?us-ascii?Q?UQQ8ubRGBXn9e6BKWvncF2Al4mNsupiE34H4E5LB8oSPtrs2NPwPDWjG456d?= =?us-ascii?Q?XD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Y9vBwF8AdDXzZL2Mu4jbruYV06sd?= =?us-ascii?Q?nBIk4nsdkJUgy/2+xN1K1zkGNuYPLmHzbdN1GA052zVen71Y/uHK1YTgaUVp?= =?us-ascii?Q?fG0VXxsh/OCaG7zXGqwwCnd31gfCYbqnqzqWTUwBOJoMVEeAPOsu2nYZPj3E?= =?us-ascii?Q?GuMNU3LByOyk5hOe8u8xXR6DEaHc41xPPa9HwEsSOddl80X4r+DqhP9k60Mr?= =?us-ascii?Q?48vIVyYYNnm7Nw03t2WOCW5t4++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-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2,SPF_HELO_PASS,SPF_PASS,T_SCC_BODY_TEXT_LINE, URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.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 */ -- 2.39.0