From patchwork Wed Jul 12 06:28:39 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: =?utf-8?b?5p2O5oms6Z+s?= X-Patchwork-Id: 118860 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:a6b2:0:b0:3e4:2afc:c1 with SMTP id c18csp949074vqm; Tue, 11 Jul 2023 23:42:55 -0700 (PDT) X-Google-Smtp-Source: APBJJlETDegqVnL/EUnnbSjorAb4wPL0UZjPZGuS6LXl/sjN5DXdkzwYTzK1s64Z4hruqmfE7Vth X-Received: by 2002:a9d:6c17:0:b0:6b9:696d:716a with SMTP id f23-20020a9d6c17000000b006b9696d716amr7283246otq.18.1689144175419; Tue, 11 Jul 2023 23:42:55 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1689144175; cv=pass; d=google.com; s=arc-20160816; b=E3vMu9rX6ihCi6vypO7+4Ku1dB65IzpXoz7BDCgFyM0CLtNmG0Z9hF6kfHiPHSl32y FPyK7RTuunF13DBezlrlGU2buoSvfI0CqeLZC/BKARiUGVOfw6WU/we3p+/q9pZUQmmk gLyhe1QDCRMDueHoW0Y3h6uctWSSp3WvMFpFIfnVTBYtXjmLeHzoHCT7dy4IVr4uP/t4 dhLrZ9PXj/biGrizj+9IPFTw1gQBuQr578A5Xtx+PiTyC20w6GWkrP//UwWYoWBca9Xd QLGGAR3S6CKJU4agyDSK0TWr55zqRPQUDtDt+bQhJ2N8/wdJZ1GLe3WNe0l0kjToa/W2 3yXg== 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 :message-id:date:subject:cc:to:from:dkim-signature; bh=k83S4Y3tdLmTiBXpT60jdbLyZrj6PLFn6F1UPSbBCPY=; fh=3q3PdFZ4xZD+NRM1r67J8VrVY0AyTe+ioGbzqg79a6w=; b=FK0Cc9y6bXmNtbxmLVRtszCPj76y+FKCJDydAcbQF+KWAxiX6Z5dk8GYyRBYYTseIM QdnIihPX+a9sw4l+5xDdPMPcNKNaiYgiIfPPGrqxeqWaurr1VXCItudZ1q1th7Saw5Ba twUi/4A0hkMO0VAJfwmZAWbxf3Uq+sIyNMS43Q8rE9K6J1EX0DVRTPVsRWEy3bcxfTFD 0qynOG1UwIBcKY0qfGBo1xX4w409/+DjOCTBx2EaXXwzRa4XX3r0xFpl+wcFtqA9E1gh 2jXhVAaPfZj/FD9OiBXnbTfRoEpTHToY1XpttahSnP+XGnxtApbc3FlSmIL7AhLMzJUT jBCQ== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@vivo.com header.s=selector2 header.b=EhRu69O4; 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: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id lk18-20020a17090b33d200b00265ca1c461asi2780301pjb.175.2023.07.11.23.42.41; Tue, 11 Jul 2023 23:42:55 -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=EhRu69O4; 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 S231853AbjGLG3O (ORCPT + 99 others); Wed, 12 Jul 2023 02:29:14 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59080 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229674AbjGLG3M (ORCPT ); Wed, 12 Jul 2023 02:29:12 -0400 Received: from APC01-TYZ-obe.outbound.protection.outlook.com (mail-tyzapc01on2128.outbound.protection.outlook.com [40.107.117.128]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6E96D10D2; Tue, 11 Jul 2023 23:29:11 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=ckafQSFARpsYTkfkiKBiXfaHZZHcmdZssLIXFxdOylN0JAeggNZdLlxJrPpIG3ye66Uy7BRRf9hhJXV+/5ImMvu/fcu1tEWW0/IDSknVAxxfd+BEORL2dvPJLtagNNL0iU2ZUtrSq38nUpMWudtAFV58/MK2JgcV/F85ETtTA5pagvKueXaaoJinr4e/Jml79vy304vp5kZMJChgnU6Js6Oe3lGHre8km8hfc/awNqz3913HTE2cd8oop/F5ATD4VMmQKZscn+LkM1VcST6yYFXGXx+55UjzBGx2heLaoueKhnvow14UkJTSMVhqDKzIfSG80p5fWUpjG7mBL77fPA== 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=k83S4Y3tdLmTiBXpT60jdbLyZrj6PLFn6F1UPSbBCPY=; b=cN6qADxEQpV10t8rzBaRUbwl/iWj8Jf8OMWJHaMkBS6k6FirrUGwEt3rU2BIVo03oWRGL8QoTNpAf3mA27oPuCPoBfylEgA1dzYMrJnODC3EI//gW3T6M3jJcWmmJHxZJl/CpBoD40S8eoBYaDYtVkgfJKMAEmpEab/DQ1ybuFNh40upboYnTFYYrkdXZjOKJQeOD81DlrgnmvyyTxRGKJ506hDcdX+SByxu+nqrCAqktvrbanMO+Es7MuIO7MyDXUTIUEnbq4GS+11RooVt7pnGL/sMqV1HgT08buw9j9FeDviwgTCLx17q4CiGXruf9+2MMBOKyVhY4GZP1LwTjA== 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=k83S4Y3tdLmTiBXpT60jdbLyZrj6PLFn6F1UPSbBCPY=; b=EhRu69O4AgoF6A7zTkWi2kaoCnr45dvn9zvFcacjmoi5jIAC6lM1wJypuJ5BO90yYJdxh49yny3uwOAYnam7sqQOlmSJas9xF+6rL0l49U5DGFgg5P+SWalBUPqu4SvoSVeZxjz2CcQ88EKfwRZ2GHiNRLTA6kkm0XpH8DpB7PH4IznxMfiqIzu+w/AO6M+IGR09okrc8R9nhWKDt5srvKAk1yJVaXUCzGqmLVHPvURLecaechwr6xIqUK0eyTNZr1Gwkj/yG/Wu9MgvkhBZAmpS2LqYitt3DGdLpC4Au85KLJ/3sq44wKb8o2DJ0PYqOCR5wm41m+7CaMZjVCgM/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 KL1PR06MB6687.apcprd06.prod.outlook.com (2603:1096:820:fd::7) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6588.20; Wed, 12 Jul 2023 06:29:07 +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.028; Wed, 12 Jul 2023 06:29:07 +0000 From: Yangtao Li To: Greg Kroah-Hartman , Jiri Slaby Cc: Yangtao Li , linux-serial@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 01/15] serial: ar933x: Use devm_platform_get_and_ioremap_resource() Date: Wed, 12 Jul 2023 14:28:39 +0800 Message-Id: <20230712062853.11007-1-frank.li@vivo.com> X-Mailer: git-send-email 2.39.0 X-ClientProxiedBy: SI2PR01CA0024.apcprd01.prod.exchangelabs.com (2603:1096:4:192::20) To SEZPR06MB5269.apcprd06.prod.outlook.com (2603:1096:101:78::6) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: SEZPR06MB5269:EE_|KL1PR06MB6687:EE_ X-MS-Office365-Filtering-Correlation-Id: 2a5d9851-df14-4777-5e7b-08db82a14b26 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: /DTsC9DId+NtZseeR3+zk3ky5ptfduHj89/11luK/GG2fYG8vcACrmdj1B7YYVDC3HBENtrJeTJQVwIRQL6z19qcMakFor56KpG0X4tS+r3ffVsWPYmwV8gi9wDAt2kAs9IA6dEaQFN33/TjsbCxHJC3bJX+hmxJN7UqIvD4E96qJd79HOCcJ9uehmvst8Tefpj7uleZVAl4VccRg6SZspJFzNFIjguafu+Q2QVWcWLeJd5UGrE8KmsZ4oT3pYBMQq8qciw2j/91v+1pJRYTq25b431BMKMLIlh/IbcsbMDqX88UfKi6qy5Ffj7aVuRQpBEIs7k8Cbtto7uqNt96l2DPOBiQ5FJopghXtcek1DkZzb+DUWE4cM7pODRz6d2uDKkuaBfImEOJ0lEstI+sN4uNDbV9F/O/1TSIv1JHmYyg1A6Kwx3xhzsWUzkvR5kk06rqlGaCmB1JxzHuN5b32VNhr4jSfXP10lAYSw4jjTCdBTbXVOc/9tSn/kt24P46rLeGGWfnWUyJxhejobCjeGHEmhBOfzDVhxkd9v49AOadq0VbwYQf94MIWoDV/snlKICBlGIimUNwB44zvi+8GvvG31z8+wi1qORtOF3upgpP1fXjEIByL5vqhkvw3Wbi 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)(366004)(376002)(346002)(396003)(136003)(39860400002)(451199021)(83380400001)(2616005)(38100700002)(38350700002)(36756003)(86362001)(110136005)(478600001)(186003)(26005)(1076003)(6486002)(6512007)(6666004)(52116002)(5660300002)(8676002)(66946007)(8936002)(66476007)(66556008)(4744005)(2906002)(41300700001)(316002)(4326008)(6506007);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: Id13QsXE+YCpmDQiu9/1ILqFWPctDQPCALCuPbtGq4Z0Z2LXwev7rGYlcu2P3PqiqmDRXW5vcTB6tJfFtBqTpHsupT6N5UfhkvrS0x2EjHZkg02/ysQga0EcHNY2jMVDEZCXvE//tg+G8LP1dRWimQj4StCHdIwj/rKRK5rKyqPi9iFcLtkvuv6EW7v8Pukv9smeYaNWLvrkvTBwL+zo7hNVklwT0SdgPIjORGh1+0udgT0fHkN+Svic3PPneXP9ps7sj/POwV8Jk09iUyYb4Hz08JgqEexpXG/utbJKpYjOHn2szPgK8fb4S2+nbg+rVVtJ8tRhPBWD00AdBA4s2LIRyt2Ghy693PCkd8CSYaBLkDnZLnpw7Ll6P0MXgpHk5d5EonBtURYCY3TZHRiPgP8oXgx5clj3L26z49B97WNWn/sX2FZosAVZWHURgVy80KfBF3wZ3HHIfmrH5wTWpkFI+nPIqcsfrJlJtxILGYW38Y4pQStXjIznpOiZ7JdKYod5BD35fixKA86kjUg6GWkJ9spUdHDlvFVECWzes70+zmNzF0U9laL7FntqYvRbzemMLFz1Sfm2IL54gDSeJ9TMBx9oIVWmmyegLICZvLhDzDBFxB3hNChtWG63YwTwFEL/8bcD67wFHzI/afX62Y0eP+wTNcJPV4dxMO/aMpk9KT6ytIqe9xLyMteitRITxguXQENDvmWWLVHyqrucICJZjfttsWsVawfjm0eBkyiYpNaMDr997vp+x1a7iTnxyPZ5ApAoZBzXD5jn/xIT5HIEeo0lBrInrjC4HT2r817h3q3nwg4ljpIa5Y7ZVqLF9f+Wb3L0GqnysaE437k7zopUbblEyOW8w9do2P+3BdfQZSvgZMCohPrMD3bcMelfVveLXDgYlqHZMVVg9o+tQDZCjXvpCxnTrYb6h82BBz6sz4IouHZzCT6E5qDv8+ABd/7SQcPj690NSDX6LSYjtjgrbrFXJfhkuzBIEZV9/z3IjPVkY0h+4CpcEg8Oj66VRT7QbwXrwa/ozBovUGg1/P/eXlcrvC4GzJ64wkbcl2HBp/hEM6nOBn8wUQFnt65fUCEz+tMVKhctyTQQFRJ1LOrjaxE63PsrWA731Box3goWjOylaYZDOMlqDv4msTEmW/UJZn9/TTURFVV2LAnAlskIZRPKCYO+V+6AgjYLRh4fiM3u0pfZifUjMwrQa+fv3AnBc+iPvCyo6k4GAStGTo26lEsDKNXLstVuXu0QCdGttgtC6JhzryDcGK8FJIlWOEiH1K+q0V3Z4ozNQqOL52hE2hgSJJv8BuD5Kn5PixcIH3rEq2vEAdOyr5B0+nZuZmr6m92Y6ZMVvqey7DHQk7s8Cjn/K7MaLJlfOQAog3caWDgQdwbYlsdwYFcwE5PGJKGi2gJ4sFvOwplz3fAWrtN+S/kJhSsggqs3zLBPraDdrMPRLS6Dc7r9B6pirnZ4HOsIFHC3zAvfEBY+9WfPLybN3cdCxoB9pMkEj/bHzdiiiVP1RRr6usO8XK89w4Reor5hz1x06F6eBS6SKJYGPZLsFomIjCnaR9hJYAuN7oMOZ/1/m5ReDgV3HJNTEdj/ X-OriginatorOrg: vivo.com X-MS-Exchange-CrossTenant-Network-Message-Id: 2a5d9851-df14-4777-5e7b-08db82a14b26 X-MS-Exchange-CrossTenant-AuthSource: SEZPR06MB5269.apcprd06.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 12 Jul 2023 06:29:06.9043 (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: SDhrTE4G7DEI+5g/4HBIgyiHZe3/rS+KWNPrskWX4/SxNY03czTtLULIrWqPPc3UaIJZ/yg3Mm9ZoVTOqzX2BQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: KL1PR06MB6687 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_BLOCKED, 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 X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1771196043000096199 X-GMAIL-MSGID: 1771196043000096199 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/tty/serial/ar933x_uart.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/tty/serial/ar933x_uart.c b/drivers/tty/serial/ar933x_uart.c index 4c3d04c6826a..924c1a89347c 100644 --- a/drivers/tty/serial/ar933x_uart.c +++ b/drivers/tty/serial/ar933x_uart.c @@ -749,8 +749,7 @@ static int ar933x_uart_probe(struct platform_device *pdev) port = &up->port; - mem_res = platform_get_resource(pdev, IORESOURCE_MEM, 0); - port->membase = devm_ioremap_resource(&pdev->dev, mem_res); + port->membase = devm_platform_get_and_ioremap_resource(pdev, 0, &mem_res); if (IS_ERR(port->membase)) return PTR_ERR(port->membase); From patchwork Wed Jul 12 06:28:40 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: =?utf-8?b?5p2O5oms6Z+s?= X-Patchwork-Id: 118857 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:a6b2:0:b0:3e4:2afc:c1 with SMTP id c18csp949023vqm; Tue, 11 Jul 2023 23:42:46 -0700 (PDT) X-Google-Smtp-Source: APBJJlEE3YIx0OKvkZ10Pw1bPx98lDnruRha/y97NwHdgSM5hhCjF3UDc9PZ99cArsIuxyRfbPrq X-Received: by 2002:a17:902:d501:b0:1b6:c139:9b23 with SMTP id b1-20020a170902d50100b001b6c1399b23mr16469541plg.26.1689144165795; Tue, 11 Jul 2023 23:42:45 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1689144165; cv=pass; d=google.com; s=arc-20160816; b=Oc7vb/E3QfhBdZMXNH1o1ZYe5rtM3gWG1h/B95ZxYTDYIt+OZXDnLl+zo591o7g7YV 7Pi6xyESJvMU44DM2m6fKUa2OGg9prXjlFmdv66Bmb4admt+Bm2eLPM+RSInzGTlDHA5 hI4gKhqJNVmYm17MEreeBnNsrpqXd4aimVBTaNUWg4GOqzuQdPykgpomnNRILcbesAfE 2b1e3bSyWK01/Y9DLCmE7Y0JYf0CkXtqpcKElj6pvUaiFAQS3bvCAaUJFBc1KvykAGYX lUXGXBhYKGNJElryOunWFygjt9yg6rnSX5gSMMVYsMS5Ks4JGKWnpI5myuLClTowh+J0 izkQ== 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=Fyh5uj2vBRLS52U0JOgxcBp8oPBtrt3xYRqE6xOu/yg=; fh=3q3PdFZ4xZD+NRM1r67J8VrVY0AyTe+ioGbzqg79a6w=; b=ZWDvTq3CdEFeyKGU1vnm/y67+Hmi3W/RQ45ZJD57+vzN/OhMj06HLyCySda9Amr1gA 5VVP/NoDtwWwcwhoHT3+5tH1R2xrfTaaLIJ1VU4CLY5hMzk18zz0EO2lUxjCvrsUrGdM HlF4MEHdL+T6hbEey0IZZU8/qV8CRgTaoEfE+IE0UWoY5MOvZHSgMRsObRquJGv+gRdz F5+fMdI8Xag1N5Rof4GdXSEG9ju1f+tPD3Zt9PB98UoAkueoiXwmKKs3TtIZLHpfJlCr OQ5AEro9V23dhrBSakpKyI8w+bbiFr21LDdlSl3+SSDlCx4unXkaSFSjH6sjuTQu0t5e 7heg== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@vivo.com header.s=selector2 header.b=QJltsnXk; 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: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id z2-20020a1709027e8200b001b892a54da5si2773542pla.37.2023.07.11.23.42.33; Tue, 11 Jul 2023 23:42:45 -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=QJltsnXk; 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 S232054AbjGLG3V (ORCPT + 99 others); Wed, 12 Jul 2023 02:29:21 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59102 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231981AbjGLG3T (ORCPT ); Wed, 12 Jul 2023 02:29:19 -0400 Received: from APC01-PSA-obe.outbound.protection.outlook.com (mail-psaapc01on2092.outbound.protection.outlook.com [40.107.255.92]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 731BE1726; Tue, 11 Jul 2023 23:29:17 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Q60NwVy/Rk/v1QZtq8EZngqwoT5HW2uGa72qcS2yCohxBHUrzF8ocr/G1stIKFeNmtSiqRBXHf3uKRqfRrSUUPEbSu6khVg+uCT1l/GezzTYeWhjQtKlTpfSNXjo9ag+6lfwYqzuj9Yq9srOx13mx1Vu6g4B6/GR9bjmkBtlTERM/8CuNQUkFQYESz4iMbJoAMdUt08ogmtY2O7m46snT1OuurEEzWVkbTTamSJimNDzuodeJSahqyiuM1xHRJC71TOFXgM9pAZPZZbF2hXaT8Xpi/lcxqNXJrvI7by+2qZaDS0Vncu/AISJ+IWdOfJQtXZWWxdoU4GkfFN2OGlnfw== 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=Fyh5uj2vBRLS52U0JOgxcBp8oPBtrt3xYRqE6xOu/yg=; b=Ccf5cE8x6zMCpK9eI+c6DVGXuw9WmaeIfvIGUVRsn4sXxBPjPRVkT4l/AlRJZOpjlxxIk2w0TqzzTmQCE4BB/2KbuBQbn8OfLVXVJVniaXjHeAxOpZW9vwYOMbr9+U0pCx6fKXM6P6uDOs2j55ZrP2CR4SEt5rxfwJ9e43ockMC6Hn/KMoohu7rkpGptIfsrDYOcOGzMZ4cjZYSMz4X1xa/hDKEXPSKRdeYRkiQRF66kDyrd3IFfpg0096Je3sEEdwT/SZzC7Qs2XZ+4xxluI0i3b/mPLMh75C/Gq3sOKSQe6EMZF0YwU16AHZ8IQqQLEIrR29Ftz3NaxUKAZj4U3A== 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=Fyh5uj2vBRLS52U0JOgxcBp8oPBtrt3xYRqE6xOu/yg=; b=QJltsnXk4nb5okzITRk+L20A+Q1Qs9/fzGOzQAXVNs/O37EIr6u1w0GNxOF+fTQO0/ef2ETQnK2YPyyzkzVrony9UOlC0sOFzdrfY3V7Zi1TDxiZCOYN5RrDK8o/lfJV2XfxhH/FQVGePpd1Pn+CVhFmkfdfzSvbA7hwfYgT05Lp+PRGskw/7mZfKLttvZ+pHDUXmoVRZmO5ygM5iU2nrMv2ExPAurFQ4b/iMAVHGPiP98IAlJWpVuxN9AL31+JJkCSFrlB0xTfXTK7GY+KIya5P6FuD3SZjdBAXqZqrLlD/Km7GEVLWN9LhmUJAnLutnrF6Iqv/LCH/sU9zDQJ2Gw== 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 KL1PR06MB6672.apcprd06.prod.outlook.com (2603:1096:820:101::6) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6588.20; Wed, 12 Jul 2023 06:29:09 +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.028; Wed, 12 Jul 2023 06:29:09 +0000 From: Yangtao Li To: Greg Kroah-Hartman , Jiri Slaby Cc: Yangtao Li , linux-serial@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 02/15] serial: bcm63xx-uart: Use devm_platform_get_and_ioremap_resource() Date: Wed, 12 Jul 2023 14:28:40 +0800 Message-Id: <20230712062853.11007-2-frank.li@vivo.com> X-Mailer: git-send-email 2.39.0 In-Reply-To: <20230712062853.11007-1-frank.li@vivo.com> References: <20230712062853.11007-1-frank.li@vivo.com> X-ClientProxiedBy: SI2PR01CA0024.apcprd01.prod.exchangelabs.com (2603:1096:4:192::20) To SEZPR06MB5269.apcprd06.prod.outlook.com (2603:1096:101:78::6) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: SEZPR06MB5269:EE_|KL1PR06MB6672:EE_ X-MS-Office365-Filtering-Correlation-Id: f3defd87-a8db-4eee-c713-08db82a14c84 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 7Dg+renFN7iphcoahCzDSz7OTK3dOAqtKD3ZR79ZdP1eXW6NVSvARELYaWD00IgdA2O2n9ea1AE41iB/UYvXM4gZkIgTqMsDaDhAyNIPazRIamK42oPVvZ1CCPXTSB9WnUXdPDqatTMAZ/uxvHeD1yaKfJqfNb8oz1uUqduyJdt8Gi7ciVHQSDmUoWdyZMus1yl6MGRMbrMXY402IOUR/qyMYkaRWihwpYoa20Ez2cYpk+/1iIGLjDeI0/JDEUdOwNXinQy7M99NsxTS5Wfb/3jgtCKC0P1r6Y2OTrUAk/9BHwe3slnJP+NJkRhyyZB6KU+0uO4tlA4cv5dpno1Yh2H3BeN5yCCupq50m/Xy4OqcyQK7WOeJBjW/Zqz0tundaEnfm2AOAzYALO3bVw+GvAh5HHqvItVkeJtu6K+rsqKRLjOgreIGZqUab7zO9s0xNiTjfl39x+Lh8mk8AuH+a8Gl27ULAlwKC+rFB297Bq2LjAT1UNDDRDlv+vp9tiyOnNBhJjWnp39BE8J76+M0i4OGA8AaOro1XJFqE0HAOMhtYRFaZZVwVrgRbG3E3mOeiApZB/mCVf/NfzREsl2L1QTg8GcgHG5NVz9vJtd4WeN1Ilqm91yyhHj+HTocHonH 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)(136003)(39860400002)(346002)(376002)(396003)(366004)(451199021)(86362001)(38350700002)(38100700002)(4326008)(316002)(110136005)(478600001)(41300700001)(66556008)(66476007)(66946007)(5660300002)(6506007)(8936002)(8676002)(2906002)(6486002)(6512007)(6666004)(52116002)(26005)(186003)(1076003)(83380400001)(36756003)(2616005);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: xX0D4F0ntWF8im8g79/4L9uMTaZWSuoaSGEpak2lHJT4zPxgZMBEN+zKT6irvsFb6UiWMbTtxLQiBuBAi4eyStlo+Sz6m1Kbn8Ec7pU3OL4dcyu7rv9Rtw5K8+2e+r9sCrkMepJRbc/Q+IqjN6+h9tXpxqLPDwZ8k0PTO192jPzawgZDYqshA5HZXGi9Z8uGCjdoGAiLAMxn1ljiwqHxS4FvEX5MoP3jT52YVrIQrGogbfT09CxPll/D+iirHMQj4jYk4wIUIGeP/eJoig+t8Dkg4MvQILFKbkpsABW6qge/qb9KOMDfPIw64kDyCYxbcNXB4J9hniPBRHZAGbz+1JtP6jnmROVtpqf28tbOJdjbcarjdkO9wBOSS2PdbJBWQsZu1x+AK4jSjTEHLMWTPpJVs41V+AVDC/4/eq/c8ld35PGGB4A21WLmt+YHcLlZyc2gQ7Kd/h9ZDYfSQkl7TuHxOb/3+bnk+Y/9sXX3xdCcI3FZgTDGxEbZoP+reYrGEQA2GspVropYlZRyzh7zsHzFnXKLISGVpW6p9XEZtXyXPwxbm+g2zc4NHYwJTuCHrrB0sUVZfO9CI134ZeIwE6sGix5AfpP01nB9IMGIVHUj33kzT3empVnn3qmSk0QuWk+ET1hl4ynwjNl6CGxwIGqGPorlrrTSq5Ns6fXInTp/NraRJxFj4BDYKqey11D1GNWxJo4rC/1BZjGSD9Ny7bwwi4hVwc1O6BbdsWp6ocNmxCBBPSqFQvfRV/xXHAcRExS26BTpWU+nCC5X8z8xJDG50QU04h0rapnj17YYS0xDy4be15kP6jNhgh4uXw+NxNawPojdcbwIW1IHhEY8AykWk3tzSsSa4qLQIJZZJgM9zSjRenBIxAZdEY2IsNkOEPlF9y0B1RRKmuqrE2987HAppBctzpdujRqD+6xqyhlsjNkeLh21cO39D1HP1KEZQkMSQmUOD2HcmzZC+BebyyYc0CZmgvSkgCLz61G4SykxL+XehFFuEGoZc5yMqSuN+q7NQDNgeJ3guuTjt78zdDvyKi0fgvA648yokz6vzCx0hM7MhftbvojZmCxBtsuyz7oS+YrdT6LC+JQl3BEPziYGWBm1Y6xXqqK/2KCqaQgeKxSW5edRvEXxuAJUdeBkrPURzSXKImJjWsgrf4bI6gDO1i/VMwIxhXr2Lb6WL55C0G0G0MIDaGb/WxLvqIXwW2fD5aNNJ7LtrDrs3cQ5FQYknuftLFEccBBe9RQNsSj1xcCeaq6owvoAYkViQLGnXW8+farBqMgkKt+6+lSNj640VvBY1ne8Jp1oxNcCVdBji9nNn+3DxQPXXwz6A9Xa9ZJoSWHFj69wjUXThVgeRPUzqkhUgqs6ie7U3XKBV7OsrQwEMVgtA/ifzpMQOZ4XQfTjHI8c/1Kde4QQcX9f1XVn4QR3YSBMuCz8tRQpIo/PYIz30vQQFY09krHB2612byNdWIKSEjoMUbiBi79TVmLYCESySR8WSMknBDvUctxMbxqFR9rtDOpidwphfU3Q03FKDaLxiu468f2JVKH03usgzvbz5b4HKdTNgzfzBcIKMrRkCJn61l3TimlQl2L0 X-OriginatorOrg: vivo.com X-MS-Exchange-CrossTenant-Network-Message-Id: f3defd87-a8db-4eee-c713-08db82a14c84 X-MS-Exchange-CrossTenant-AuthSource: SEZPR06MB5269.apcprd06.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 12 Jul 2023 06:29:09.0499 (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: kWZ55iVSRzKm/PmbsIVfwsvRas7wtqwkadwIExazsYS7g4O8IotjLgWjZZoHv2/ydHnAXp6EO2z8Q8KYPtTTvw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: KL1PR06MB6672 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_BLOCKED, 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 X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1771196032873975703 X-GMAIL-MSGID: 1771196032873975703 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/tty/serial/bcm63xx_uart.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/drivers/tty/serial/bcm63xx_uart.c b/drivers/tty/serial/bcm63xx_uart.c index 55e82d0bf92d..0dd8cceb837c 100644 --- a/drivers/tty/serial/bcm63xx_uart.c +++ b/drivers/tty/serial/bcm63xx_uart.c @@ -832,14 +832,10 @@ static int bcm_uart_probe(struct platform_device *pdev) return -EBUSY; memset(port, 0, sizeof(*port)); - res_mem = platform_get_resource(pdev, IORESOURCE_MEM, 0); - if (!res_mem) - return -ENODEV; - - port->mapbase = res_mem->start; - port->membase = devm_ioremap_resource(&pdev->dev, res_mem); + port->membase = devm_platform_get_and_ioremap_resource(pdev, 0, &res_mem); if (IS_ERR(port->membase)) return PTR_ERR(port->membase); + port->mapbase = res_mem->start; ret = platform_get_irq(pdev, 0); if (ret < 0) From patchwork Wed Jul 12 06:28:41 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: =?utf-8?b?5p2O5oms6Z+s?= X-Patchwork-Id: 118865 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:a6b2:0:b0:3e4:2afc:c1 with SMTP id c18csp949573vqm; Tue, 11 Jul 2023 23:44:29 -0700 (PDT) X-Google-Smtp-Source: APBJJlEigdoVtkiZwG7oGx2YiNtxpifvutaHXgJEBB/cPmeVbK9l2dVtbj1QW+L8ylKWcOM2dn7C X-Received: by 2002:a05:6e02:14c5:b0:346:5895:f9c8 with SMTP id o5-20020a056e0214c500b003465895f9c8mr9272143ilk.10.1689144269217; Tue, 11 Jul 2023 23:44:29 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1689144269; cv=pass; d=google.com; s=arc-20160816; b=jt6BOZaQE/JQFm8fIJlf7AeqD7EoF0ClY8T4GgyRtjDDSRt2+sHQ907jZ+HxAADlq+ 2CWK9v97+d8ivM31eFiMeMqK4tvlRfTxcRsD9YWEa4fRtDDMlkgSMNcvAth+sQd0pVzG RZE6FR7COkMh/25MLWl0Nx2/X1z2pcMcS9BqStYEITM61ic7M57Tf7YIvxGKi2ryyAPQ nBHjpyYsun4YuA/SEi1tWYiGqONpb7iE3MQmpQakBtjx2BpLOW+JexntML3hX3fNOcxB yopHaXoqYgXUhVrcIYRNB6pfv9jVmI+27aVMK3FUKUIiDxeOJ2v4AmXD6IsmLbFkYBhA eG0w== 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=ZozWrzBbgRSJsVIQmRLHJ99OtcdKbjF1rw6LaMWhE1g=; fh=hM+Cpu4leDyPEDEgNowkQuwzMwf252pYYm42XMSmjlk=; b=AAdiHWXIYMZ7YM3AXVpM1BX3HzvHFi7fwQUti5IZ2cVTFZQAyIw6U7wr0Wm2c1ebdW SckqV/A9MCFKicbW6p18cC3p7lyopb8bXFIKnB75c5F4MN3m3zyYFo5DgCJvuWeqVeuM AMElUiZDu/gag1V0ZbV2EoM/eeNidmz4hcmW/S2qr1b7H0TFdU11L96/bt8gNIlQwkbo KBi/iN2Pofxo2zaZJ7gUJu1OWpbZPLA/kxcof4xO0OLKlhXbPzsHPaFfk2FBM7WUIezk JFkcXuST0nKlDzmtvembHAGrtsPFWIJmhqa/adRlpUdI234xar5V+jYBJFM9kQWC/uv6 P1ZA== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@vivo.com header.s=selector2 header.b=aASmB2gu; 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: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id y13-20020a655a0d000000b0050fa9bc63cbsi2514885pgs.432.2023.07.11.23.44.15; Tue, 11 Jul 2023 23:44:29 -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=aASmB2gu; 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 S232077AbjGLG3Z (ORCPT + 99 others); Wed, 12 Jul 2023 02:29:25 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59112 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229674AbjGLG3U (ORCPT ); Wed, 12 Jul 2023 02:29:20 -0400 Received: from APC01-PSA-obe.outbound.protection.outlook.com (mail-psaapc01on2092.outbound.protection.outlook.com [40.107.255.92]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7720010E3; Tue, 11 Jul 2023 23:29:19 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Dn0qNUfXE/SYITNq2utKB7eqGpNpnXwjprNPHX0m9r1814EbCSMuzi4XdSbZqtUfqU5mU6GdghOrBf/FNbjxVLX7/czkVX5SzbAHuCeaw4ACXFufRGBVAa1s7Zg3oaUmSWTXXHgJvyhQrJJRK/VByH4HX99Vw5CuZlZEBbHlHJNHSZTVmkbHr44Fmxe/8P+Qm32YaFPlP3OqY6lFRyibT6FTNtguFklHvyG75qaHISQDuS1+QzrQaSCZq949NW+Jglhns5FWIVgNr5uVTEubf3psAHTcB/GCQkowkKSOHTj2TlMjoajllmVWOmCAW6CBdBOgd2btdctw6SXEgU4+Cw== 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=ZozWrzBbgRSJsVIQmRLHJ99OtcdKbjF1rw6LaMWhE1g=; b=P7tl1m1j1cZkRbYRYJpKB1udMx5TPbHDat78Dn8yasQD1RVr2b6Ap9qx3xfYv7QtYqH6L3G60xWEIl0x22YBa5Ivcq1BfulZJnQws0SZyOPKehD2Mn4IQt9Zxbo4AlISK+9cq6Awhp814YPB7EUKmT3keTERvo7v0zj2Q0xR+zv01ZOhYXN0FTO+c1qYeBIwmGLmzSwVbN6X3ixBrH6LIMXoP/9TqDcMEVv07To+sLWq7Yzo+LLnDJzHVP8FVQjg9n5ZcuYFw4v0nhcDvIqPKEiIxjMM/3jozQ9bzNhu8mMK8lcl62V7UN4paxxQqNMktBd5H8+P47lMLvark5mSdg== 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=ZozWrzBbgRSJsVIQmRLHJ99OtcdKbjF1rw6LaMWhE1g=; b=aASmB2guNguYzAr1G25S6KMvJ0R4LWqHOSaNDppTweUInP+9Qvb9ThkGww2UE/bkosLWE6cHRL+hm2WDBBuesVxIjjoxl8q0fuphgNERf5M1Eedh73GX5JZ0i9a+gkcHxCrlg0Lwmb7gB6F9p1KzOBn9VTzRMQ9ObXgT5Z3YSz3UIs91fLckzVXOkzYY6bYx1EWI4Pe19CPuKDBzwEjJVfjRfHOefDf5pvOqo4xj3wfjlyNqLNzD0C6MxgFvmkOJLZK6eDU8D4PlQEUcXDDlqtMedn/yazuakgpDi0nYMPiqPUFF44oRSD53c5pv7N/WbabIKhbIgeLkDmsEgXHMMw== 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 KL1PR06MB6672.apcprd06.prod.outlook.com (2603:1096:820:101::6) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6588.20; Wed, 12 Jul 2023 06:29:12 +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.028; Wed, 12 Jul 2023 06:29:12 +0000 From: Yangtao Li To: Greg Kroah-Hartman , Jiri Slaby , Alexander Shiyan Cc: Yangtao Li , linux-serial@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH 03/15] serial: clps711x: Use devm_platform_get_and_ioremap_resource() Date: Wed, 12 Jul 2023 14:28:41 +0800 Message-Id: <20230712062853.11007-3-frank.li@vivo.com> X-Mailer: git-send-email 2.39.0 In-Reply-To: <20230712062853.11007-1-frank.li@vivo.com> References: <20230712062853.11007-1-frank.li@vivo.com> X-ClientProxiedBy: SI2PR01CA0024.apcprd01.prod.exchangelabs.com (2603:1096:4:192::20) To SEZPR06MB5269.apcprd06.prod.outlook.com (2603:1096:101:78::6) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: SEZPR06MB5269:EE_|KL1PR06MB6672:EE_ X-MS-Office365-Filtering-Correlation-Id: a6f9464e-ce2a-4912-5c69-08db82a14e79 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: PvyPcWboGi2OO+L0yiSN69RK41BWbey+Z5wYrviL5d88QCvMSeqvBf0Q06aZ5vIHScdDLrp/nzZl5hpXYh5cGwRJXLp8TQZ/U2u2/GTCslvMQPe943A8FSyT1FrGaxXSc5jzEuBdfTCH03ES5Du3cWH87aNNXSKs99sSg/YDme7f0PyZhA/+SHLe8mUQvTHAog4Alqh/unR2f4jti0IQ9oaTXKTl94dfTAcYB00u9Nr9Rtxx3AmHhc1TBZ4PU88tLGPgvgqZZS/HmCtOh4yP7nZHo8Yyli0tvPG+SiB06f7lVNAKnpEZB3+pj5mmJH+UAW6D1hZU3LCRJyz0buILDJYJ4v69QQXLycQ+EIsItdn2JkoBQdh9VSMizGX+8sxfLA3Lvb+g/9y64XSCeVW8TA1uCj9nji/3BlocqQx6+To+21qAIfRku1loZjovwzw0sHkrmdjRCcPzKU9ppu73jzw0tqEq9Le9NfITx0WUGSYDE01Op3bJccVcwHxkzNPWpDO69+iAPZViItfqMA4wpEwgIJTCqKtF7Pn27AVRswI0vMBwN8VAELGHkxD5AIPm0WImGwzPv9LcAP1+NXDJcXHgkCflh15U29YHdHvrZ0h1M53LI1hCMlIqR1pIkmDW 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)(136003)(39860400002)(346002)(376002)(396003)(366004)(451199021)(86362001)(38350700002)(38100700002)(4326008)(316002)(110136005)(478600001)(41300700001)(66556008)(66476007)(66946007)(5660300002)(6506007)(8936002)(8676002)(4744005)(2906002)(6486002)(6512007)(6666004)(52116002)(26005)(186003)(1076003)(83380400001)(36756003)(2616005);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: urd+XoaSM/9lJtZVvlXB89nKsK8eEDrOt6fckXn8Mvi9l1oN+ShEspWRXGr3hL7yHMeKUFpsus/o3QnpMMbWeihBG8ekBRss7G36MAgZKbXDfshJJwOrBaLA1cGAP+NJg9JvMF9aQzGUIGdJbe8ypokhAkLl+FUbJQb1qNgvWkaawMKWVJvIPv7awSXMGv2s85oUud38k6COjJBmifwNnAJsRXVpbtQYOvWHgrdVRrCkSigt0eqZH2EHfO2e0v0AHgYHAz+MW+G5rVziw6UwQoIxl6aarHdyim30OMxJ6JSwugBeYFsKZq+g8zNzEGlPWhNsqw28mvTMWI5U8OEML50rrXpJ7QVUrIYIQ/9bT6gxxcp9/mNHO40kG/dVczq25Wr3d5BKG8BXf+UGxWEt9ETkLigBpV+G/STQprXSjGDqitiM33Toz7Mfn1nUp9qYPOrXcMdTUY7utzbxilYvbSmISW1iLe2HP5fr+AVEXjMMtLuYmySojDiWQ1B3Kx5xoEoHACfFldJzQvGqeU0nVBAcqi/KL5Zr2h36ugbBjUA0Q5EMcHHykeelAbtUuJsDseQO1WFlrzooUDyBoyWh+GbWc+w2R7IVKN5/xkjaHBr2go+gJAhpodv1PFUzPjuEsIA3QATUsFW+iaUyUMz0VVFYMXzu4K4CmA4evpvI9EYfKgCALVhPeNmxCGJVM9+zfjoNzhTunEjVhk/l+lhFS1eYRZYBIn3vwq5LVHto7zMGrLAEoWe5QdVGpHTBnsGTu8ruCqJv2fXtQAP5mHFEJj2VxUCHoInP3rBgzH/aMy8bbE6t4Rxo82lMFxZmDBDVgBLaUdIcb0NNjT3e7751fYTt9jCTJ/RBdNFVhs2U0fDT+dEqH6r68G6yW9AtftcM8mS+ntSukJYmndK8tI0GevEpibW8OPFTOxQjtSVLGTQJ6/2NaLppZBPWa3o1lX1uHxDITWUCo3Q+15Inw3KxDzzAUXGYDbfmm6mk1F2Gs3MWFOYiyI3luWLsXkmXnVnysDCLOt+g2cLZSA+wCdM+PhbUKyNKHJYkXp0dVTP4iz0NRL2dHEGif7ccYDDpToJ9+j+ol68XQwttkmpJ1mVrubmtiSb02AkhhTvHbrOEwH77EuMzBbjCBZrYJ46bC9KLwSoTxvBxtM5c6P5mnw2+HJTWz4+HkTel88xpGo9pKbKlsK282o+gNoaZ/pf5/wDaPziOOtFKcAA5oGEScJelmrSO0y3Esrndlv05auaWpLSygz80MGFK6e7Nopw0sKKVI2FvIPZ7SLfu370fjLBQFySrmP4MRKb/C3PX5SUd+9pjtIazP4Pjh4WM9+IdaOjC3YAXy4r79gDqZo7RAv/77uS+FyThgHmG3mrk4AhZI/Q7z/+UfyOLK+hL2dCj7cAFTtv12S/FQDW/ZomD4xJl1z7NCfCDXJuWOEppxrSABonZ4lhMikt3unTOVA2V5ppdLchXob8CZpLLVvHMZ7CYaNAzktLKRlm9LglgXGeLxwmRpAHJWLWTWHsA/OVgrsficlywjfgWN4mAj+jBvIA8odeqVaEoB/r1PD60Bu0dPMf9pUkaSPJkY0HudgTQNrsp X-OriginatorOrg: vivo.com X-MS-Exchange-CrossTenant-Network-Message-Id: a6f9464e-ce2a-4912-5c69-08db82a14e79 X-MS-Exchange-CrossTenant-AuthSource: SEZPR06MB5269.apcprd06.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 12 Jul 2023 06:29:12.2215 (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: 3svgnqUbTzQTTaMgPelnipOPsuK+iJvOe2sTvviFjrDfWAhdi3nDlGVbxuE+lfOgA1wjnHXxSqW2+ocGBjAKjQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: KL1PR06MB6672 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_BLOCKED, 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 X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1771196141295590411 X-GMAIL-MSGID: 1771196141295590411 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/tty/serial/clps711x.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/tty/serial/clps711x.c b/drivers/tty/serial/clps711x.c index e49bc4019b50..0deb1d7b53e3 100644 --- a/drivers/tty/serial/clps711x.c +++ b/drivers/tty/serial/clps711x.c @@ -450,8 +450,7 @@ static int uart_clps711x_probe(struct platform_device *pdev) if (IS_ERR(uart_clk)) return PTR_ERR(uart_clk); - res = platform_get_resource(pdev, IORESOURCE_MEM, 0); - s->port.membase = devm_ioremap_resource(&pdev->dev, res); + s->port.membase = devm_platform_get_and_ioremap_resource(pdev, 0, &res); if (IS_ERR(s->port.membase)) return PTR_ERR(s->port.membase); From patchwork Wed Jul 12 06:28:42 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: =?utf-8?b?5p2O5oms6Z+s?= X-Patchwork-Id: 118870 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:a6b2:0:b0:3e4:2afc:c1 with SMTP id c18csp950010vqm; Tue, 11 Jul 2023 23:45:48 -0700 (PDT) X-Google-Smtp-Source: APBJJlHrzlTesk1gKJEzj3gULH2Ar8yoxbDmHlzzYh29JKSQyQJM1+720Z99mmWu34+r+LLoJh1q X-Received: by 2002:a05:6a20:54a7:b0:131:a21:9f96 with SMTP id i39-20020a056a2054a700b001310a219f96mr16592469pzk.6.1689144347802; Tue, 11 Jul 2023 23:45:47 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1689144347; cv=pass; d=google.com; s=arc-20160816; b=z9rJAbA/+9UixBCflRDtE3KVBarrPdLFgTqrlqqGlCFGT3dPJIh/873eD6BDuOyg+p /qoQ2a0f7IkGPXUGUryjRqITl8Ai13GHAKPrTth7bopUxLzC5GnxkJw6rxfSlIRkDJx/ UUOoAISN6IGHW81/Ky3tq1W/udkjjXGAfsA5rOhPbhFYNcMa9Xvn3GZw/fSg/S/Kohrm gnxvMqTKVTTOUj6mcoRMwhpgoQkk0dSGCuBPnbHPd/1kXeALDbNzcuxTQvLLm8hu1syW L1ecp3oy7600uOy2Vya6YNvgfbdiP3KNWQcWmACsUAAs0r6+wzjn7KzbnoSup+oOJn1I WDAQ== 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=rd+u1Qrb4fHxvJ174iO7/CkQT4Fk3N3D2gEf2kL+6Hw=; fh=3q3PdFZ4xZD+NRM1r67J8VrVY0AyTe+ioGbzqg79a6w=; b=oSVWQTksrcfRWG2P3lUS17Jt0e6gO7Tp+gGhgNItVZc09HQdppEkAOshoA0U0lMgkZ yzeaOqEtlS9k1uXD8kQU2sInF33QIRre5/ZeZsXeOHc8wDGV+QJtvRY/kYIpQSysltG7 Rebhz6YwWo2j6fZuEejTu7uK1e12QTSMlXr+Y41J0jwZMS8vkLLEkUHCy/Zz1tffd02v TgzRYFcZgOt1ulwA8fnXBr+kKeccsqMy6qxqZ3BLvB9M7W1EeQaGdxWDOyx1Y0uzUoF9 7wEc4CvcbUfMwQJH12z6c/KQCGhSjutGMu0vfdHKXjccQk2mQqdDTaY6aqt1PSoy1NZk fydg== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@vivo.com header.s=selector2 header.b=Amlou53f; 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: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id y13-20020a655a0d000000b0050fa9bc63cbsi2514885pgs.432.2023.07.11.23.45.34; Tue, 11 Jul 2023 23:45: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=Amlou53f; 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 S231575AbjGLG31 (ORCPT + 99 others); Wed, 12 Jul 2023 02:29:27 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59142 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232052AbjGLG3V (ORCPT ); Wed, 12 Jul 2023 02:29:21 -0400 Received: from APC01-PSA-obe.outbound.protection.outlook.com (mail-psaapc01on2092.outbound.protection.outlook.com [40.107.255.92]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B0A1C10E3; Tue, 11 Jul 2023 23:29:20 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=g2YD/DpUbPhJLNKoObUsi7K6B/5j3QK7WQtFgdCtwoAoGbdZ6A3uLhJSgWfzzCC3BXXv+K1PBAi2ceaJY3zusEbKs0flq8aB+2Zyy6s2U4GURFdB8JU/uWkMsD6memsfJjfpcK7fdg9vNs5a3L6rqI5u0sIG7WD+XLu/ZqQZHOAbZ3jBY0BdkBhUiDvYAjWbdLKZv1fLu4PJmobYYSzpu9KD2wl9UWEWr0qiLxVdJ5s80lMK0zFctL7c0x8RUGJT8R1p5djrrrJPc/jncF/V19pWxYr6sMU54mwzve3WbU0dIuEQuRkoJ47grrMfr+G7Yd/FMdOPZ0Lmz9+pPjdFYw== 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=rd+u1Qrb4fHxvJ174iO7/CkQT4Fk3N3D2gEf2kL+6Hw=; b=ZOEVQwGHjgQ3okATU8dtN8cSefnl4LfEzkQYISsgbNSMczpgu2vQST7MBFgcaXyuQiqbzdxBOS2zyQN+WRYLPnZNy5clsQF/cGnb0sZH5y4J/zN1pFhSV59PiW1FcvoJQiCtsARgkQmDP/uk+sDjpDYSmL1y6mf9xadhzEZ+8shUXwk4YQCqXEBRN7t1K7TqLpqXxQZ1UxGGDd1aZOfPpRU1WfKYyJlLPgRQ/cen/tEvRuyqumArQaZa2JXkM+yoKYWFe2Lpa+PLvwV11P1sH0TpW+a8cxs179C6IUrnCviM/PaE1yZe0PnTWlDnBxdHkRya5LLmr/Llt9WrWh+G2g== 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=rd+u1Qrb4fHxvJ174iO7/CkQT4Fk3N3D2gEf2kL+6Hw=; b=Amlou53fel404wg0XDiAoCA2Gse9kyS/OCJ+lBavqDNwvOTcqW477+8ktgE1YiDAADH4LC4UXECDxjSSvOcDICOasAwIlmbsY9VCHLqPuAZyuO9BcsBNyaqDficP4zxULfES2dFiKmryx7FSW0Of8QwsrbEeMmpGYCuly7gRKRaXKZzoUhLrWYwBnHKR2yAVSvhLCjHLBDjhQD3y8u2spVJ59s/bRvePxK2QVduZjRzYvaf5a5DTUfLV71bgKdxSCMVID7HkJ8Ir7YlzHoBedwkR76NSx30dSMyjj3XRzew008GmtI119BUj9s1ex9dlFqUF+nh/tORkKJm+Hj9ZHQ== 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 KL1PR06MB6672.apcprd06.prod.outlook.com (2603:1096:820:101::6) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6588.20; Wed, 12 Jul 2023 06:29:14 +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.028; Wed, 12 Jul 2023 06:29:14 +0000 From: Yangtao Li To: Greg Kroah-Hartman , Jiri Slaby Cc: Yangtao Li , linux-serial@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 04/15] serial: linflexuart: Use devm_platform_get_and_ioremap_resource() Date: Wed, 12 Jul 2023 14:28:42 +0800 Message-Id: <20230712062853.11007-4-frank.li@vivo.com> X-Mailer: git-send-email 2.39.0 In-Reply-To: <20230712062853.11007-1-frank.li@vivo.com> References: <20230712062853.11007-1-frank.li@vivo.com> X-ClientProxiedBy: SI2PR01CA0024.apcprd01.prod.exchangelabs.com (2603:1096:4:192::20) To SEZPR06MB5269.apcprd06.prod.outlook.com (2603:1096:101:78::6) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: SEZPR06MB5269:EE_|KL1PR06MB6672:EE_ X-MS-Office365-Filtering-Correlation-Id: cb1d1eca-66b6-48e2-1b36-08db82a14f89 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: iO+vA1l0Z50lcIAvqXB/eX+9jaTgcLraR2l7c84D9OBqb4XnspCd/fOXAQ7cxadnGb8UsTWt6f9AqiU9Iqe1Ik/8+xRe3R7FvUVw128elrzxZ0I8xlHqv54FK5cAbVwzhiuXdv2wg+PB/KclXE2W5OaTx1u6loHB01ispCUd6vc+GYsbU2NHKq9g4rqS/ptajjrFllU0TbyZ7U534Iyma7enLqXorVEALva6AUd0+IJq+a23JXU1aIfBSQCGl6XJCZvXEal4+8tzAqrAPA1iYZ0F1SfOvqDFPkHZKzHKl7eqlHYhE/O04oiLK7QH2eNOrL35eOpVGFAynsv33HBFhhHEH7/vMDcIASpNGfauVGgZjoWG1yta9+yoJXzXgbma9kSN93nS/yn4yi0mMrpyM2BK7HmS62AYwbZU4E/vmlIboBD3g3/NyWll900zDIg6nCiwxFFkN+q0An4PQ0ImNuEtJ1amhrXv97Z/vEaRuhkNiU0qVlp6bfNjFsLOMB6wGZRQv+t/HFe8tpMo8ol6KIF9/E+EvYVCHByMRKtEYrgPhjLXwqEAlCJ+xCwrjbfMM2d8vx5yr58eb0xhhLw51En9YXFnHULXkwf6JID7oQxux4cjkXWaYDOT9jpzIoKW 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)(136003)(39860400002)(346002)(376002)(396003)(366004)(451199021)(86362001)(38350700002)(38100700002)(4326008)(316002)(110136005)(478600001)(41300700001)(66556008)(66476007)(66946007)(5660300002)(6506007)(8936002)(8676002)(2906002)(6486002)(6512007)(6666004)(52116002)(26005)(186003)(1076003)(83380400001)(36756003)(2616005);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: VxsMs66MFTnsMn2uPonI6ReWH8PfIz62SnePoTpcgBbWJQQ+AwNEXvHcryQEbDMlRFwFMfnUY+btaJY85BNn7SXwmW7MY13Pr96xitD7Z/RyWApA+safzljMz/t171dhcK4jjXj+CZEf1JIPRKYt6a7b6Ah0CpZLgXVQ1qB8ojdDq2sfYFYZUvDyXbGijZ14/75K/GaRtHPHwQFX5I7PGjFBvEbLePLJiUx8bgvmldysnvEcNPO76wYCv/Szk3R09EA0MADxu7cPdz1/F8AP7ZEntdhCf77HBrI3HmCSlnMgouqqtXmkBEuGEkXPf8N1UJh8h9/uz+UrCY+7N7aPei85pSR+5NEnVbWPwY+VrD4xnTqpl3mJMEJjqp+2N4qNJwNh/dWAxwm0mmZvubSpdYPac4CvhHhjk0doap8S33+3tBC6nMjujLWYDOuwLGzXaLirgVb6bnd8Ff6Mt+ruZCxudEQH1Hy1gbCjWK7fUiCN+VipjgVFlx9F/Swt99QGCktV0Q5+7x3nS6rnEaL2JTHLoinr02VMSBcWa4XD8TiCdjEiUMN7XmGJGXKLBm7hQi128XDsTm2nmOv2UyXVNSTn0yPR6RAI6tL2oVShYL/Tn169ucGzbToXafrVCU329SvGepufT1icC9uY7pnAFdHlFEJbhNwYy822exQtl+299QjK5yJzsqEMDQS9e2tt5TYqN0D30koBVdSzAdv70/LsfUTRQ9ZAnVQwZsmmjGzcuxNQnh78fOKJXEho4O07iFQkUEZ0T8/K+rM+Yw2u3ZJV9rGHP82Ge+DeTez0Zf0GO2wkjgMzZL2BD1nhDoYnzmKFtZDJ1xiJDLKZOneZ2JgDJOoKeUMWTnUcXUXm+XJ3g6SuIXLS7pPUojpu3nVxeZnZCOH2lir9dKBzipuaeaKU1Omta2EmBZHdHYdnwxYMj/dDMdEjYs+LBkbqVmAdIJD6vWVRd8hQ1n2oC7GjhE8mlT5jqxu4Vo8zFTPkgdvTX9RoqWvdv8iM9wZnpZ/l13Wj/Yyka69qXZ1jaalgFQHblTxBvOyMonN7VtJvwcDIc8fthtLSwm2BTLzUqn0PFQRWhXKeOQ2XfmwR0iPcZ5xTouPCnp0z7qXDfbiUr/DHMZm8weyGMRF9QZOy3rysZWq3BW65iu90620nQig0LgCmO1N5ibhjzrEzIU+faDFpwr0QxGbYOB/9v1epp/bjjRgBZAEEWx38FOQD1fLLld8coAoW2ozaUIcMTTnN/BMqLSfbqpPom350YbdrLLL8UYKBDFhzytg1nyNjnBYNgrrV9/JbgD4PNK4G4/rWakMKBpWX0GDbKFvsUMV1A8Peanie/ewdpkqOxf7O8pXj76MpbtSPFsgQt/ngmHJj+xShGvmyQL9PMnlrmxX/R7xBfpLYRXZqB6rAX166sMbbf8c1UwIc6ejedKLfWCZjD7KR1o01n6lye/IBBzrf+atbd5cE8cFpBnVUpumdkE8gnyYNg62xSGbYLX/AXRkdTfx8HGbybAqk/ZBNi25dtuPyZhxfosVEyi3r33IOYEXITkMGueG4quosrSryZW82QALPfuRbwjft6t0hPDqAWtyG X-OriginatorOrg: vivo.com X-MS-Exchange-CrossTenant-Network-Message-Id: cb1d1eca-66b6-48e2-1b36-08db82a14f89 X-MS-Exchange-CrossTenant-AuthSource: SEZPR06MB5269.apcprd06.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 12 Jul 2023 06:29:14.1251 (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: +obdWoKwwUlDB7ZIw98Nad6RIpvtFIlXsMfk2zbYex1clyBz775BBf44W4HlJqWyrT9sxxYD3v5iEbJyZnW0KA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: KL1PR06MB6672 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_BLOCKED, 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 X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1771196223576914186 X-GMAIL-MSGID: 1771196223576914186 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/tty/serial/fsl_linflexuart.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/drivers/tty/serial/fsl_linflexuart.c b/drivers/tty/serial/fsl_linflexuart.c index 6fc21b6684e6..d3b38a376e08 100644 --- a/drivers/tty/serial/fsl_linflexuart.c +++ b/drivers/tty/serial/fsl_linflexuart.c @@ -827,14 +827,10 @@ static int linflex_probe(struct platform_device *pdev) sport->line = ret; - res = platform_get_resource(pdev, IORESOURCE_MEM, 0); - if (!res) - return -ENODEV; - - sport->mapbase = res->start; - sport->membase = devm_ioremap_resource(&pdev->dev, res); + sport->membase = devm_platform_get_and_ioremap_resource(pdev, 0, &res); if (IS_ERR(sport->membase)) return PTR_ERR(sport->membase); + sport->mapbase = res->start; sport->dev = &pdev->dev; sport->type = PORT_LINFLEXUART; From patchwork Wed Jul 12 06:28:43 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: =?utf-8?b?5p2O5oms6Z+s?= X-Patchwork-Id: 118850 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:a6b2:0:b0:3e4:2afc:c1 with SMTP id c18csp947891vqm; Tue, 11 Jul 2023 23:39:32 -0700 (PDT) X-Google-Smtp-Source: APBJJlEhmy+UqUrKdqEIMdjI61gMA9P69Svesh36rJwtDSatRkqGnH0HIIygmN7OOjzTziPKi7y8 X-Received: by 2002:a05:6358:4291:b0:134:d1ff:8c97 with SMTP id s17-20020a056358429100b00134d1ff8c97mr12956040rwc.3.1689143971891; Tue, 11 Jul 2023 23:39:31 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1689143971; cv=pass; d=google.com; s=arc-20160816; b=WGQRuTnvyuVVyisxcYl67Ecdq6pBJvMZ2fhoy8+Ap8Ac/lJBHNMO8qHXc3PUqn1hjR 9V/Wd0r+f4GAqi5reVb8GMRThsnk5KFQG/LcCUIfM76oD7bFn+/g7Yd0/Tg1FnlNvgVE QuMYC9jz7NwsyNf8vvCXPqDRRozGMT4j7xji8NoB02AZiFMcm0nlgnCb6apOoI9gPcrb n/1mn8fecLs52lUdadBNJ8vDjCSSf95V0MyZYP33fjat0qB7bydOpXBr4Pvipnu9PIAa PlVmPPFfAAlyPP64Tl84Q+SQAozsLlnwSvM/lJJQYYqVDaUNyj0H80MEb/KE6ZpbMonr NKYg== 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=6PFUlov9zhAF0HfbeF/uNM7Av8vzeBAp49doKrDhJi4=; fh=LmFXDTdrDhziykB1mw+g4Oi+5lQ1h9sn2d0FcHFS+zo=; b=T+6A5SMtWdTiYenP2ZI0Pp691TX6xys9GTcH67Ivb/aYROuPyw+Nob33QbKrXZLCQd Jw9+Xhn6iADDeUtzflqSbcVDNzZphcScHGS9eV5FPz9NVhzz8Gm9d+lwt3oXuTERT76H 1LSPsxezEiQgg15uS+wdvBbwqjofE2nEI8Gp2oSDp3vDQIaNz8aNOGbyzPPq8TEw7vym QPWjRlnXAewZ8uVpKG/mlu4aTlrNrZgcvkRpoXFOMsT5ugB8EqUyToX8ueoJ/a09E7ai wdb7biPbRBDtinJXtNAjlSkH7e+EvOXVR2jqt7SlrBWc/IK8xSWExxiIMa8hSlndupvo X1qw== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@vivo.com header.s=selector2 header.b=AYHXuUya; 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: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id k71-20020a63844a000000b00553b006cd9fsi2690889pgd.728.2023.07.11.23.39.17; Tue, 11 Jul 2023 23:39:31 -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=AYHXuUya; 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 S230180AbjGLG3b (ORCPT + 99 others); Wed, 12 Jul 2023 02:29:31 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59168 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232062AbjGLG3X (ORCPT ); Wed, 12 Jul 2023 02:29:23 -0400 Received: from APC01-PSA-obe.outbound.protection.outlook.com (mail-psaapc01on2092.outbound.protection.outlook.com [40.107.255.92]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id F05431726; Tue, 11 Jul 2023 23:29:21 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Wa12cQVy3qfmyk+MIBzJoPT7b/T1ehW3S53t2UQhaDZkA2gq6/vTUUOnX4J1a8El2fDBRMJWYhRLntu+jLG/ThldTnfhtyslHcHiyo/sCmvHva2VOnupRHaCLpEW1PWWEFKsHHlqJZIPjzel6/pufqxu9yhFtKisa+tUx/JrXsl5q89CKtgrvwXXjsevIgjdX9ouMe+GB134sEQop9wPA/WuzwPI5vfgVd0MTMrW6q3cF8NYsP8o7eg3gJi25a+e10+aZVj+ZfLBP62SrUGUBplYPE+M+ewxaYIHf3ZLXLRr2+GNQG+e/iA9YW+Xc6mlGFG8ir5A00t9/V/WLLPERA== 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=6PFUlov9zhAF0HfbeF/uNM7Av8vzeBAp49doKrDhJi4=; b=T822QeQ0gaSDL0SckjYejv8NvHy/D/Z2X2q0po166krwda5lZhofAceijCjSXm1s4M1Gp+pcv1on2HabZIu5lhp5tPa+j8Rbd10I9dodVM5frNR7NlKKRjJHeXhOZKwXDKPdMzGEXazrndwUAnwQ9L1rmNnHCL5KYljS5gPEwx3N7wdFK+wLnc2FaEM+Obql7VS9jrWO1o5iSVbgmT05j2ysAnajlIxbh4WfVGDKhpMYMLMWxH4BynW+vWd7paFIMEMv9ZleGNz6nALL4WOEWit0kNb+d9kiYW3fIF+orxBNiItN1GkfWl0Bfxp1SUVh2PXPIuIAbrp6pEZO9j/kXQ== 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=6PFUlov9zhAF0HfbeF/uNM7Av8vzeBAp49doKrDhJi4=; b=AYHXuUyaXRaAlZlY/faUz4+Y49WppsTLT7a/0l+QFQk4MYIRRxKy1hL/AHxjxy1aONa0M+nvpuY9ggwmY3cX8T7tvUXtQr6EXC7sduWGwR0BYO1o2lehVxr+oYgABUQy3DyjpW4x2Ds8RKdGRYPL91IVST0MVyajw5FgJ4XA3kv3970qa0QzBWbl+fQSmDOFcdrLYL2hNjwL8MnSWrUjG0u2DmjO0ua+PI8KHOUS4jx/RC5r8rGTia+wwMFMJYZIuycMl68By04mLpIugU0YUEw5tzhpAESymu5Ql3zsC2BLPAWBNhpW2ppqR1eBjQB4Wb0SSyLEYo7STXJryhKXbg== 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 KL1PR06MB6672.apcprd06.prod.outlook.com (2603:1096:820:101::6) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6588.20; Wed, 12 Jul 2023 06:29:17 +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.028; Wed, 12 Jul 2023 06:29:16 +0000 From: Yangtao Li To: Laxman Dewangan , Greg Kroah-Hartman , Jiri Slaby , Thierry Reding , Jonathan Hunter Cc: Yangtao Li , linux-serial@vger.kernel.org, linux-tegra@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 05/15] serial: tegra: Use devm_platform_get_and_ioremap_resource() Date: Wed, 12 Jul 2023 14:28:43 +0800 Message-Id: <20230712062853.11007-5-frank.li@vivo.com> X-Mailer: git-send-email 2.39.0 In-Reply-To: <20230712062853.11007-1-frank.li@vivo.com> References: <20230712062853.11007-1-frank.li@vivo.com> X-ClientProxiedBy: SI2PR01CA0024.apcprd01.prod.exchangelabs.com (2603:1096:4:192::20) To SEZPR06MB5269.apcprd06.prod.outlook.com (2603:1096:101:78::6) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: SEZPR06MB5269:EE_|KL1PR06MB6672:EE_ X-MS-Office365-Filtering-Correlation-Id: 76d294eb-8e0c-48f1-f4f6-08db82a1511b X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: tBkJuTuiXSzj5jmqnvzpH3Sqe++qjdZRLLI4tC5k1F0aDakG5yAagsRKsjsoU1YGH3hC5HA2Kvs8J1L78JO3fQue6eV5ShbNCZQ17WN9hi1BuBMT0Oz3faTkcbhrCdVroRPYNZq3VS+aJzs9jOery21Q6Llt6HJOtWYQ4EoY/sBS8XaVHrUJRe91hgWeZAy/hkTezoQq6pL3kALbM9sNXKGOevkD/aMiuV+YESVQbaXTKmZCQT/AHeZjxOABfdt9r1ZJ8Yc41M8qFHAUbYerxyJss+7zJof0MLQQHcmb/VwzDPepW+KZFUv7lcM70gZQ3EmasiRISu8Dek4EvctgNpJFrm5CmWiTBNBhHY7uim3AV7BdIoiRy935Lu+Vl1I4rB8u5lJMEuIqFtXJf8HksodhPOEE8ZUv2sdA6bhXfYUec+a56iY9oqUKsgHurHccIq/+tejppvoNE2Ai+qnqywax77c+Lp3O/PznY41M+Ht+a113IouGcA9ZO7F6CsgSOlQpuP+Z0zodTPGYiAq6HZkHbrGGITZkKRfFUw93flpH8vtug4xWgxVCkOR2rtnLZBI1ulVT1vOZuiovm9bJNQpqqX9O9+KpVJ3hqHC3ZFxFSCLVynb+CgpQwmeTrQpa 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)(136003)(39860400002)(346002)(376002)(396003)(366004)(451199021)(86362001)(38350700002)(38100700002)(4326008)(316002)(110136005)(478600001)(41300700001)(66556008)(66476007)(66946007)(5660300002)(6506007)(8936002)(8676002)(2906002)(6486002)(6512007)(6666004)(52116002)(26005)(186003)(1076003)(83380400001)(36756003)(2616005);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: Xj1qsItw8I1i88YKPIcyib7NJ+1axSBB/8lPKh4vrWs5h2zR/DLP1jr0uV6CKdw+qDNzx869jkXoIYhUHQKexDnnI/chsM6O+5BuW4YCM6AYfF5Y62Dxeh9CBxjK08tuZ7xmACxUCQXoXBM8u76wwmsd3Mq2YuTgGdgNEnWa6b9+j4IyBOFLGhU6H2uGHh+5G/mZuwcHISzrgNeSTZ131qEW3mJHP/UxvIs2wAoocYPVZOfpUm2NjkziLG7voIfQRila+KN+8RsP/451kJrSn+NqpL6u6pgvsRtBdFyYcuqF1XcccfW2fwv6aDRGi+EhDpo8zAEkkBij4HhuO6haXGtDu2sLPKnjx9373sVftP7VPCVAYKCIYtD1ikXoWbCFuRerXMt4pv9GANc7oCm+xliPaqlZS+URDNTPo8Pns+VCoL6KvXcTBa//xUetjmDYS4S/7b0AiicKNk2WMw2CuwLqKUXMM7Gf+AbWLrQIL4W1PTz1vQCAJ73GWr9bktqUni9jmf56gZ2Js7i+ovQOjnjib5W9duVsCzNCHFQK3cP6C12IHAhuSp2Jwcag6g/MtHMHvfHOkHjgFbt3bzRAUFrLUUB+iwLpWyqlaB+8PeZpG5Ghb8ty7eaqvmQxZYt3lbn8ILjFzz+U2OvvZGpqrXXCE0qrgXAi9G7WIlORX/6A+Tli8bdNMvzhxIxUwWZYMgIWHNYVXNw9kFTpSmzHA3ri0hy5tEZUW9xWqglhRNIoyPipef8KeaQrCg8sONngnUqnXfemkBGQDxfo7DIB0WipJ8kx03IBxWSw8KiaXipV0m1e5/rrt++HW58WHL4gkDbpB9TPM7bvR88h55YTeZtl10MwVhJTV2IctaOg1wj8bOrG3V1QiJQsEkOvTvLUVituMxHKPVVAaXCQzHH+mEhE9zCoVPz/1bSgSoH3oVy3uypUQV+pBqJ9Mq+kLMVOCEmC8ol0NaqNz2lOQVabIqYgeRLwDGTIdK+Hf6z7Qpz2xyoNhy0CvNL5nLY9tkwTQh6sHigFv0gqzdQ246HfR867uvf+usDo6IQOdAyymYfoQkJxRshhCtNpF6EGBeFu5z06kmHJBG02SRe7d9Lq53nUyHBbEqYYCk5/9H3bed7XRXbOpsq7suHX3uny6snWc2J0i/Afg3bmgZowCGMEseK887tfrLFj8sLkGIWibLNwCMtXOII9dA5NoaoHPCCqVr66rTzSu0FIaRB+q12TJJz9B1Wo5xm9seIuq0hcw78c08YG/0PjF5UsN2bFQ91X0xMlEOuS8WF+EFYLujKWyhksZi6nMp6qi9GBAiRrxRR5glN5dJApcnUeipjnSnx0+wqW+E+CxWRgNWQuDDdWWdzcw7UIcPXKuGZATInYAa0sxsEdENhX1iCoVcLbgCNa/JUGkx0nN94EBFqurE5GqGo2GK2gVbP4N+D5uWHAw4MM0RZu8UYuWkfQEiwTLbV67VnOcSR4rIv1a0a002fEOUO/gg+N/qSxix7ngDhkdv6JGyMSmHziUmk4+/0p2vdc4k+xYW1P8qIFeKx1zJ3NUtWAeLbeS0ki1HAgjDc5pvi1lGaC11C3TRDXhlkmxaXJ X-OriginatorOrg: vivo.com X-MS-Exchange-CrossTenant-Network-Message-Id: 76d294eb-8e0c-48f1-f4f6-08db82a1511b X-MS-Exchange-CrossTenant-AuthSource: SEZPR06MB5269.apcprd06.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 12 Jul 2023 06:29:16.7861 (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: zAxnpdcOROZaCWAcT4xH4F99i1qAvdDW+65rlQOkwYUh5RAXjpiNamSbWVdSi+yH7jfX+uFWvO9dSgA2mghJMg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: KL1PR06MB6672 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_BLOCKED, 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 X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1771195829759594199 X-GMAIL-MSGID: 1771195829759594199 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/tty/serial/serial-tegra.c | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/drivers/tty/serial/serial-tegra.c b/drivers/tty/serial/serial-tegra.c index 1cf08b33456c..1edb4c381888 100644 --- a/drivers/tty/serial/serial-tegra.c +++ b/drivers/tty/serial/serial-tegra.c @@ -1579,16 +1579,11 @@ static int tegra_uart_probe(struct platform_device *pdev) tup->cdata = cdata; platform_set_drvdata(pdev, tup); - resource = platform_get_resource(pdev, IORESOURCE_MEM, 0); - if (!resource) { - dev_err(&pdev->dev, "No IO memory resource\n"); - return -ENODEV; - } - u->mapbase = resource->start; - u->membase = devm_ioremap_resource(&pdev->dev, resource); + u->membase = devm_platform_get_and_ioremap_resource(pdev, 0, &resource); if (IS_ERR(u->membase)) return PTR_ERR(u->membase); + u->mapbase = resource->start; tup->uart_clk = devm_clk_get(&pdev->dev, NULL); if (IS_ERR(tup->uart_clk)) { From patchwork Wed Jul 12 06:28:44 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: =?utf-8?b?5p2O5oms6Z+s?= X-Patchwork-Id: 118855 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:a6b2:0:b0:3e4:2afc:c1 with SMTP id c18csp948972vqm; Tue, 11 Jul 2023 23:42:37 -0700 (PDT) X-Google-Smtp-Source: APBJJlGrX7ZUn/Ut/NIXixU/II8DCOZOZlnO9TVNb1oxSd2I/4VdHtvRTyFMQ7/ttm3lcOhPkro3 X-Received: by 2002:a17:90a:4946:b0:262:ea57:43f with SMTP id c64-20020a17090a494600b00262ea57043fmr18211022pjh.37.1689144157067; Tue, 11 Jul 2023 23:42:37 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1689144157; cv=pass; d=google.com; s=arc-20160816; b=086yVF/O0eBOXJOnDrmhaqW/IFH9NNVI/FD6VxOTZeqwNsIZnEMMHzoaDNHB5c8Do8 xl7rG30dYuBJ65+xF6o51XoK3gS5qpJ9adOpZHlWx3+7Vh1hT1uhFeUT108EegvkJQEs UIjsVvDU5/cogrm/7SOvHqW4jEb6KM0mv+BzGl2u+A8LhNZc2lKZBud61wusJ2Orm4Sl SNWf04/WjLy1AqYh2tqcN5Ho+h7IeoHLPL5o9vlAXmu5pkn13M7bE7hLPp0pvSBXG4C/ qW7mb7q1SnY63VT0IBK6CUstn7xFBFTCzxqQLlrHRdFzoyKbjzw0I0HdHH7CPfRWAZzs 0awg== 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=7U9RbbpvPbDlne/ItwXTOSs0VMG50R1PH1ftJ2Kkx7E=; fh=3q3PdFZ4xZD+NRM1r67J8VrVY0AyTe+ioGbzqg79a6w=; b=J4aG/YDtrar+VsiZO21fgaK1BbQZTJqEu1m8pweH7ZHt6l2INAsLBC3xvIryZmcu/3 CRQt82P462IV0u6LjuSLMRVhuYvDQASGcJkA7ex9AfvgquksQHJUbBotAhj9C0H7MSTl LaEpzutTHiwlfOsf4Xt59d7JXXBAhlC+WYLQJusIP8B9CXaiWLPzq4tDzOfmS8dRSRF7 f0dXabIBv3ZaB8+Q3Kr55steoKEWE18B2hkgA49K+Qgg+Orr4XbNH+8avZczxC+g+hSA 0/PNWNvuRWf9igCeGVZC7Jjvafy9VALKpP2d4BvKsUMuV+vn3tL9KwuVJ638LPVu35ZG nhdQ== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@vivo.com header.s=selector2 header.b="Hh/ummKK"; 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: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id i3-20020a17090a7e0300b00263b83d06a5si9804376pjl.41.2023.07.11.23.42.23; Tue, 11 Jul 2023 23:42:37 -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="Hh/ummKK"; 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 S232169AbjGLG36 (ORCPT + 99 others); Wed, 12 Jul 2023 02:29:58 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59164 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232072AbjGLG3g (ORCPT ); Wed, 12 Jul 2023 02:29:36 -0400 Received: from APC01-TYZ-obe.outbound.protection.outlook.com (mail-tyzapc01on2106.outbound.protection.outlook.com [40.107.117.106]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 099CF19B6; Tue, 11 Jul 2023 23:29:25 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=TwwTEQIwDjTE0UThI+J9XqaFXX/Uf7C3OXInMbAMNQDj7JbDSGfIJsJXQr3Esj6IB8smKvcQc8yPe6Qb5ZpPTd9XTiymSPFnHxoN8mQ4Ro1GDBr3vfBwv488/jo5YzbUeYpMZpTIzVy3U7csWzmDI59mYI4DxqFH4H6ebyMh/Je04yGjMCRuvfNff935pDuJtUgDdwrFdEajtDiJqhiaSrOEmeFnFZImnpIB6KXBA6gShe1Dn09Uh1w0Lkfy7LvUUF8zcXAXH9gRK0uIz1A4Nc/rnWEHXEh2lzHU5pBlO62aTe8zIEj3ddW4Bg6CgsKuOAsm7HbygAqf7VwWf3Yi3w== 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=7U9RbbpvPbDlne/ItwXTOSs0VMG50R1PH1ftJ2Kkx7E=; b=eOZ3r9SBDSKbzDq4lcb30a7tAiodz8sgpLZZ+ArYIT5vZxh+e8K0l/CRMN0DhM6iH4SlcPqcskNqddZ0kGNFlZWzmxvY/JIzN0esdtcppYz1gFCiGiZp8YQBo+yJIN26AWkHegOcGmgBJmVQq3pCVk5CS1k2aU1mNZAkGRGhpEoJALkofeD0fN5pLt0A2oCZVyljKjgQ3RvhapIno58AQuPu7pKDJyvaqdFhNUA9CUL63etBbdMzEHtPvqbMfzdTNyo2fLhAHyiBnmF20KBWmV8J/bJ9ca4TbBt2NqEAsIxd7CRl3TleA/xkfkW8Iz31GcmcxK3xn3w6IB76JS1hRw== 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=7U9RbbpvPbDlne/ItwXTOSs0VMG50R1PH1ftJ2Kkx7E=; b=Hh/ummKKENrftyPjdCMRNrez+cmZ1k3eamRw+Ga8wskgk57LSU5X4E8i7M5Yb9FIOXp5viOM8WhptsUIgtU1u59a+8A4uAr+CHE2AI4C/hGL4RUkpKj67HlhfMtDUu/PQJyd867qoSG78t6BTuDgB6oEnEMrusrDLR+LitV7LPUSXqDXOrzvEIZfPqFzYl8J4xclO2+W2lKu7Ou5hoXR9AA6uhUe3TMgyZfa0RkgGw+Duw0IEtz7K2SAUSoBYyyXE7mezWuV8y3U8vJ+RJmwnjdvPZYmniZ1DyLPOk+2/NzIg21wQaEAZ2qpTFM1lmmQ0Ya+xVIKhMA6eTMTuYPKjQ== 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 SI2PR06MB3963.apcprd06.prod.outlook.com (2603:1096:4:f2::10) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6565.32; Wed, 12 Jul 2023 06:29:20 +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.028; Wed, 12 Jul 2023 06:29:18 +0000 From: Yangtao Li To: Greg Kroah-Hartman , Jiri Slaby Cc: Yangtao Li , linux-serial@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 06/15] serial: omap: Use devm_platform_get_and_ioremap_resource() Date: Wed, 12 Jul 2023 14:28:44 +0800 Message-Id: <20230712062853.11007-6-frank.li@vivo.com> X-Mailer: git-send-email 2.39.0 In-Reply-To: <20230712062853.11007-1-frank.li@vivo.com> References: <20230712062853.11007-1-frank.li@vivo.com> X-ClientProxiedBy: SI2PR01CA0024.apcprd01.prod.exchangelabs.com (2603:1096:4:192::20) To SEZPR06MB5269.apcprd06.prod.outlook.com (2603:1096:101:78::6) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: SEZPR06MB5269:EE_|SI2PR06MB3963:EE_ X-MS-Office365-Filtering-Correlation-Id: cb208d51-c514-4cce-6087-08db82a1525b X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: IeIUpMB3fItTt8h6Ui+Xgex7750skcrtVKiGJugHG0UAgldX23ilpfx+okHECdxwTwRNDrpFMWtTF7Syoj/0z2rqizreDyxBrHQebuRPeUHFk1mvvkbniEyR3SmsgEMCx248d37cB2VlvD1ZO7Gt+zNevMmnF8Dp4ZQGPm4VeP7JRpI1EUltA0wVc0g/gEnBtZRnUC9OfC8Dhw9KDHzfUoSyy6s7o/7rv3JyF4qb3qRB+2PShDOoj+2ULWhTr2BnTPPgXUMyOEckGXY8PcCQ/SfUmsB62UarGEQ8Px4hZpdHi5G0ohZvcUUYLiu9gjqPmQ2Clx+8fV3R8+m1x3vnJ1EznAkCC7+SZecqgT2CigjmVp/MTOqXb3URQuVdA1NkuHN4NZwQ9zoZiEehXm5LWsSie6Mq7+CzpXC2M9QXHcQ7Iep6jD1kPC4Hu4B/R+rQgNOudxEqX6iPIKEnPACBfG43X10037xoeKjfXM0tBtUNqokdVKTfVrsyW8bjizypgvRowFxj1HUWC1KZpF1Hj+HZspPfbwfIkxxyF0PfdgvWvxGltyzP4Gy+tA6dw+jaKgm7n3fAS3DM9EFtDaDaXRJl2WlkKHlymQBZba9JYM71EqIX1QbPFDNlW+e1Rua/ 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)(346002)(376002)(136003)(366004)(396003)(451199021)(41300700001)(316002)(8676002)(8936002)(6512007)(478600001)(110136005)(52116002)(66476007)(66556008)(6486002)(4326008)(66946007)(83380400001)(1076003)(6506007)(6666004)(38100700002)(38350700002)(86362001)(36756003)(2906002)(26005)(5660300002)(2616005)(186003)(4744005);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: iKfrOFYy35G9tWPB83a9FidjB5XvLe/nq6xsZDGyqAwwyQbI/1U1Fo6d55umO/duM5yOB84Waqv9UNnNzSdpYzgldFyEB2G61+Gg5qHZ1wncI09+b0wMBAC7xjoJDrzTCUl0S3yd84tQunatT6T3Gv2MzAnu9dT80qDrQuqAxnNbLzMmIR13mQyyQcyP7iWV3dLHXGDuy68uxixoT/lIScTWJtbSbR8DLKXqlYPffkJMs13Q8OT7TWqdzUdlnKGJA03BuZJ5vEzlj8E5uogZdqMXvAPUmsy6wTQLgeFWXnHJFqjCy1z54ApDp6Oooifd8gZt3Zvr1KThNgs1+QQXm4AY1o2Y33KfT4K6KUShaJtOVm3RZkrf3vKDD5KtV0hd3ER8EXkt2w8yl++Yyo1iJcRtiorM6bUmJNLGZ8STA6coc4VHMLu+HPR1VoJo9PKj7jEuJDm+DWxQc+NmS4dTodNjyExx6QKaCDofyofKon33d0LLT06Oihlo1Ga7tXDdTp79KgdyvaEBE6DTWM9UZSldXm36YeNKknimgBzZb+LSCsW4bk4Mfb4u/zULF1wKAjSpM0gmH7lO4eGX+X4G1xvEEyQKP4Zg5dolR5gXe5ziAsCtspMWS2M0itAxRK0H+nSpxsI/sqxuoLrLTU/PiUXLJhQCqVBXWkIxnwbaGpxKftiBeMcLy8OSkB3x5N1G5gdaiZjLGnlu2Y+/cS0LsMHdQg0osY+j4KxagwEsnxb1Fjri5qdBJ4jqPdICnUkVJmqQFQbdEQKBbZcmr3L48ikjYrI1rQJHNwnXOi7dtlQCRZqqhsi3KA4FfCOWB+GwoCYhZO38Z9W73CxrwY58PFsQVlJRFSLQlWlUxS5X+ycB4AueACGTvZ6u0VbWtltQjRVmV/eMV6dYRxAAL/wEhjja4NtLjdHVGbYZUq4541Wz0/cCTXv1Hdd53LwacUp70huuLMvItR8lzAHxi0VUrjJacPCKcBvtdNHf5XvHu07KiIa1juikiTBgjbVbmNdjYXEsCcY8Vn+F9J2KEHPv9EpS2Kjrb8kLihura08OjJ7Qo8GswpeeoG7uXuZ2KjPtLjv2l3rSqDMLTM3GM5lOjYjZ0I5DJrfByggsQSuSQTi1H75MlQ3CPTVQk93VswA40CuKFSSAwoxFK8H3g+GAhZ2jY4I7c3NYxG4sl/zXKgLae//Ew9+xhD7RZ9QCasDRYDKMGUivC1s+zi1hL6TlplMgVUJX5HGMIXDWV6e2uI1l7Bl3BYFZHckZfOAkRgbFJTTFOBR3S/sYeY+W8+hb8EbT6TIDAjW9907vw2N22qhOjvt1g/+9OF20zFwN3HlczLb6dKN692E856k7DDESxU4ywzUEQQQS9YT8ZwiOKIVK5DXOl+ydqCTmO253FYXFrInNGvI+AoGN31qIGQfMHtRA8CDsE+L/RReE2HzB35wCiNvJf5luTbr41BfM/IsjwiicPSL5a1j7w+ZgE83URICTB+Y0/9wZNkh6HQBLrc0Wznb9NNFbHMBxnK9JBgHsw3dKeKfRWflcKrAffSo32armxdpwYuK9BxXIw1OZSqEDHMt7B4I7jkv2fYOLPINO X-OriginatorOrg: vivo.com X-MS-Exchange-CrossTenant-Network-Message-Id: cb208d51-c514-4cce-6087-08db82a1525b X-MS-Exchange-CrossTenant-AuthSource: SEZPR06MB5269.apcprd06.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 12 Jul 2023 06:29:18.8292 (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: 8zfaidbTAH3xEh6yecW+CjXwzq6WfCTPG2w2j+74bx1m/1cebqlcIPqZbxU01l7okYr2CsAzrT3GdhwWG0T0qA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: SI2PR06MB3963 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_BLOCKED, 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 X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1771196023558929080 X-GMAIL-MSGID: 1771196023558929080 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/tty/serial/omap-serial.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/tty/serial/omap-serial.c b/drivers/tty/serial/omap-serial.c index 82d35dbbfa6c..180428f45ce3 100644 --- a/drivers/tty/serial/omap-serial.c +++ b/drivers/tty/serial/omap-serial.c @@ -1573,8 +1573,7 @@ static int serial_omap_probe(struct platform_device *pdev) if (!up) return -ENOMEM; - mem = platform_get_resource(pdev, IORESOURCE_MEM, 0); - base = devm_ioremap_resource(&pdev->dev, mem); + base = devm_platform_get_and_ioremap_resource(pdev, 0, &mem); if (IS_ERR(base)) return PTR_ERR(base); From patchwork Wed Jul 12 06:28:45 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: =?utf-8?b?5p2O5oms6Z+s?= X-Patchwork-Id: 118869 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:a6b2:0:b0:3e4:2afc:c1 with SMTP id c18csp949823vqm; Tue, 11 Jul 2023 23:45:18 -0700 (PDT) X-Google-Smtp-Source: APBJJlFPb7HhK04A+UJR9t7KZOUVWUNnJSDbkzMs+nFkcmnE3hLp+eptM8C8eKru9FVJkC+TyFOR X-Received: by 2002:a37:f708:0:b0:767:1613:cd2a with SMTP id q8-20020a37f708000000b007671613cd2amr14239200qkj.15.1689144317876; Tue, 11 Jul 2023 23:45:17 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1689144317; cv=pass; d=google.com; s=arc-20160816; b=foI9EBstfuPsn0SBR+0/VkyU5J/C3Jw93d6x2DF3P1HK9//p/vTAcDuP3afQ7TPfPe 85Z4wpG1l2Y22tbmYhKj4l80QyZdSSPI/T23kuSWN16lxed6HorNPpvdXROhdCayuAce UZ4lFifCGWORtH7v301/KAoSMK9ByY3vW0inHnpAm4dtYLd6dJKs/vN4QJmFydYvn6kg TEWMeQb7OSbAMReaOC5+yPaw0zBJGlj0x03WTves65L2fyc3b4BbQrNhXA29w/qGLjCL QD4FisYk5hKAKqc6PSvI3uacImh86dinNubu/IQoF8HxDHJcPEWzwiYZjWUW/aM5eYOz Mokw== 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=+UEnLokqPBvGBUxqF5Fnwd+zw0pYZN+9LXv8Zshqa50=; fh=3q3PdFZ4xZD+NRM1r67J8VrVY0AyTe+ioGbzqg79a6w=; b=cxfF0ZcHQw4I7SCBlxNZY7bVBWZauK2ef+EMtIaeUmabHrvgwZmDkusN7YGNZq7XQj tKJ5eiBCw1rMBbNBhcJah/M6tyarKZ+T+KeaZQLoyIAi+0UqT4qOGJUKBlZYzgWFZ+6I zDgpOYUsOaQY0uXcLPYy3+f0kc2RLiOb8YoAhAvNWUO6GwIO4PHFV4e5EodDQsWOJ6LN 9oQCajDnfu3qfQHCuCAT2zphmlAxdif6UphiBlka3BU1LWE3LLYgeqm5UW5ZdLcOv3Aq YiDnOlHTHV2QDSFIcKmNUEj6pR/i8wg8Sz1pWF7KT/VF4t757Pk6RK3pN6GaT0S+ibCt GZIg== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@vivo.com header.s=selector2 header.b=Fc7QhUw7; 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: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id i73-20020a639d4c000000b0055387ef9633si2618552pgd.804.2023.07.11.23.45.05; Tue, 11 Jul 2023 23:45:17 -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=Fc7QhUw7; 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 S231906AbjGLGa0 (ORCPT + 99 others); Wed, 12 Jul 2023 02:30:26 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59220 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232173AbjGLGaA (ORCPT ); Wed, 12 Jul 2023 02:30:00 -0400 Received: from APC01-TYZ-obe.outbound.protection.outlook.com (mail-tyzapc01on2106.outbound.protection.outlook.com [40.107.117.106]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6C3F31BE5; Tue, 11 Jul 2023 23:29:31 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=KbZZ9B1S4ANNjjFubtxyakVhFNA1VH5CvTW8Irw/C5dEtBME1KXvGs8K/M2VkUBTc8kfM5rdYmzt06T9dKg5DhXkjSr1PemJACxlcx1PHUIZqkjeXyGtMmoFe56jR3c9cdhQBVhDH2XUItdzyr85LIm1ixp3PnmXNtYYC4srIj4W8tHA2xHtCqo/nS+uHPsXE9QHxikmlxohgPtMhDqZ7lHVEOKjRo9mgSZDrKjh/5mE5rdIAtxE6//b6pTit15RepVotZg2LQgnqPHiETaMs7d0k6T5Uq3xdoB+GW87F9Ua4ErsbS0JA3s4Zl+d6vbZ/a0zzQKFmxS6SceNSNYDBg== 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=+UEnLokqPBvGBUxqF5Fnwd+zw0pYZN+9LXv8Zshqa50=; b=Pxz3iCosonmsEK0s5dSB/0UVtBFabBb8hJE7ckf+ZnJd094lT3Q/gWydKxy1UFFjSbkkzxhLK2XXGYj48OEziG9llltxT40Tcbi6PkCeAT8TIDRD6B++GirYAqW1k2qFlr0FNlmfJzh9h0ODo+RByTRR34OhqrE8b8Ctsao929UEJM8JC3VuyNyDG/Tey5TKxjDgsEZAq6GxDjRW+w4GffXZVTxxoUiraxjzFePtAE6xTZwVBmBiYjwru+2EYRhK65+s2hM+mGgae0hCc7MCnpHF2hyIEn4BdYCvKmu+UYyJFMwBT2RfjaqqEQHG3YDOJQr4Pcdkz7cWnCR8awAPcw== 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=+UEnLokqPBvGBUxqF5Fnwd+zw0pYZN+9LXv8Zshqa50=; b=Fc7QhUw78E5iOhHnW9W5Hfw+Xz6O1afakt8YRagq1v1orYoNFLdxON6H3ZckcDhXlvwdhUXVFtCTS3Up+ej8GKv/9sltuDY27klOE7O7o+JA+0OesOAtSf4EDrWKt8afjhvAyiUMWq990XH92emX5Jq6CPF3ZASKj0Dw2H/wIbutDz709k085NCo6zKb8ZjMyiHM3gjGMNrmWSfNBs3ZX6tPQnUzPb+J3owrM7QoYTyUrSsndSKIcZKEo60T8RJRT+TY0oU4iViL+FlRycL9FRBjJ+gSrPOGtgx6NOttpV2qoQ2NtweIvSQNKnGDBjg2pE+tz47EUzq4Apufn7JgtQ== 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 SI2PR06MB3963.apcprd06.prod.outlook.com (2603:1096:4:f2::10) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6565.32; Wed, 12 Jul 2023 06:29:21 +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.028; Wed, 12 Jul 2023 06:29:21 +0000 From: Yangtao Li To: Greg Kroah-Hartman , Jiri Slaby Cc: Yangtao Li , linux-serial@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 07/15] serial: fsl_lpuart: Use devm_platform_get_and_ioremap_resource() Date: Wed, 12 Jul 2023 14:28:45 +0800 Message-Id: <20230712062853.11007-7-frank.li@vivo.com> X-Mailer: git-send-email 2.39.0 In-Reply-To: <20230712062853.11007-1-frank.li@vivo.com> References: <20230712062853.11007-1-frank.li@vivo.com> X-ClientProxiedBy: SI2PR01CA0024.apcprd01.prod.exchangelabs.com (2603:1096:4:192::20) To SEZPR06MB5269.apcprd06.prod.outlook.com (2603:1096:101:78::6) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: SEZPR06MB5269:EE_|SI2PR06MB3963:EE_ X-MS-Office365-Filtering-Correlation-Id: deb0dbfd-802e-4d3c-f2a5-08db82a153a1 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: wZX5EZYrjFEL3JBuU/MvWuIA0lOnSH+RBqZ04+kXPE26X+3TcfQfyXFSMqO6pJxmQKETx8mZE1ArFGo0cXiNvcK3RiDOf7NfZSHXbQGOqjeZScHl3w6EFPepqpX0wo84ZSCWv0d6FoDnn9BWnzcIW63NsuCb6FQW61yNS437nFCxZmNeuP1rHIDAkSFRQVTR//CSUAGWrkCoxJewpwGonKnFgglkapEjovS77r7SyireUKT/cR2iqfp73NDGpMdljwLtrvIYNGTxe6z6YmqoxHXmDQzF00zGZHP3537WYQk1jv7Vx4AFajndNukZuL3O3cxkWGCpIuCq3nFKCxRr72xXnrsp6rmmtABo7dI9mJHAAwN3HyOlMN9hVj+dJLDtPcjrqSfSP4i4e9ZxxXnsuMPmPNzt6bg+l9S69nP6/Ge/YLYmh2ATWZU5RRq4MpkT+JNbGnF9ijJOYRY7pxpmN5Ad+B5mjvx0PBlQ+JyUVxq2xBtPpFnntWkXenT/bLKUOu4D6Cc052UhohUaEODcfihktiCCJ51yMMqML5BA8vwi8/zsU/SfKZ5RvcteHQyUjVp9WO15gkFZVffUmyb95GBygVMH1PUJ6B65z1QX7FyotmB1C7JG543cHuxl+2aX 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)(346002)(376002)(136003)(366004)(396003)(451199021)(41300700001)(316002)(8676002)(8936002)(6512007)(478600001)(110136005)(52116002)(66476007)(66556008)(6486002)(4326008)(66946007)(83380400001)(1076003)(6506007)(6666004)(38100700002)(38350700002)(86362001)(36756003)(2906002)(26005)(5660300002)(2616005)(186003)(4744005);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: a9RZnztODP63d+JtNcStRHioQXs+iZxJSThMmFwBf9Xi4s0otIelY4nzOmEKzw0ay74I1yt8vo5YXj6yrZF6IvXlrPC0fSRGpbvaJdd3AfmVnbWEkt5opA/EfQWM20StUhpbozgPpctCCXmdF1bBDaOzWwB8po1hNPz4gKY/AuMsK+jVjVnaAU9jdhDMD1BgnAck85NsjRw7md3xXgjJzcXAZh0db7bi+rKTZh8NJ3cME47onXAEdehOk+E3XITIAQYoolyoqv/3zSWBaucIQarRK/tHp6HIR2i2o6hZHzn4oQbFtWty0eaIje+SB0ubXTTf1d006Y7pskki6h1kVfv3Gq4UeQkQrcivE4mD9uqC4CrQPzQHNqtqOMPUw7E7cvRNLIJL2T4gFPIqP8jIrJKu/JNyDK83dD3xAwmzcwEAi+4lWmsDzmAooxsCkfOs5PvlmHSi/s1NrPQJSyJyiqAjJP5ARF9wPAm8rHYkCqCW8wKQWfm8JidC2DF52nBBHk66uMv5HD51wyw508OKSTSDh+GEjT4FS1d5FGvLFQwLmvGYpvlSJWUcBNmDVMzd/6ubgwxO3FTVZGEtLhRoVboTGkWzOVhSviPwyle7Pm1ag5i+VmpIcWakMYqwgifz5ei2W8tsuu98igFQFAo6fuF8m+MnKeerPLU+ZbJoFQ98iblURudeEhzLtEYxkG5cUSb6XozHCLGRHX827T46Zw4bdsWJWf36PDFqvA+Y8zMi7Hbj82PP9+VQZGTpDGTIPtNr/jSZ6aJRDCdyxUkrVVayPmYobKUoWvlccl2moeJcHwsFa1OCDEhez8MscYkLN1+faWf+jUJ8GmgB2TeHFK8gUVQ/rBEjuoO7GuQ244k7L1U58TGhrKvN3rn8uP7jv8g+jLPJmDiXFL5VbxovY1dPXGXkqvxe4bzQvpEMBnystggs9KjyB66AafXWyDN3p3YtIzSn5oRSw+Iltptm9irMy6QIfcP90gbJuL//R2PikSwmLnXyBdb2rhIwwG9AlvxRpe0X4j0iLSDwL4m4+veuQKHWGISWkiT10lvADb8ENe+5lxPjNAPWZtn7G8tkNYfJ/HqgsjjMaRBbCJvhdSLZFiqOUwwn42Ko5ot59XgyZ0C5dZytgsazH6ZlFWkhCf9GC+JUUZzeWrTPUhmAYFjHxXZSqeTScoa341ZyIycfeZ0rSLhWqfOiICYDZiwkruixz1QLEGI7Ipe5T+GRo42EZGIqcpqxs4yu7duydoOB4ctGOVnDuxyg9oqfUxFH2cfSo1gV48x3hTS1r/nTb17p3j2YMw5yju5KazBxT7O5AB+hCCPxGUs+GYgXZcbg2TqN6XxzrIvZdwJPDFoR0CpGo9DLdwrR/7HSGXGoI09f2JBj3WEN/SyT778vtqv++FgkoiMqSkwLfGy0lUPPqtEAh2DKcHKvKU8n/EetNaVVH4waalomD4tDrkGYxMzjEUjN0INuuhrOAAkZukcM5e/iqsqusngGHA4mfbgytTyXZbU2iptYyIIRLpHmpJem975ySqLS7ce0SbWofjDJQ2wh9XbBvKq2HTVjJjUgz/qChlJNiDWEbAEnfbDzEQk0 X-OriginatorOrg: vivo.com X-MS-Exchange-CrossTenant-Network-Message-Id: deb0dbfd-802e-4d3c-f2a5-08db82a153a1 X-MS-Exchange-CrossTenant-AuthSource: SEZPR06MB5269.apcprd06.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 12 Jul 2023 06:29:21.0249 (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: a9mT+duMKKuiUXJaNLNs1qBxgNQG9832e+ZG/2Zc10RXgL8gXdwwBBkGeIPQaG12Dpb0H5oxng8adN4zc70JVw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: SI2PR06MB3963 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_BLOCKED, 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 X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1771196192317268619 X-GMAIL-MSGID: 1771196192317268619 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/tty/serial/fsl_lpuart.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/tty/serial/fsl_lpuart.c b/drivers/tty/serial/fsl_lpuart.c index 4d80fae20177..b04951523c5f 100644 --- a/drivers/tty/serial/fsl_lpuart.c +++ b/drivers/tty/serial/fsl_lpuart.c @@ -2811,8 +2811,7 @@ static int lpuart_probe(struct platform_device *pdev) if (!sport) return -ENOMEM; - res = platform_get_resource(pdev, IORESOURCE_MEM, 0); - sport->port.membase = devm_ioremap_resource(&pdev->dev, res); + sport->port.membase = devm_platform_get_and_ioremap_resource(pdev, 0, &res); if (IS_ERR(sport->port.membase)) return PTR_ERR(sport->port.membase); From patchwork Wed Jul 12 06:28:46 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: =?utf-8?b?5p2O5oms6Z+s?= X-Patchwork-Id: 118866 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:a6b2:0:b0:3e4:2afc:c1 with SMTP id c18csp949675vqm; Tue, 11 Jul 2023 23:44:51 -0700 (PDT) X-Google-Smtp-Source: APBJJlGO6bUJ02nhg2N74NUpvaiO132DgoeScJSwrqro4K/SVsqyEhXNBCYKGvJ/hol1H7hn9urC X-Received: by 2002:a05:6402:b33:b0:51d:d3d4:d02d with SMTP id bo19-20020a0564020b3300b0051dd3d4d02dmr1333442edb.5.1689144291618; Tue, 11 Jul 2023 23:44:51 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1689144291; cv=pass; d=google.com; s=arc-20160816; b=FmSzCq3/d1aODaWKbm7FProvssLGrDuo+6laGdsSCn+tUg0KuWOYnS1fuU3rW2Oq79 5hRqLSczU1MgktkwueKbJUn+TbUvgWhq7DYwGgbz3zA/ZTPlacgAK/xoPLluQjyxfsTA YD0LHTMsbFI/ITRjQJ30W4C/1jfzUBCoI4D5nWddKdtcAT7/SGzWN4zr4eFFE8cx59z5 zCRw5tBZodRFBVc8IhuSl9TBrNZ5rE+F0XbXbYU5QN3OWpW3QVYKSdmBFUpep0VVu/sZ iSVi3HPDwPWEURCpbEST/R9A7ys0VC0lJ3yFahqwqzWkF5nhJr8pc6okBGB4Ac2PO8Aa A40g== 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=NJG7lBhE2HPrLIVL7EjyhsgmdRsNn7Xe1vYizuUZA5o=; fh=pcIgED+hN7JBqYT9WW11ROQhbEaHnOFsITnkoRUo7ig=; b=HQAwBfesW3K6/cq/ypwW4Y5x5XS1GNCcAvLnoSjHo6yuqFunLs194QlhnPE6U5xMmS dLIxv8SNiLKsf6JafUt2IUZ8TgJsxue6vdlcNgxYs9n2sTQOTH+Ugy2AoZrT6BZn9shP vssh2dNgOhpMd+U17yc4UQdOvwWAOVfLDq+ITMyAzZrXQqGxsDWHY4IruTaJvpD/XxQD D6rANc7Q4CXvHxnWKCPSvy/ioG6y9in/KF3QYXMGEGG41oUcE9oxVno+hRI6q5YrwnlO xkLKg+/FKgPrHYrbB3+4vB/zU5EUDQ9mejMoAHKL6ahhF1i4pBXxSlg1733VrsvUqPJB 1u/Q== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@vivo.com header.s=selector2 header.b=b1dTDlwv; 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: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id s24-20020aa7d798000000b0051e19bf66a6si3867794edq.62.2023.07.11.23.44.28; Tue, 11 Jul 2023 23:44:51 -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=b1dTDlwv; 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 S232252AbjGLGav (ORCPT + 99 others); Wed, 12 Jul 2023 02:30:51 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60090 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232260AbjGLGaV (ORCPT ); Wed, 12 Jul 2023 02:30:21 -0400 Received: from APC01-TYZ-obe.outbound.protection.outlook.com (mail-tyzapc01on2131.outbound.protection.outlook.com [40.107.117.131]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8B8F72113; Tue, 11 Jul 2023 23:29:37 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=hnpNmCGBDuXRdoxdxPJfbTZhcGR5s8U0xLnwPl9wzOWAD33ut83hGZMlFpILfo/kJbm0euly2m01ZkSjb1Yh+yg/jjZemDoFlJ2BdL3fw5NRg8jZgg9mJkl3o4KKYd9anu87QqEzSmkswR0+N9xAnKSkvhWaTcBOflTMwGwhKgJB84ZLcZotERG02rJl8T/PJi7KdIFU13ujrncFC0JYSdQR9nBJLKGqEkxuMrnLG28jlflHkQB0lBToXhC5Na3/L6Mw52oP0buE49gEIPpwtt1IhUMkTi13GEGD439JCoywYWBX5VQR1dcoqh8LGXvNKcQ8Ft4tX8KLEHpePm9NbA== 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=NJG7lBhE2HPrLIVL7EjyhsgmdRsNn7Xe1vYizuUZA5o=; b=ffzM9FeAH7mxzpc+6ey9njibUOVyYhiZeGseC6A18NyffrlelnXFSAM4m3NKBD9fmBVC/tFRpi7a5n3f7NmHilhaentVhNH5bK44OckgVHF/eV9BsuGeKbDvQDZ3kQeju8WNcfDle9GJYbWDWWL738ATnGi6a+8YC7J8radQVuOhdqLbR/fqFG7QNDD+8yGoO/4K8AhbhpHN+3TWYxK8Oug37tzcNO95Rid4wF6g0+CxrBX91TQrYMOCnTFH2dy9ApDG5nSjU6hFQtywEafoVah00iOSk/AHbVYsBkEG5dYznbBwJp9Q4QvdqHzHgxs7klyWuWwPUMGpvaYuImmjtg== 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=NJG7lBhE2HPrLIVL7EjyhsgmdRsNn7Xe1vYizuUZA5o=; b=b1dTDlwva5odJy9JfNaYO2iO0Az9lRNexqrAPXqNEKhxUUeobNVsiJT+IjA+xo9QszzK61y9QrcBjzyCgGVjZiaOlwx+ZwFiWtsZebFKjx0/V/RjdRQdS4I5VnNBqYv5OZ3rv44P8R9IUobw2HZ8ddFSQZ+NgAur/ahQd4M6kK/PwwQoldzLtoUXr6JAqKKZbHanKWNkfikMYCSDDPUlblK2znGyWT6zDYSmXkgaDV+rK12vOzF1PU129xPuWNPYDQ/57KRB6vMSrdh/h+0RR2o6Laxqi+GyMBLHDH5h1lZI6QSZO8ybwKYYkjvFCDjLpALenaJCssxY50TN0YZwMg== 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 SI2PR06MB3963.apcprd06.prod.outlook.com (2603:1096:4:f2::10) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6565.32; Wed, 12 Jul 2023 06:29:23 +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.028; Wed, 12 Jul 2023 06:29:23 +0000 From: Yangtao Li To: Greg Kroah-Hartman , Jiri Slaby Cc: Yangtao Li , linux-arm-kernel@lists.infradead.org, linux-serial@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 08/15] serial: vt8500: Use devm_platform_get_and_ioremap_resource() Date: Wed, 12 Jul 2023 14:28:46 +0800 Message-Id: <20230712062853.11007-8-frank.li@vivo.com> X-Mailer: git-send-email 2.39.0 In-Reply-To: <20230712062853.11007-1-frank.li@vivo.com> References: <20230712062853.11007-1-frank.li@vivo.com> X-ClientProxiedBy: SI2PR01CA0024.apcprd01.prod.exchangelabs.com (2603:1096:4:192::20) To SEZPR06MB5269.apcprd06.prod.outlook.com (2603:1096:101:78::6) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: SEZPR06MB5269:EE_|SI2PR06MB3963:EE_ X-MS-Office365-Filtering-Correlation-Id: ee884843-5262-4538-7320-08db82a154d5 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: gzcAU1nzl9eQwBRa6F1fMoGts/oEx2DpZXW2MhiEMLr4rkhDYsNk/aPNykoAi1v5hOYnZaMrV5NNpR8vsdosDcFx9FV6XPQoOf91QtakyOX5jhbGqXVzCKfZWr5+TEPgb0HGAX4tEzmfrSmJ7d0gJHzhahLNkrPlFBZybCa6J2QE2MW076AAGjUs6xbT8tCgP02vw7IBFeFjBZ1aqihdxfVJ0dD1YCay5uWLv0G1Tvy0XltmJUa1eMa3OqR8xyr21SSwyEsmsx9/N9yqawhZrEzYrF/SOR6bfWbFfdfvhHqAyVu/uMNU4EViMRs3tufSJ2ZzV92aC4NAQRU1ttXctH/nO7aQD1RES+qtwE20AvYQOhFvvSo4Y6dnDTX/XVZ8DwjQQubJ8s+Wn3V25UMqKgRQBeLKcJJhbmzE00MICm99it9k7DYB9vhVfhXxkV5yOvLdSvOgepsquLMTbbno7oltp48fjC1F5Ri5ufTHPZK9ecI1ndFPPwsdnOUU+nB5vGX+vgo5dJCQb37nWT0IPX95O2KqH3E+DdudOPbGkTaxtJUpBZoDfUDZauDmUq9TZXAeT1tMowScGCUMoAHUdxStFOeKput0llAwE+GiTFmqsc3hinWW+INQ/5gSEQpW 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)(346002)(376002)(136003)(366004)(396003)(451199021)(41300700001)(316002)(8676002)(8936002)(6512007)(478600001)(110136005)(52116002)(66476007)(66556008)(6486002)(4326008)(66946007)(83380400001)(1076003)(6506007)(6666004)(38100700002)(38350700002)(86362001)(36756003)(2906002)(26005)(5660300002)(2616005)(186003);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: TtW7kSZYd9kxJKoHyOwMAKS5Qxao2OVXMXMlLXvAW9wis0+DkrZ2uxThvY34cgISoHN9HQvfOeHYbH6rYh472MvRnfhqZtYQuc7LpiTgN1B6SarktnuvfQOuzTYde/3PaWmoloPc2Y4uGpjufPMthodUEoiTO31MTlXMizTcPIefsXCbGfXdpT7wrmtAZsEMZ8ywkx5I3KDL74iN25wDoPigLyNzGNZOWpDjLnIfCQ01+S8QFHKvqnzr7d2fT+Gx/YnSZVZdSBrKC+f4bVGhZct314bqnqrgnN3bxechKr2fRkafwBPjaQvnBfKm2Z8FaSwHZR9QO3kTVgbmeQEsiyh+Q770CzLIJ+nMc7o5Fq2LX9WHVKk/AL/8Ewjk+f0NuiGfkp0dig7xbZMTfUEj/k/eY91l/zVJZlCr0LISfsYTZcWwQEvwLuWqo+llC1+V+RgZiv93erQXW3aj4QNkc0NsXwLS5fA6cH+im6RMtjBzIxdZXXdphwIQoXLMF9CsM73PBY9ZhUizwL+wbTbgRJTD5osZ29yhqO6Glssif6+yvH1SZtQmG6wkHSHf+4NF15MtZRbIcDJ9CVjkxF+1JKz+LORyQ8AeyRJIA2wENfKQZDu632WgKvl8usBXNlJZvFA2E5HklTDmEa/DfoXJvF1E2wIFgFwv1LzMA/KJupvpdivlVLM/ao6LTzvXK7XVHMb8ATeA11UDdEdwXrbPAs6yk1BJnNL7nn+OfZ8QdjyiJ59O46Hen4AL5rt3rAUiIQ8yJQN7Cwer11tPOVxVeoE8ryMQtKOSZAnFk3z9sP2hVbE4JMk1QKRcVXejoIF8FSaWk6YlNRXMgoQrL+YquloBL9pMgfWWD5XPFCrw+dk0fhOX/syfGvWDWwx4RJH5ar6S6+h3/wKw2wOeLQdCtmRzjRqvdEFdJzrTWgtXBmfbJLoiW65tM/ThV3607wgN03ahXODeG/s6rn17ecatR7A7r6HH8dPqAg0r8dlxCy31VzcrR/s95B6pP2CNFKh+bsLkVDTyE9RA5TngBiq5cvJ3Aq2H+VDDFchWV7fVMUxXNPzIcMnwB1agEdb3v+yskGrxyDFrO8/ju/mNiObRFXLRx9SVGCbOsU6Y3saGoq2jYr9ZVyRTHZZPxQuxPNwcwvNZDETDO/Bhz/NRxlgvGKBQgFwx3KDmx2aItyrICN+3XuO0VWy5aeUeT5i+dAOvtn/z5v3ZIufrMSbAEp3CuuepPDaCwwXnZHFozRx4egUzKHIVtMIa6ORJqSD3pCy6aJrCoi+DyuPPx2sg5+tU7bExIezZZKIowqFZaEfeXW75xR09X5xufm8HYvJ4Z90s4oP9ebouHkA9CbJIybzjfV03JqKme9OwsPVlx6Ux1G2r0Hr2PR5JwQgaoZyHxIUFIzskcUvRNbVZv2RS1LnD3dWi1ZqKEC7Eypko9pd9jAhols40+V/uhQTeVtsmL7WIW4Y1VssE0OfBYCdmRv2YATsPd1iW4xKSgzcxTRB4eugKu6FHF2ow/+sZqAR7sMbt+Q7anLJKmlx1XzV79gft6QbAJioygCa2BZwuUbcGEBdAqubnqJu8LwGEZR1um+p7 X-OriginatorOrg: vivo.com X-MS-Exchange-CrossTenant-Network-Message-Id: ee884843-5262-4538-7320-08db82a154d5 X-MS-Exchange-CrossTenant-AuthSource: SEZPR06MB5269.apcprd06.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 12 Jul 2023 06:29:22.9596 (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: YUbN+FsCqmME9rv02SszgmlFi/ZfnpDQF36GRJTmODS82iKtZqw5annmXkETAObNy8m4OQQDN6LL+0cgPfDi/A== X-MS-Exchange-Transport-CrossTenantHeadersStamped: SI2PR06MB3963 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_BLOCKED, 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 X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1771196164455094505 X-GMAIL-MSGID: 1771196164455094505 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/tty/serial/vt8500_serial.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/drivers/tty/serial/vt8500_serial.c b/drivers/tty/serial/vt8500_serial.c index cc9157df732f..bcef41c0262e 100644 --- a/drivers/tty/serial/vt8500_serial.c +++ b/drivers/tty/serial/vt8500_serial.c @@ -611,10 +611,6 @@ static int vt8500_serial_probe(struct platform_device *pdev) if (!flags) return -EINVAL; - mmres = platform_get_resource(pdev, IORESOURCE_MEM, 0); - if (!mmres) - return -ENODEV; - irq = platform_get_irq(pdev, 0); if (irq < 0) return irq; @@ -647,7 +643,7 @@ static int vt8500_serial_probe(struct platform_device *pdev) if (!vt8500_port) return -ENOMEM; - vt8500_port->uart.membase = devm_ioremap_resource(&pdev->dev, mmres); + vt8500_port->uart.membase = devm_platform_get_and_ioremap_resource(pdev, 0, &mmres); if (IS_ERR(vt8500_port->uart.membase)) return PTR_ERR(vt8500_port->uart.membase); From patchwork Wed Jul 12 06:28:47 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: =?utf-8?b?5p2O5oms6Z+s?= X-Patchwork-Id: 118853 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:a6b2:0:b0:3e4:2afc:c1 with SMTP id c18csp948461vqm; Tue, 11 Jul 2023 23:40:59 -0700 (PDT) X-Google-Smtp-Source: APBJJlGFbDz9KFJkPDMmNiwYsBcF9mJVQn++yEQH8CDATMAhV9Haw8UzK7pQbsDrfnxmJZFeYX7m X-Received: by 2002:a05:6a20:9147:b0:12f:d350:8a12 with SMTP id x7-20020a056a20914700b0012fd3508a12mr1349627pzc.21.1689144059557; Tue, 11 Jul 2023 23:40:59 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1689144059; cv=pass; d=google.com; s=arc-20160816; b=xsMKMVHx8K998U+k1chLV9bV3bZuEjVdmXmVofx1FhuQLbevjFTZjvsYAF3P35Xhm6 VFo5gShZdENzL6b6IJ3JedUoSuXmMY2peaRajWKJPr4hx2K/15BEZNtLKp2iCiKdJqzx pJKRD2ovp1SHtJ6TdcCDIW81R/kHyZkVqAsM7dpJhRHCRP1caUe3VPTYEYzheChDHfa2 prSlu1APyRwPGR7U3TXqAo53l0OFQzGp1a22wf9IxnbpEJ66NgBO6E/R44WnDIeHtMI2 crOPaWqsygQTqDogQeMr6gYp+5lw3ieQRdZ1BhXEjr0PJ1iEfYLVhFlj4qS4/vIQ5Pcq 8VRA== 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=rK7c8U7rWYHq9gw3kMiTCYQLfVUX1637X2xHaESdYLE=; fh=JT4JGwmmWO5GU9EeUMaGyFOa/Ds15iiLj7zNhm8ZSyY=; b=pXO2s5/UFXJdDZUa3bhZNF9mROmX8NyXq25lpS3c2s8YWUIhavF7hs+HA5RpIlzxH1 7xaHGQHvXkX5Lez8YAzXUf2G4wtbeld0ETyfyc8Vp2dJ1EMidJCcRzlWmGCbfLaCOzWb sb/Th74uDmfFhtaOOaYzXAqwN3ioFFPdG4fRAXsGjrSqhzv3xWlOJCIdV429Onz5o+6d t2sEhaYds+3/1Vy0JMRsYwK/DHFNQbL461ekg7sexCi+xXSA9mgVt+Q2r9j9eG5rcmaJ BdOA4qFQSR+14nKg8vEsNMkuU0XmmMTOdlqqLiNa/Ce4GZvDNPBMFeSZ038pe/dKdRB8 XJOQ== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@vivo.com header.s=selector2 header.b="BHZ/MzBC"; 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: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id n56-20020a056a000d7800b006815bf78628si2545423pfv.356.2023.07.11.23.40.46; Tue, 11 Jul 2023 23:40:59 -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="BHZ/MzBC"; 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 S231703AbjGLGbB (ORCPT + 99 others); Wed, 12 Jul 2023 02:31:01 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59912 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231368AbjGLGaZ (ORCPT ); Wed, 12 Jul 2023 02:30:25 -0400 Received: from APC01-TYZ-obe.outbound.protection.outlook.com (mail-tyzapc01on2106.outbound.protection.outlook.com [40.107.117.106]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A44B3213C; Tue, 11 Jul 2023 23:29:40 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=CxpFbsDcoLu9hA6RI8jFs2Xp/UBX6MAk8B+Mjr4gyC6WXyvnWrrW1RFg/aCJgtbacqfe1SP3kOYiZzQKXrrZTXNhrhW6eVmfaaqss+00mdG6LXmXo7o0s8muaHGA7XyVCg9Y2fCcCZzoS7MOaEseurV5FE+6tPkBHrhamWra5BA38dk5lJrG6l0LiBOYlT3t/hHOrVlVH66DDtufkjxHCCb3jf1zrdzMEv2/5789d0K8JNvus775a/zJL+lfkz06J9pVrvNKGrrq+uzCaVfiGb0R9fwmDv2EMrvPovInlW6MPgXzhBYSZ8ZtJBvepx+Sba0kFLiRgAyI6b3hSkoTOw== 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=rK7c8U7rWYHq9gw3kMiTCYQLfVUX1637X2xHaESdYLE=; b=b1gBIlBXKQ2g+KnEfgGQShvQJKtYsbV+yn/VMO7QzkmN2fNgKDONY9+SUJz2DwFeKMHr8MxQntEC94Q6Q31H8SNLO67asJRkGhuL8VHmnVo9B6XnQg3SWUqzu560bcDP2VVKBfb4LG2NGtcCFPcoSn3AJarSx63u32XoMt43NhBSoxxIbpMR9PdJ2oNnRkghDfyAQmOh5dZD+S2Pnu3SFMnPzCh6cvPp/7ALaEO/N25+G0FA0ugF9ZOkiy5oYkEx8acRcbbAmzqePqEnkYDqJHXnFjIv4lZmn2aiDGTb+4xgRxZdyVMb3HQ+FT6I5T7hctUGib1VxUSXuIq00eNJhQ== 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=rK7c8U7rWYHq9gw3kMiTCYQLfVUX1637X2xHaESdYLE=; b=BHZ/MzBCaUJmH1w93NS7ta1WBtPwNL+SJYOVkk5vWQOLOoG+YsqBKVIIqmd0Ymxk8CCyd6H17lFKu2PXoqUZ/5xPNmmLZ8H5uinV0kD0XwaRzcJld/h2DQCHDbIlxKGdwyMX6x4EUbC3oZ1KCSWQwpZOsvPZtCudCUIt2U74iN8Yt7tiOLEyeCNwgSzpRnY+fez8NfUq2ZBbvnLN1Nfw3oeCTvmRrk849X5QL3MsJrz8wwFkSYreOtynyZ6oEg5zg2k6qXKOvd4FB8L2I43r2Blj8Edvn8yYmiST7R7dNIGqGJ8aj1PH9c5Cqc/yxwx+/solBMKvk99krI6/GAqqdw== 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 SI2PR06MB3963.apcprd06.prod.outlook.com (2603:1096:4:f2::10) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6565.32; Wed, 12 Jul 2023 06:29:25 +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.028; Wed, 12 Jul 2023 06:29:25 +0000 From: Yangtao Li To: Greg Kroah-Hartman , Jiri Slaby , Liviu Dudau , Sudeep Holla , Lorenzo Pieralisi Cc: Yangtao Li , linux-serial@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH 09/15] serial: mps2-uart: Use devm_platform_get_and_ioremap_resource() Date: Wed, 12 Jul 2023 14:28:47 +0800 Message-Id: <20230712062853.11007-9-frank.li@vivo.com> X-Mailer: git-send-email 2.39.0 In-Reply-To: <20230712062853.11007-1-frank.li@vivo.com> References: <20230712062853.11007-1-frank.li@vivo.com> X-ClientProxiedBy: SI2PR01CA0024.apcprd01.prod.exchangelabs.com (2603:1096:4:192::20) To SEZPR06MB5269.apcprd06.prod.outlook.com (2603:1096:101:78::6) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: SEZPR06MB5269:EE_|SI2PR06MB3963:EE_ X-MS-Office365-Filtering-Correlation-Id: cae0a071-8afa-4202-f06f-08db82a15627 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: z2n94d0yeiv8Sv4AmLPWctXhHV7CwLOUbrjZOpWuNZZ/fwijeNojtSD+DynYvXZBODuHgUsToBdybjAuO210auwWBxzjgu3xNvf51SxYqwZ27DoKmwZBz5uCOGvFmKJHtCxpBDqPu6ncXKplT8bOrC3ew1niN+jbADduq+OHj2lWv1VH+ejnMf591bPCMkA45qv8Xr+ttG4t3lKKNLjgy1ySCBcTfo3Y0KUjmgFTPpxmXbyLLQIUDX/eLdGbzz+wfrN3UMzSPdZ2lZFRCCT2rYRD9xu5WdJ76dDRWbEHOsjWRh16CD3LOlk/GRybjBfsC3ZQrG/oux+EBdIiFHbfHdrkHhWCxYYDUkYtTBjMSvj9WwPrkNkQH8wg7nNMQb2icDWlwGksDvFmoxjabLNYRUnSBXdqTCk+jsKGla0hA+B6SCRR31PCI9F85vL7Kf3PFYuzLcbImo1qhoBZVIaiYvIZQEC2R7WmuxV6v9Z1Vn65Ldx3X2nCdMNeQRcjl0vlfBD68kTeQQMNnGNpi/PQfFMr6EybT41e8IawwIfPn6ai0/L5HFoW3Qbp6icvuqrXh23YYXgNV+nckOq6CcENIm2TmhpRZ9lLZCtcChagWWY1u+CPVH4A5g8Zre64IHKB 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)(346002)(376002)(136003)(366004)(396003)(451199021)(41300700001)(316002)(8676002)(8936002)(6512007)(478600001)(110136005)(52116002)(66476007)(66556008)(6486002)(4326008)(66946007)(83380400001)(1076003)(6506007)(6666004)(38100700002)(38350700002)(86362001)(36756003)(2906002)(26005)(5660300002)(2616005)(186003)(4744005);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: yh8NIS1nWsSNYLUyIo3ajwrSVIkZTyaikhXXCrUpoQ1x065Gj2o2CJiIwti7aD1XY+4wPuRII/7DNNdXEyxBTOWJskWLwWTYoZyTjjj8w1EXV4AM7Yb/H5QenQ8xzet/HmKboAOkJsCLDAzqbrnOuieHnP4u+EAn2ew1tU2R8JZFkwcF9DghlT508rMvucvOPRt7dkBA55oedMKFl0hgNEu2SCOpokzyIafgaMUwWDPHEMMmG7nhW+TwaPVkqDLye4hACmAh63jq9zKr7lZdd2TsJ+ZYMSlaNuI3UzmicxUU2uBGjJIwDVbGSqoQJBcBphPEozqdg/DeWV+yJtYQNYa8M8ydCpQaGsChVrw6tz/kPjp6LdQNjEGlxMOqwYftkVZC/Kwn9CgEXWG9WgUUks2DZy9NX168c6z/8TbdFIBeTpxwW4W4jMwwpNoij/+Gi3Z+9PZ4oq2SxkdCLXdiALxM3vLFcimqtPKiAVFSbOCLp9Yi2wsSfF2xNnJ0gInJHXOPX9ZpSIa/eYDNvisle1Pf4tc2wGT12nS2Y4rlQH9b9qgWn4ydVNa9mL4BRE6NGbriC+KYgfqzAE28Qvlmw2uOlYeF48fwHvHrtiICPGGWqVZg73IQ0FR6YpsuvgeHu22CrYyZ4QuefvtT3J/D8zcrY9zFX2Yhu9kBm0OVt+suM3eL9dcHY5tMFekKHxRKHSHDcK9n1lpb4zEWT+MnY7VH8WwgY2mG1qVi5Yk8HP8PrmhhanSnM0e4/M11JcE/jQPcldwykBDgLMmEADwPAGbFVef7K+E7ADovVJeAmMNs6IENeW5B9n/yvy9DRLCSGodgLiTOU3PLfHTXMwMZncV5PaThcKeb1VK0LX+pXiYT/0i34admIX+CqcbhcBOH8rBETTjRpM2lByPT56bjAjhUS2kysVHLLIhzEDtRrggkLDdfeV9LCv7+Q+2LmuqUpURdbkhEVhdMzWDYO8uO4QWTRqnDedrMjbyMj9bfZtdLlHYDzLN/4pTp/2DeVNLrzOdUGj5dsy3/i7xASXyO9gik+QD1NbVjHQknSe7CSZ1cXCc/Sd0uAWST+rN+Vpm7sMnDp62dXSJ7X5hbnzgxmUDWNeZcbay/Hy+04j8lMbax1vLrO6rP9UuWhDRVYEUUpUNkO9LkkcUiX+bfeCHeFnjnUsdu94pS2unvNSVpK1a5vGhawKD7BXYhdKsW2wfkc7CGtK4UUq3EucZlkmoKotZC3bnwvSjJB9ifSdqrxUCuC8KFsupU0Fbr6fV6hkNKWQsggHPW+S5Thsnu5tEH3flFN/gydTPfQtiHx7QUVafImvPtviDdaiMG5x0WMD1DzmeEMcVZ4nZuigaifZbRxwxBspRXjy/k+MZ5S4Qa0fFQ2aH67EUlqyIWfIfBUPZwnz7miskV07OvVUda6MVavlfuCv0S8h8dzgNjDjoH+91OqrfGUL3mqnOgTSUGQkZJw7bICpyW04KMxFHrwLwGDwWda8Q4PW1+x9kdlTXOGp3x/PRST9whhm0zJXtWOpCfGFS/0QQotZ1896Q+lH2u5Vzl6MrY9qFbNMfHRtX5fEQkdirMdyz4kcch+tbig3tS X-OriginatorOrg: vivo.com X-MS-Exchange-CrossTenant-Network-Message-Id: cae0a071-8afa-4202-f06f-08db82a15627 X-MS-Exchange-CrossTenant-AuthSource: SEZPR06MB5269.apcprd06.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 12 Jul 2023 06:29:25.2232 (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: ntBr9e9jVL9ZMt1f3b+iGO8+Grrei1dQONMH4eOVahStlieWbQyJZO60sS3UB+IgqRdh3O+GFgwXMyg3D67WhA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: SI2PR06MB3963 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_BLOCKED, 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 X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1771195921549801763 X-GMAIL-MSGID: 1771195921549801763 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: Sudeep Holla --- drivers/tty/serial/mps2-uart.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/tty/serial/mps2-uart.c b/drivers/tty/serial/mps2-uart.c index 860d161fa594..8ca62e7b7ab6 100644 --- a/drivers/tty/serial/mps2-uart.c +++ b/drivers/tty/serial/mps2-uart.c @@ -539,8 +539,7 @@ static int mps2_init_port(struct platform_device *pdev, struct resource *res; int ret; - res = platform_get_resource(pdev, IORESOURCE_MEM, 0); - mps_port->port.membase = devm_ioremap_resource(&pdev->dev, res); + mps_port->port.membase = devm_platform_get_and_ioremap_resource(pdev, 0, &res); if (IS_ERR(mps_port->port.membase)) return PTR_ERR(mps_port->port.membase); From patchwork Wed Jul 12 06:28:48 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: =?utf-8?b?5p2O5oms6Z+s?= X-Patchwork-Id: 118848 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:a6b2:0:b0:3e4:2afc:c1 with SMTP id c18csp946017vqm; Tue, 11 Jul 2023 23:34:11 -0700 (PDT) X-Google-Smtp-Source: APBJJlGzU9G03QSpvi/J9NCYnveIx8pR4y5G51vtAPUHcwsqF3Ta3i5EYh6Jzgndai6qMfAP3FUv X-Received: by 2002:a17:907:8d11:b0:96f:8439:6143 with SMTP id tc17-20020a1709078d1100b0096f84396143mr18742568ejc.40.1689143651537; Tue, 11 Jul 2023 23:34:11 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1689143651; cv=pass; d=google.com; s=arc-20160816; b=Xq54ZeDc2U/W/FiWONZP5ISxg6yV/JRDPB9lvSoGadRQicHnkydH1xRMQZqyvn5jpP 09XTaRyDaINt7M89N8sCueCXx5+vJsAeeJhPjLCVp4Kyj2zGouwkCUy7SbQqJsndc+X7 56rwqmQfS8SD5jIePAT5wmmHlQnXS5wbwTZhj5MLqD52GdBQyGSZOgKsuj9i5j4qSJLP Bo45kANNGHVUBEnqIjXpnykoeNxeNh9kibVs6No0FomBbCjNPPqJhEyCghggxRKD9O6o 8aGMcu8PzgDlkFSmg6/SUQD63NwRPd5N/w5gpRB1Zd30bIv23Bnj/kaUZpY5TFTWVgxm QObw== 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=3ERvSezg9PnZ/Q26izoUo2TeUcyCh39NDFUlOa0u5lE=; fh=POGUdReq10NGeBtYFnRcyuhFpo9CTSX7AqJS7GWVN3s=; b=QZBJzV3pZDU2jTuhmCnvtnmRnOhoP6CQ5e5NuEqB2M7ADnVI52sfByeIFqStGUM4Km 3dezk8ksy+N8vwIdlBRYnQXIXAoVzyiXD52a4ymiuUHkYW9pdzVHMl4Emx9zuJ0y6KRk LHCAtyOkiTiFSZgGUex5ymD1lkrhZoSAlv9NnzO2CT2NcmyEUDN5O8Zdha49PzEdcQ9R cvO2eLSLm5oJGrZKJjrNnZayPpL5l5cjuuFFyHGw5283uLcdkfcXyCvKxRwDc1AmYlp8 /Pyq9DuQqPe8AZ7evYkzvUfWOE9GAvkTs4+KD33uUEt070a8IdPMe8JfW173chqpC5PS 8aPA== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@vivo.com header.s=selector2 header.b=W80ObTAO; 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: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id qc6-20020a170906d8a600b0098e41199c5dsi3859222ejb.417.2023.07.11.23.33.48; Tue, 11 Jul 2023 23:34:11 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@vivo.com header.s=selector2 header.b=W80ObTAO; 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 S232161AbjGLGb0 (ORCPT + 99 others); Wed, 12 Jul 2023 02:31:26 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60128 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232259AbjGLGax (ORCPT ); Wed, 12 Jul 2023 02:30:53 -0400 Received: from APC01-TYZ-obe.outbound.protection.outlook.com (mail-tyzapc01on2131.outbound.protection.outlook.com [40.107.117.131]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 83F9D26B6; Tue, 11 Jul 2023 23:30:07 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=hjEH7b5oRCb95/eG4mujlaWRBVNTnRp0Cef94tunP3XvJgx62kCeUHf2c8Qganrwhv53EbJAoUOKGkjC02H/2MfuUIdrimJBJVOn4Kandl19G1mI9vvpvRyoB7AdEklkELPZ7Ac0n4MqVPM5EZYyrM9Edyl7bXPkLXeocA5pAwRFBtu6z4JJC4n0GSMBN42ST/xYsvahXOZk4ZK5QRRAkRk/1za+SepVsng2WsHot7NmqPiILZYPV7TLyH6lsQ5uSju9dsc8RDILJ5sf53G38lohyiUg/rVWpDUHgAtXGYDvqBjYG7qD1dVLr2raHeT3WUsz7kqQUVSaH0EuL6k60w== 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=3ERvSezg9PnZ/Q26izoUo2TeUcyCh39NDFUlOa0u5lE=; b=FeeJ/uM4n2gmVby/dWEIrCNZF0TyzGuiRGsM4Gtw1AmQNC3hcZvWVlSNR/9mITbo+sptRWWRuTHc/vBWYg7kCqCSfm6nBNLErJtK73wwC5gSk/DhhXHgMXiXjQp66CJEawHZKAa8pLRomgW3RJ4CI9v5nRY/uTv84kjKuztcg9ETgIIXX54+wFwTjhry7kN1wzLIbLClmQNc29EOE8qx7Hrgl5CtvCgzMDaNZziO2fdErrr90RSsW9pb9OOdus5uHvwFSUEiu/AjkQBqHpk6+kl/Nuey53ZRGH2DJts7QRrZAQmkOulSrMuc2RtJXxs8yVXav46EwcoWq6I0a1rD4g== 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=3ERvSezg9PnZ/Q26izoUo2TeUcyCh39NDFUlOa0u5lE=; b=W80ObTAOyYQUr3F2d2EG1drpjR6GHPvP887SIMt8m+jeUdBLzaxV2f9DlYjZc7v76fUal5pf5uoQDT0JZyDwsKPBzN+Es+oQZTlS7O735mCBmP3Wi03imGrMiLiQ7RnNv457k7Zjd2F2oNI+1wq/zv4fzUwatq22DMi9cZNDBg/pe/g5tmz7/JzQxTo7vehJRTPeuy0ETwPn3nHH1/BEJ8z4IhBYrzwCe+QQoYng4YGReZkNez6CaBcCcQn75qXA19at5GYWbKQu0qod+etRHE1yXTY9x4HBGymHBsO/pWaDrkdZojpHi5gsENJVfDu3DqJ5q3cVVov4i04cC75xBg== 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 SI2PR06MB3963.apcprd06.prod.outlook.com (2603:1096:4:f2::10) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6565.32; Wed, 12 Jul 2023 06:29:27 +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.028; Wed, 12 Jul 2023 06:29:27 +0000 From: Yangtao Li To: Greg Kroah-Hartman , Jiri Slaby , Orson Zhai , Baolin Wang , Chunyan Zhang Cc: Yangtao Li , linux-serial@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 10/15] serial: sprd: Use devm_platform_get_and_ioremap_resource() Date: Wed, 12 Jul 2023 14:28:48 +0800 Message-Id: <20230712062853.11007-10-frank.li@vivo.com> X-Mailer: git-send-email 2.39.0 In-Reply-To: <20230712062853.11007-1-frank.li@vivo.com> References: <20230712062853.11007-1-frank.li@vivo.com> X-ClientProxiedBy: SI2PR01CA0024.apcprd01.prod.exchangelabs.com (2603:1096:4:192::20) To SEZPR06MB5269.apcprd06.prod.outlook.com (2603:1096:101:78::6) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: SEZPR06MB5269:EE_|SI2PR06MB3963:EE_ X-MS-Office365-Filtering-Correlation-Id: 54ce0f76-8d0e-4dc3-a95d-08db82a15775 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: ePWCvwGKhjqvD1HxMYsSEaJoF5rSCKmNUFd6mkfNP6x9hpVhKs9HU/GIl5lmjfZBg2Hh3sYEULI9fI+OlD2nwQIwP1zUqwr+xzBNYwrWmZoCgUMggNfNuCT43hlSlNeBRPYsakAO4N23gAIXDWxz+iWcCZqeKZLMwZR01acrUqDpfJYAgxjNgOiNCsCyhLB0X2BR397nl+tPrQxzAEF82Mlng8YP8nvKvAOdM7qTr//H1hk2a8c8TM0EuYBMeNTDdzslNqXU5FMgy/OkHfPlhaBPNWWC0rX1tTpkm1fYbCbeCTx297JIT2GNFxFBy0HO/FYJCVK20C2YOfw8i0L2ZPFRYMnNwRojyqnJ2Xwya8hOkc9t3tVcULoL6e0P3TnP2XLYrx39MHrcipJfKoXwMsXRw+MpZb3wJly7Vu33FVaGlwOQodwF5/svlMibi6L0z+ag6n92kcQTdjc1KmUxQubrmWmZXV0NNpyAc5OJ/wQ34KBOWonUTSG5AVitnFjJSKO6P3Lg7JQxeBVrEb9BREJN2w8y48Z+ot5rzducWv3hv10vnYhokkTmNHaZjPibQhADSroojOx5kxrOCN6ZfPaLJ9qjgGoyYhOViqx6Mg6hZfWyerVz1ifTJYWU7GiP 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)(346002)(376002)(136003)(366004)(396003)(451199021)(41300700001)(316002)(8676002)(8936002)(6512007)(478600001)(110136005)(52116002)(66476007)(66556008)(6486002)(4326008)(66946007)(83380400001)(1076003)(6506007)(6666004)(38100700002)(38350700002)(86362001)(36756003)(2906002)(26005)(5660300002)(2616005)(186003)(4744005);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: Gdwr3xYz5GW0+rF4CwzugAOHEsp1uaGaQCapGqBam8Xav257lY/pRCNeY4UvIABQiBkLexhPoQi74dxuTqXnWy3j9wAyPZUKaSBh21DC1Qe8Doo5mAdqopzIwVP4AOE6WqAyHSxZr1f3iJVKUdviUNE6/+TwW3W4kp4h04dwGKLtcvpZwzNJZsAzZ5UADJA2f17bOgb13HFb3VJMpHbqfT5lvqbwccuVP5Ky568uM18N5QUMlBgO7a8dnPrvPfSV1ESV3s2t6aVvoNpby8L/s2rp+lDh8L1dLPwF2jBzZLsPOFolWaPfssvjVUoDi1+8rdrPKC39pDuB0Gu6dl3rfEe6Hz0yCurttln3+IVK5LAysOlVqi7nrps09X13InME9M1GLBuOVWFI8L+igA63m7Ek5TdczxodmiZBKFX6Of1zpLhVL6/bC3k3/v3DLVBzqYKt6SH7sS1yZXJ2PmaeKHwtPddEq3kUO8bAmxDCcaJi3cEC6l7NYLIQx7qfP3gTyxbHQ4fpmCT8FKsUmuuTL4zGV8EyE71oLUJH6FeCe+95FZmvbygFECbA6dggtOUPw63gebjyRZd2sQUcM+hjRfjTysoGXaaCtjRYQF3diMzzABG9WAsgpp6LmStK14ryvqhVv2N5zvi2lr4/ISUZ++hPhSQ1tCbikw8gZstvlixFXmIrvfSywxbxolxQnAq5yNswbHiM+aKgdJjlBse6dPmKuSyjNGDH4Nyb5uIwrQZS5m7zrfskjdmRC07GT7bRM5SWI+e8aav3kVhHKHZ6eF7CYVDzj/cOPAu2Zq+QDoPp/ikU9kESEuPdhVrLOqhTQWkEDtkNQL0wG31DAdu9zKOVyUaSPNRKpIGE3CePU9qYWfoCm+HEoWUXgOtg9D7GUejJ+QHh8VReA7nOr89aUzr6KxT2m6YbQsEd5cktv6d/buto2aT0EM+OC10/0wETkpGpmwnICgFrM5x/K2Zh3f2USwavMBj9bj/ANLI8c1hIlmKJPht85UVXJMfU6RQmrmAZsVreYXxnZHZvKJNe+uJlZk0DY8HiD4cPw8E5tW/WaFkSCUUogQHuy+VoHjG8mdKXr2vzi0wG+KnMPq69DCed7PRPUwY1fiDtbVROIEvvzWrZYGXrehyWaeHb0X822XQVTj9CAb8+mrOn29oR9HwLPE+HoA7sS+BUfg/NzLKarAk6PhYdwwV0iMOwh29fEgzaF2svS+tNDbdtrEpHSVs/V79fcf4E9lwGwz0wUxvmrYvMRCC8X1NZEuTfVL1f8s8QYLzzVTLx2u8DywyGL0bPHtUVf7gwWkbN2y5JlNJw/oP7fTSflcAU7K7IntyKfZREfWXb7fAlt9fNWPvMgY6/xZueKrLHUECPbnUYLGK+0SHlh41sHvGTxmdGZEr8Fyi1BWmRMZ4KqqjdBy6Ru4Uk7Cyvh16eCNwFddnfNNlUsr6G2+s8X9n6iZif5Xx+azboXPrcVgOlB6K0yVGS+67+lTUqd9w/DrtnWIQoJ/tlXJXYZSo+33NBAmLEKNFuq1VL2/+VF/BbIa3LuD0ZFyzmGtYRLk6cRiSMAJvWHw9BtmDsuScI7LVLxmnLOvZi X-OriginatorOrg: vivo.com X-MS-Exchange-CrossTenant-Network-Message-Id: 54ce0f76-8d0e-4dc3-a95d-08db82a15775 X-MS-Exchange-CrossTenant-AuthSource: SEZPR06MB5269.apcprd06.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 12 Jul 2023 06:29:27.3981 (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: t9EOqb885aaP0yf9387l/8k+YxCTqdpHeez5lh/dA39TFsgWg5PhctW6RimrGnGBNmqSgE1Hwug8+ZNlqf05nA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: SI2PR06MB3963 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_BLOCKED, 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 X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1771195493369050899 X-GMAIL-MSGID: 1771195493369050899 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/tty/serial/sprd_serial.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/tty/serial/sprd_serial.c b/drivers/tty/serial/sprd_serial.c index b58f51296ace..bc47229069a3 100644 --- a/drivers/tty/serial/sprd_serial.c +++ b/drivers/tty/serial/sprd_serial.c @@ -1179,8 +1179,7 @@ static int sprd_probe(struct platform_device *pdev) if (ret) return ret; - res = platform_get_resource(pdev, IORESOURCE_MEM, 0); - up->membase = devm_ioremap_resource(&pdev->dev, res); + up->membase = devm_platform_get_and_ioremap_resource(pdev, 0, &res); if (IS_ERR(up->membase)) return PTR_ERR(up->membase); From patchwork Wed Jul 12 06:28:49 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: =?utf-8?b?5p2O5oms6Z+s?= X-Patchwork-Id: 118849 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:a6b2:0:b0:3e4:2afc:c1 with SMTP id c18csp946114vqm; Tue, 11 Jul 2023 23:34:29 -0700 (PDT) X-Google-Smtp-Source: APBJJlEhwq/nuSsUgLQavYCe3zI27jVpFOOoYf47ixz2BIwNg68wiN1ETc6DbkV0UkY+QAmKsuyo X-Received: by 2002:a17:907:c8f:b0:98d:b73b:b5f2 with SMTP id gi15-20020a1709070c8f00b0098db73bb5f2mr17246160ejc.71.1689143668929; Tue, 11 Jul 2023 23:34:28 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1689143668; cv=pass; d=google.com; s=arc-20160816; b=eXQQSDhqWwcbs0KiJ7HSScjZKvWxsahhyCZACopK0T5TTmnaWqbL/fRoH0tgq+8qyr 9w436de/ufEragPg7oGSr1v9qqi9zyhBj/ClqyUo2mJW/304aPtpQ/hRsPzpoHWfRGEP c/qH0DjNQKNXk78Ka69zSj345yy/cteWgVYHh2ZOmc2ovEnpgOHelf9u+s3QzrOWQhZK cV6ewn94GRhxYyINLqf8NudxvBkQr20o+E8cbqBv+YUqo2c5Blhqg6jK2SyyZNw1h6nC sr5J0Zeb/aMUik00jruwvq5cMdHwhc8alk5wcSG+cAEmNfv4Cm6u4MfJq4/GAgfjuyIh yp+Q== 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=L50JRKFfh+EuPnMI1AHbtb790FfijLhRLUMWGF2EAd8=; fh=3q3PdFZ4xZD+NRM1r67J8VrVY0AyTe+ioGbzqg79a6w=; b=LcOnDC6npVhFHrscdB83xxib5mmbeICMkgpG3vv/3oXlUiAcj9klwEjCY3W54oPM2x SStT5uLut61wMGghcszjWfbg/7CTM7aOwYf0C2dHOyyxCDc8GgpGqSekaNoNbEl9/bU6 PiGWE/TsWGZgXMe85aQ31t1R5AXj5BlhZ51/fW854P9n+VUQyCml2rRznlRU94PR68Zx NoKXVf4v40qBM/HdPJ807yJtitC2ycECsxNQmVIbBaJabp3RNsnwXDTwUYltu5F4r8Go 0QksBQGWZvkRqSnEX/W3MhrBjj+nVfik1pxt9bFcQckBE7fgOo97gZbfKCjVK/VgOhfK HjyQ== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@vivo.com header.s=selector2 header.b=mwucXTE1; 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: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id rv26-20020a17090710da00b00992071c984fsi3723588ejb.954.2023.07.11.23.34.05; Tue, 11 Jul 2023 23:34:28 -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=mwucXTE1; 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 S231251AbjGLGb6 (ORCPT + 99 others); Wed, 12 Jul 2023 02:31:58 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59954 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231555AbjGLGbK (ORCPT ); Wed, 12 Jul 2023 02:31:10 -0400 Received: from APC01-TYZ-obe.outbound.protection.outlook.com (mail-tyzapc01on2106.outbound.protection.outlook.com [40.107.117.106]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D02E326BB; Tue, 11 Jul 2023 23:30:18 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=XeTcBwUcOqLWDixtCmVeLjRPuHSmRUjs9DgjbqzO4IzHL2X5+QPqreZ1Op3Pba2Tk1pRnfYfmJgJhnnURQ/owI7clkHIXmyeDbwzcLsi8Hdp0Ro0oYeHtKMaz6vTPoH9hGQ2jXjiaPZqHfl5iB78El3XNGa2jv5qNBIXs15Fc1boWKZSosWySZ4UGM1oF3kqrZ5qvWY30PgeEzvMDDIp3kRQAmcWENM/VzGVbHEydoS4GxsIhQ9pugKJwdP2Y/Y0BTp+PX7TdZXy54VN3L5ImEUZskESmLiUXzu/X5zYz0yo7s2TFajId0d88Qqmg4u6kx/4JgL6XbaPDAgRkSJM7w== 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=L50JRKFfh+EuPnMI1AHbtb790FfijLhRLUMWGF2EAd8=; b=hI7VRbBf4Sp7wwAsxw0NEHOrQVYDh5DrUE+ckcTsHP5UVAM8iamZNAFEpst5e4AkE65ikj3AYHSQbVcYoAI3rgqgVajf+63WhtBbRLjZCQEAQxqcvTwzwGNfe/ZwbljOxDU7OKokoIuRLROBBcINBmcWphiZJSMRhYkhkptoy0opc4bEchyN0t8rKEg0bR3EDBwdh85GA50X19yekEcisaPcRBTO09vRO/CJ4lv4LP+JoMNRSH7bX2Q///1sghJPjQ1ZmDXRsGFE7KeNqXyaNhIXF3OLHuJV2IpPhkx5SyIUYqNl+xG9vFLB3nKFW5u+hnmt/q7vYsgKTPMNnPBzgA== 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=L50JRKFfh+EuPnMI1AHbtb790FfijLhRLUMWGF2EAd8=; b=mwucXTE1LU+w0FzzqKZACe2OU2LhIRHf3puNAo5SI68nJSYHsWvPOsxOntr6FcuuIJ1ORrHEcEcp5Ulu3oiiOCY9VFnsUCXKztJZZrTLQo0WRMM38zULMAzVco5RMruoCAWF+VeFKwpzg1BcVnumtgS4HdyO5uX0RpRnNKeVim71qsFRgyg4E5RubNnAzSpwqHYX4dZeLL2mu7pn8bzinHdtyk5qnLqPtJhPYoAbujJ7UPvPcjDCF2iieL1Romk0NhWvtNld0mT9An+9XLeUJCXmbbUghNgfgaOQFq07tTm0ia0Vyx5c5ZrRviB/bjMDiSq8RtjohCGYaHlSpql2tw== 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 SI2PR06MB3963.apcprd06.prod.outlook.com (2603:1096:4:f2::10) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6565.32; Wed, 12 Jul 2023 06:29:29 +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.028; Wed, 12 Jul 2023 06:29:29 +0000 From: Yangtao Li To: Greg Kroah-Hartman , Jiri Slaby Cc: Yangtao Li , linux-serial@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 11/15] serial: sccnxp: Use devm_platform_get_and_ioremap_resource() Date: Wed, 12 Jul 2023 14:28:49 +0800 Message-Id: <20230712062853.11007-11-frank.li@vivo.com> X-Mailer: git-send-email 2.39.0 In-Reply-To: <20230712062853.11007-1-frank.li@vivo.com> References: <20230712062853.11007-1-frank.li@vivo.com> X-ClientProxiedBy: SI2PR01CA0024.apcprd01.prod.exchangelabs.com (2603:1096:4:192::20) To SEZPR06MB5269.apcprd06.prod.outlook.com (2603:1096:101:78::6) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: SEZPR06MB5269:EE_|SI2PR06MB3963:EE_ X-MS-Office365-Filtering-Correlation-Id: 58a7f62b-9376-4e85-f113-08db82a1588e X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 058FRvsYPVk8zPnwE+w+LJ2wbq2ezYRDpawihnVPL9InRmZzJ3iWKwj64DgN2y+Sf8eZR4rnSsb0nIb4FP2+WGhPDWPTlTq5g3XeHSksNTqVgYRvFVu6gddUS31dTZXeGuMdAEuCmcqAUnLa6CX3umsEN77BVAourZVbIFS+6K/ykq5fqPNiQUovwueZjA9/Prv6e9EzPHhIFZKHCjHAkH0xL1Ee1ZuvhNY8yKn9mCKa9bo2tPh0awg5aERz7IynjTt0BSC21wxNgPyNfEr9xyk2YRZ1LoAB12wgT89eTraNek3zRwv66Ks2cBL2N2yAOitXnjJni5AY8LuJ9iRApycL/9yUXISdzJZ1tiKGyJj56fjnPN5m3XmQ5aPbFm+SGFnKfy3tygjlXCNTD/iZ7Z1c9DojBapOfe0B776XQDiUqr9nwZXsoXZ92Tin88KjjZqt1Y20udPeGytI2ojUidfeCR/BE7b7o1IDPOHcjSNnJvAhNfdgS+uZDeA2DM0ULO4b+CrLRqp58cGWcErV0VqI6sLEoj7LoxgRNy2E1n/ndKy4F0yJ18Yfrm4sjoiof0yEhlB2zxSbR7+YHaqD3XxJPv8ktV7UXg9OUJi6u6ROUXyZeWmYdNANoQ+KuFbq 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)(346002)(376002)(136003)(366004)(396003)(451199021)(41300700001)(316002)(8676002)(8936002)(6512007)(478600001)(110136005)(52116002)(66476007)(66556008)(6486002)(4326008)(66946007)(83380400001)(1076003)(6506007)(6666004)(38100700002)(38350700002)(86362001)(36756003)(2906002)(26005)(5660300002)(2616005)(186003);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: 12f/8HOEdKbA04BS2fjh+177QNn8hcQGoInkdadmp7HX4sQka0g7bqF5M7ISUtzqNJlQz98pAYRKXoNr43QGuk7qxypXnRRzRal8gnlEJjKox4+VjekHxa0WpMlvNmVZ8ZDCo7S/o4fmJhpFBmbnVqx14asWPQIZaQs7ShpVQdDQj3ih1K6hoIZ2z/Qw/h4G6KMAdKQLiFvJB+rcaGpF6JdHPtsxFIMkBgQqL6yL9v//jCHKRzOM7mGL8ClImop7E5yq3JFJeIYuseBsRBdAzNv2xUe8syCniRL3M4QNMAyHw3bxE7PXc5Z7hqhE2jPdE6cq0nYdOQl0L1MDoCJB949ctosZheScwfZ5XGR7t21fhaKcJjL8cakUtIfJ3VzrmeXBEls56UeD7L+lZVTx+l22T83i5aBF4CxYVlL4oTCLcT6aC/ZZ32AsmKjfJgZlIbe111dTPL96+7F++4dUjNqmIzxRGZU8449G4fVv0hWozYPlbBKNFqDKtCrUexoJIzwE241T0Y8Cibqkh3rGPWakyDdf0IkglEeRVTFonuuvJEIoiXQPfZE+XGmv7zit+aquplEThIaqml/t/gKk17/AmeyayaYHo6Bj+tbHkj0bYTadMqQj60/Ri3BrRy5ZBsRFZ6/Cn5GxspdXDFu7vPFfVTS1GEQ3VZiYNMZcijn2bB4L9zvgNBp7MdABB1GEFc1qPMXXb+nZmVFBo+ARtZP83li23pC+k5G7XLyA2zq0ENOWpjbGjaIFThc5xmqCdGDP85rLI9xPvvSVTnH/0qanJXqsknOEABi8p/JfQPAK/rQnOn3rcNJB5HVZmJ0prL8nqEKEKip9DzL90djld/VnoRerdofLTkspC3YQAIlyFntG30SjJAHxa9DmFONm9sIZoBYNYrylHJPbBU7rmqywl6tQL49ufPTHjwlEQpXNPyemu/mDFM01a3e/p7OPM6BmslLS00UK1vXALvMFv9oZ1wHowhRuFUL0+GuutQhPxRZNVwtbCkaZ8a4oxa8zssXy6q0vW0jjT2mwxLscWb8zz59YGiITm32wBzQWjdBn5Ol42S+7mtUuUUIRmF7BtKUJf1T/yYq+O67mask8UObS66q5fQIXs2HdB44cWtN65MVMOScqvGTkXhhQBtbrwgrsWReUyJojRAcVfsOSrHNdOvVwV+0K7iey/4bGYI4x9TsAVCFnbGWQQANk6fmWUCmYf6/495S5CKFAlP2axhUXkbJ+V6ABkSNDcjyzcxdgTyPA97NjLKrgqlfGEDsAZkke0XgCe4FXT/q6c8Ma4hggU1K5TpLI5N1adIYAeXZMzwAFAZRCzfygJvpkXxmrZWNE1/H6C6Q9+pGR9pLYL4y6klVZPGrfyS2UdpUQeVu0SXjh/Ru5QON8ZALDNv4MN3RYWoNRCUEbT+ZvHBLUoR0+wR29To1KnrrJ6NLkHxCff7OBvT8/am8fbbzFBxfq4zOU8YFA605UYo2kD5F5k6b6qKPJQs6oZuPA+8UxFijZ5bUjLVDiKKww81BsCcTFIE6dDpN/EAlK4Yqs3Y/2NeEMNY1QZRvVj5KQQOuCZ862iWShswMsTnQE+KLr3WQj X-OriginatorOrg: vivo.com X-MS-Exchange-CrossTenant-Network-Message-Id: 58a7f62b-9376-4e85-f113-08db82a1588e X-MS-Exchange-CrossTenant-AuthSource: SEZPR06MB5269.apcprd06.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 12 Jul 2023 06:29:29.2382 (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: /CjXs3+4HmoUoR8RJMFy1hpZHVuUZEiVEnh+7ufPt2IkQNMpsIoPW9Y+/6j5shf1W9E0ykHSyIXOYhPshWl36Q== X-MS-Exchange-Transport-CrossTenantHeadersStamped: SI2PR06MB3963 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_BLOCKED, 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 X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1771195511590038815 X-GMAIL-MSGID: 1771195511590038815 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/tty/serial/sccnxp.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/tty/serial/sccnxp.c b/drivers/tty/serial/sccnxp.c index 4f2fc5f7bb19..d0f571a4edbf 100644 --- a/drivers/tty/serial/sccnxp.c +++ b/drivers/tty/serial/sccnxp.c @@ -880,14 +880,14 @@ MODULE_DEVICE_TABLE(platform, sccnxp_id_table); static int sccnxp_probe(struct platform_device *pdev) { - struct resource *res = platform_get_resource(pdev, IORESOURCE_MEM, 0); struct sccnxp_pdata *pdata = dev_get_platdata(&pdev->dev); + struct resource *res; int i, ret, uartclk; struct sccnxp_port *s; void __iomem *membase; struct clk *clk; - membase = devm_ioremap_resource(&pdev->dev, res); + membase = devm_platform_get_and_ioremap_resource(pdev, 0, &res); if (IS_ERR(membase)) return PTR_ERR(membase); From patchwork Wed Jul 12 06:28:50 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: =?utf-8?b?5p2O5oms6Z+s?= X-Patchwork-Id: 118854 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:a6b2:0:b0:3e4:2afc:c1 with SMTP id c18csp948657vqm; Tue, 11 Jul 2023 23:41:31 -0700 (PDT) X-Google-Smtp-Source: APBJJlEbX2Y6JvDWxbA68BMDyH1z3wTUoJn2lN29V2j9yfI9xLctZ5H8WbUPEw74O6A/nEOyF0sa X-Received: by 2002:a05:6358:5916:b0:135:62de:ff7d with SMTP id g22-20020a056358591600b0013562deff7dmr9756338rwf.8.1689144091473; Tue, 11 Jul 2023 23:41:31 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1689144091; cv=pass; d=google.com; s=arc-20160816; b=l90wY2It/CBtgRqEEQEvn1v2x9AS1Eou2oJTl8EsT9jHrd405MfO6o0aokV3u2pKh5 X21OEsqMqoWTxwO0NpajexSacPtk3Kk/ZSz+tjGKEJyj7jxRyur32L/uxF5JXiB6NvpG fIsGkFaKkIuHwYyRipH0cQzz4FXwPf+fckIEvykb7t0LXb7pwJUVqYfiluLb/8IDu+ou ETPVeueOFTDGkNLR1xJLBX27BbD3gyJ7rl1QbuW3LCz3rwXt35Nmwvt9QGM5olMLqhLQ WoEo3l6dtvoaYFucUeH40VIxWG1v9kZxjQe3IGrAPz55pltiiRPkIes1yaXWDeH1SOX6 wZCg== 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=7BY+yXNNQyQNKuIDWMiQfGqD2yhadOq2kmjdUW5/5p0=; fh=2MW5TXGR0h50w50kb0T2c9UCsZNCdbF8/QKT+OF5qCA=; b=NRXYuLkPqFJ8EYCUQWv3vGJbQLzso3WfcwCSKRi+lKbuF1rUCWLIO/Xnnr2NOA0B5R D2e3r2GRFgIpksptcUlbJ0uDQz03dLCtCTNmsASRmdW60VUSTdHSY04wMqDpKKzIh4hs QWKU3yKBXPbjNDeTHOOw3jPu3l71gROBeAoKns7AumJGh5nikId72aK1vDiMgO5r+B7K kpRPlfN2qcNQ9/x5OP5uNuaiAvkoFWOpSm3txD8cXr5XJplpjRpIhDdMheVSBKKNv+yN I5S+TteXLgPBuCFitk2Ty+XfV4/drQIlrCkPZZcKBj98IgnzHnws1JOqVSLWTyTPoaG8 EdMw== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@vivo.com header.s=selector2 header.b=lBbIAhqM; 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: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id i73-20020a639d4c000000b0055387ef9633si2618552pgd.804.2023.07.11.23.41.18; Tue, 11 Jul 2023 23:41:31 -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=lBbIAhqM; 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 S231502AbjGLGcC (ORCPT + 99 others); Wed, 12 Jul 2023 02:32:02 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59300 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231299AbjGLGb3 (ORCPT ); Wed, 12 Jul 2023 02:31:29 -0400 Received: from APC01-TYZ-obe.outbound.protection.outlook.com (mail-tyzapc01on2131.outbound.protection.outlook.com [40.107.117.131]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C76291FD3; Tue, 11 Jul 2023 23:30:45 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=DkO0Hai9eqZsshLSvQzgpn2VOozo2gwTcqudFq2l7Q2TfU0DLh/Bg9XMIzhqh2ZnwzgpWLK62laW6u8nYXuMaaAKNltW4u7mGPHF+zSQRa6XLWWE/n0UUYeSRFn6sJJ+cTQ/MpzMZC4p/+sBW6hwibUNRlomFFnO/V0UKGh6kG8GYjagwOeEbLY75lVxE0fi/JKb1Kf/+XtGWw6yFFuHOLL3Lo68JZAJQgOOzS8Otz5VZx3WbLpH8db9ANqW8grZt2mHq/SmWRNln7q0wiRjge3p5G1bSCZq3ogYbW6pH0aDH/AojUxNNSPTe9qQzMS2EfdogG3mPdaU5TbvtWIcTA== 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=7BY+yXNNQyQNKuIDWMiQfGqD2yhadOq2kmjdUW5/5p0=; b=RLJRnQFn56/Jf0Pp566tKHzBM1ORMyUehrjgeaOXuUCSahUbsRkrVMZ54SqClZWQ7mlFmEf+w9jNktFbp6R2JJ7TGybnr6INLPlK2q2Zk6A/uaHF03E7uWw2k4PekqQJRwI3ErEdKPA505o2pVzBQerLwBUQyyIxXZMadhUcZqtYp7WXUQB3yAaZrj//B4UbSvpmly49gZLcyMRBTVGgfqZp87Xper6S7i3YPDB8ktuTJnqfg86iZM9TqNGfLJEp6Ey68V31jSldk6oIVG0K1TO4KMW7wPsHvGShBcYdm4LuONruDDrYy3rrra3IuVJcVAjTZEFR922sU21kk6jM9g== 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=7BY+yXNNQyQNKuIDWMiQfGqD2yhadOq2kmjdUW5/5p0=; b=lBbIAhqMO7ptPN9tbqJNoFMY8Fs4sz1aKwAoh9v7qDF96KT2oOYVdBTzXe5fvR5gxfz8VO+uWLDgWEAv/HXCMvNElCXTRmcSbfdDbw/ivh+ucOSTyrxOWLea3BoTx9tzcDlp4poA5nFBBPmyrSbWLf4H6DH2JwFAA6OPziVSmjx3aMr2p2PZrc2YonU3mBS+1RKkOoWf2BAX3xVhn+y5L96o5uVJ4yqh+ONcIzfHTnA9+h2RD5wBb3ksGRkNocg9pcHmVdp0xx950R5gtj1lFk7l85c0k2wynXv7y0vVciinc7wLDxxvJwTPvgbVFLeaToOLN1Zhw+Ur+USW55q4Qg== 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 SI2PR06MB3963.apcprd06.prod.outlook.com (2603:1096:4:f2::10) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6565.32; Wed, 12 Jul 2023 06:29:31 +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.028; Wed, 12 Jul 2023 06:29:31 +0000 From: Yangtao Li To: =?utf-8?q?Pali_Roh=C3=A1r?= , Greg Kroah-Hartman , Jiri Slaby Cc: Yangtao Li , linux-serial@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 12/15] serial: mvebu-uart: Use devm_platform_get_and_ioremap_resource() Date: Wed, 12 Jul 2023 14:28:50 +0800 Message-Id: <20230712062853.11007-12-frank.li@vivo.com> X-Mailer: git-send-email 2.39.0 In-Reply-To: <20230712062853.11007-1-frank.li@vivo.com> References: <20230712062853.11007-1-frank.li@vivo.com> X-ClientProxiedBy: SI2PR01CA0024.apcprd01.prod.exchangelabs.com (2603:1096:4:192::20) To SEZPR06MB5269.apcprd06.prod.outlook.com (2603:1096:101:78::6) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: SEZPR06MB5269:EE_|SI2PR06MB3963:EE_ X-MS-Office365-Filtering-Correlation-Id: 4d625185-8f50-469e-d3af-08db82a159c4 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: RETuC5PwDf2Pp1SMt30jGnAApzvqtCAN0IQmBnqqBaJrZQy9SsN5PJEFbGmqqVn2X6KbBRCNm4N/lKiJe1NdJSBSo7P+fdgDd3hcyQGG2Ihs7SYpxikCjlnoDGBgpKORByJNHZtpZuXsQSG3LWV2MAcJ+C2za1FebDGg35h3i7qNkyoUCWlqNQQPdOToGETfvq27gRfjVa1eA6usfiOMXgpyLzRBBquc0PDtYfeAPQ1VI+wfFvUP6OJ7vty3rTRs6ZWVtIhYugMK7EgrOYQ8YKJG4Hobl86l55w3oFugH8g0DXLchsT49exNgA6PYm9AUH2uIgIhq1nTHgWTxPWYNrI7NGqdzrTxfcD4hciwJVzgx0H6vNdPz3uXMaQHA+nNEVpgmK8/5Lp0a82vF9DPIWbWObtUqgmG/jJ1WxVmamOotvBjlVGB4XOfrX7s+21d4yPBh1BrRRYyyntLb+48xW+9fEe8CYJgSBfbrWy1BBSq/+CIT+RDsGCA8cj3XM33DGmwETWJ0f+mvai6P2fiDOSisLZjcpdZGtcCWD4sC1f8D+gKp+jJ0+pgct0hRiiAekY83EzNs0E+VBSamCvQpD9PwM7WlC3hOAgDx2G7uBx5nX/UuEQfZKLnMDtkLPbP 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)(346002)(376002)(136003)(366004)(396003)(451199021)(41300700001)(316002)(8676002)(8936002)(6512007)(478600001)(110136005)(52116002)(66476007)(66556008)(6486002)(4326008)(66946007)(83380400001)(1076003)(6506007)(6666004)(38100700002)(38350700002)(86362001)(36756003)(2906002)(26005)(5660300002)(2616005)(186003);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: bj6nxAqvq20DW9eq4C+URLzN643yISItHGGIHI7Q5aKWhAFmiPS8Vu8Glpd30unhaZa7J8bat8gup63z+mmw4A3vOvkMv4fQ5BJFlFt/ykBgRAOEW71UazrqzUG2hLW1iIAMZNm0d/oMh3C6bZGEnfhrH9mngZrTVmOVjgtAxjctpGjOh9jYDx71qX2P2J2jXG0PTIda/0RalnSZg1xlnvgfYke22qO0GwWmUKBuLgHDIqQ4AHA46THJ87J0OqHmbpK+QhGAnIQVz7pQ1+Vz21hXVoZgXpkH07vFwJG6nH79jzCc8ALIY8nk8So4/dPmjM6EIjP0wlS0z7jl2NKeuowXkEgjXSr8rUeIJe9plq+d1I3NA04Gy5wZSg0rwc60yw5tNAvJXpVGueyqfAcnTqaLIE0Qs1lyMGDFan68aCo3d962e+1u+lQFaxZecpfzeyvPkMlU41HBCLs+C5YJDK3d4XTuRfS4/kxIwOpiAyU9Liljxg4yzsIrO6qfx8RYgRaJ6JQhfW0rMv6LNE8kO5RpZ8XEYF0jrahmw/qA8pt81dQ4+av8Ev+eEPnQkEpiviDzje7qCRVclx0FxbnK01hz8tO8i38X0vfC6Pbd01/pRRCIiLLnxa4BgFsrZ27Bslsy5RexwV2wMnzpLlfDoVhzvZggnFLKhZFWp2YIWOogxsid90XYzkRVxijvJyfhcUuQ4xxPaRmwNdhNYUx+RkmeEOFJxL6i6LWZeTWVtX9tTLXnQtIGWEOyRemPiKmewi99T579bgsmQkizQytoymUn9DqlaYU0QEkhmAV2hEuf46fHFnTQ5yLMwjQxcDO3T8k/xi1R2DYXEBzuG5AsxbhnBEjTC1ZcI5T0V4Jf7+6saqvmS7c3lCNfbjKDmF5UWNB9lEV4DVjJoqS3ep7fygCNbXo8PmSsf+JVwfYrYjfYMpxPuyLOOhjcWBK3r/Yiz4RiRmlla/HFmjr3NTr+xK1IldWVkkmeEoAmxEhWFGNf+UFjrjjX8ffHNTDleATIUbv086tOkOpNVPNJhjCswOVzCvdapLZ7FnANeQ8fsdZWOErIDS8z9ctHLAZr9jHxSPhoKNeEDuGyeJYy5Llu7nSO+MuozJ5w8IYgZRWgQ+rLjqrMTnGqp3t7NI0Q3GExeybtGloCiahUpVDSNZL8mPN+ZRUrHJatWp+ckbWA0TldLSQlFzZyMTBh1S2P0NT0iHNa7X41iszyFdbZZcEqpDoVzEPvF7LOUYRxowj/iS8G6YcaU1rl+RKEdO4pbamTt0t6/h6s+/fTb4odUxF3iBD9PgHACVSXN6Bay3EaJLLkbQMKrq597Izy6T7O1v/EkYvZrNsEL/rbECuMSRO5hI8v8kaeXwWZDbM3dTCpl/XDfAEiIdGZHeS5DFzg7M6eILF0L4Gwjp6WMd5XITFxJ16dF2EvYGGAnvI8TRvGZCRPKPAxotB1OdsSroZhCWre9gbQaY303YYhQCj1FJ6gR4Tr0ijiFJgm7XDon4xdWNL3cOZXknFsBQuHIlQ9cVGK4Syr+YnT8n7bZE3tSBHG+S41+VarZK4UZuVHBr0x9FPOg203MEszT8tsHXxrJp23 X-OriginatorOrg: vivo.com X-MS-Exchange-CrossTenant-Network-Message-Id: 4d625185-8f50-469e-d3af-08db82a159c4 X-MS-Exchange-CrossTenant-AuthSource: SEZPR06MB5269.apcprd06.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 12 Jul 2023 06:29:31.2129 (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: fsmMx3AgwBkf/yUttMPJVA8A5O8oIBbWwH38SOnzirVFcnEEjviJPDLtTLMJVaKAPF7Uv54Xgg4DuRaHyWZkUg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: SI2PR06MB3963 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_BLOCKED, 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 X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1771195954608670545 X-GMAIL-MSGID: 1771195954608670545 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/tty/serial/mvebu-uart.c | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/drivers/tty/serial/mvebu-uart.c b/drivers/tty/serial/mvebu-uart.c index 31f739c7a08b..ea924e9b913b 100644 --- a/drivers/tty/serial/mvebu-uart.c +++ b/drivers/tty/serial/mvebu-uart.c @@ -876,18 +876,13 @@ static int uart_num_counter; static int mvebu_uart_probe(struct platform_device *pdev) { - struct resource *reg = platform_get_resource(pdev, IORESOURCE_MEM, 0); const struct of_device_id *match = of_match_device(mvebu_uart_of_match, &pdev->dev); struct uart_port *port; struct mvebu_uart *mvuart; + struct resource *reg; int id, irq; - if (!reg) { - dev_err(&pdev->dev, "no registers defined\n"); - return -EINVAL; - } - /* Assume that all UART ports have a DT alias or none has */ id = of_alias_get_id(pdev->dev.of_node, "serial"); if (!pdev->dev.of_node || id < 0) @@ -922,11 +917,11 @@ static int mvebu_uart_probe(struct platform_device *pdev) */ port->irq = 0; port->irqflags = 0; - port->mapbase = reg->start; - port->membase = devm_ioremap_resource(&pdev->dev, reg); + port->membase = devm_platform_get_and_ioremap_resource(pdev, 0, ®); if (IS_ERR(port->membase)) return PTR_ERR(port->membase); + port->mapbase = reg->start; mvuart = devm_kzalloc(&pdev->dev, sizeof(struct mvebu_uart), GFP_KERNEL); From patchwork Wed Jul 12 06:28:51 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: =?utf-8?b?5p2O5oms6Z+s?= X-Patchwork-Id: 118852 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:a6b2:0:b0:3e4:2afc:c1 with SMTP id c18csp948326vqm; Tue, 11 Jul 2023 23:40:37 -0700 (PDT) X-Google-Smtp-Source: APBJJlEP1Dh5NijDXh5Zig0QMxkMDwNWee41MC3EBbPyZ8dhl2iIqGGBsltlrok7haZHv3G99NDQ X-Received: by 2002:a05:6a20:38b:b0:12f:7002:c64f with SMTP id 11-20020a056a20038b00b0012f7002c64fmr17591141pzt.35.1689144037165; Tue, 11 Jul 2023 23:40:37 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1689144037; cv=pass; d=google.com; s=arc-20160816; b=K7sxhwyWfEhat3SL13grjXeGbc4ucNr30YN6uFm8OdtZsVM/4tUUUKTPueYVDcjBsq JCJYeEL8a47ye6Pi1DlXCJFMOlUVENThkoZ+idfJlFm6Z4SfZ6ffyPoDaq7EhODPj22c UR++n+Zdb2Ji8JPISCoC3dkgbJ/XhYgTj7CsaCJp2+oJoT4voBLY8zHY8X7QRT6UeMWB Ooe7yPi+qS/A3Cc5/GxV40ZcYBxjVUt8qq0N/u05YHUvtlWqoZJm1/vST9qgzI48R8vT sq3SVe7/MPWMQU0T8JBjUChF32PhjJz5K6uhm5jBLCl9sIOouvNkLIs339TpnrIM6ZNF m3Fg== 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=QcARCYjsWAzt22qEJ8ZBSVNr6oXB59g7J8n4S498Feg=; fh=lfv42e3OyR5+kIJcsjV5WIyMdKYhug2u3t3n2EEcu0g=; b=hbQlf8l/7NdVFuOOTXrhZsPyktDw1yOSeQSaVEACD8kYCTmysaIzDTgKhZS+Yazzdi ZlNY1uVkF2+VfBe7CraAk+oO89F036Zwg6bXTYLONuouQZna1SIIRi+SjakUy3k+zxxl h88zUrKco4s1o29P2rivRvSEpdoaPzn3Pl9atnuhbPCIhOSa1xmbWAR1vtxTYPbhhyQe srgHp8f/NaS3JLy7VEOtcP5PP0lm1zShKcZ5wuXEyjQ3TyCKAevLO+jEpCFPG1IMAphr Wt9II0lBAplCAP+M1OXO4o5djtWhEj2fx+V5k0iERpjinctoNWAaFdw0hfQFqdr0iBpX wMuw== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@vivo.com header.s=selector2 header.b=cBCbmZOF; 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: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id ij22-20020a170902ab5600b001b89b77f1c4si2764244plb.210.2023.07.11.23.40.23; Tue, 11 Jul 2023 23:40:37 -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=cBCbmZOF; 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 S231252AbjGLGcd (ORCPT + 99 others); Wed, 12 Jul 2023 02:32:33 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59988 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232291AbjGLGbi (ORCPT ); Wed, 12 Jul 2023 02:31:38 -0400 Received: from APC01-TYZ-obe.outbound.protection.outlook.com (mail-tyzapc01on2106.outbound.protection.outlook.com [40.107.117.106]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A2876210E; Tue, 11 Jul 2023 23:30:52 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Xse7XN3ZPhLfQHz+NKnE1la8u6IYBo2TtaaPEKPTx8Ndl1r8jP49lLStXEiM9jYSyGxEOAHBLjBAvmPtoEM/jbip1oaC6/6xXH6Gm+RXhfJ8Gi0mjKUdB+LPSlKUtp055pwv6hwL66dfvnoLMGvxk9Qz9iuUV3kRQh5FIUmHeULB9S9sTTPhJi33dDRcNs/MrkZp86jD1aLmC1es1udHl5NK9b5HEUj7VypoWnOTwRejEO6VbLj4bXyNVsIHpGMZy4Ha2qzkHLfGMkX/a030R+PF87k8kIS5ePcH1Q/+UIOvE7FycLkOd2ogN0GdmalwYJbmy2CJmp5LHUSmJ/qGKA== 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=QcARCYjsWAzt22qEJ8ZBSVNr6oXB59g7J8n4S498Feg=; b=E0ehb0L9EEsEkdrCGGBRr2yffFa6rrYFte6PHork0AqbXZ4c0dnm0xh9AMhNWGN3P7zk+WbpA1vd6dSzkgREDg1m17skbpK/wZ0Sy2KNKPffVwVylOBiqja3QnyEh03Ks71zCuR2LQpb46kkpCPJ7gwmAstdhk3PccRSgSVugocNvF2b8Xi0VlpwtTCD5aim3mviRCn1ub/62YRSIdyc+Smf+fS2mgVq6xVSBGKFNz/uf0gDnN14rd3o28Y4L7wHpA8rBIaMxRsXe5hjeurrodCoRT3/egi/xrZpbggl1nfC5Sua6Fc4Qe6OzXgOAOOoYR4awFHlhTVDByKPxAFeyQ== 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=QcARCYjsWAzt22qEJ8ZBSVNr6oXB59g7J8n4S498Feg=; b=cBCbmZOFNyfbl7Qy9fovoKMEaa220oeyDyhdcwpcWH/ZryCKO5Gd6RlBLAvu1XjsjmeDbrDUSPjrHLEjEy+QQaBlB1rWFE8JUL+4THMvNyjzdYe5dpnRI2fIcK9MGpcFzSGgbOSnS39drQyKmcOSO0vxCQPDd9va5C7ZAnX5tY24+fh9lZXw15fpAdoKXuuTldfzHrLCkok7mULgXDnJmJJK6Bv5wbQ0IRRC5etpko50OZdHGnoZ0tJAHh9tRbEqoWmWfzC5yvAIysAjpEQjAV5wAUhQfRcfhL5ARIjQ7dI2jasdtRgb7uhhLzw3ahlfcST6j5LFqPqqzU2fHuhN7g== 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 SI2PR06MB3963.apcprd06.prod.outlook.com (2603:1096:4:f2::10) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6565.32; Wed, 12 Jul 2023 06:29:33 +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.028; Wed, 12 Jul 2023 06:29:33 +0000 From: Yangtao Li To: Greg Kroah-Hartman , Jiri Slaby , Palmer Dabbelt , Paul Walmsley Cc: Yangtao Li , linux-serial@vger.kernel.org, linux-riscv@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH 13/15] serial: sifive: Use devm_platform_get_and_ioremap_resource() Date: Wed, 12 Jul 2023 14:28:51 +0800 Message-Id: <20230712062853.11007-13-frank.li@vivo.com> X-Mailer: git-send-email 2.39.0 In-Reply-To: <20230712062853.11007-1-frank.li@vivo.com> References: <20230712062853.11007-1-frank.li@vivo.com> X-ClientProxiedBy: SI2PR01CA0024.apcprd01.prod.exchangelabs.com (2603:1096:4:192::20) To SEZPR06MB5269.apcprd06.prod.outlook.com (2603:1096:101:78::6) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: SEZPR06MB5269:EE_|SI2PR06MB3963:EE_ X-MS-Office365-Filtering-Correlation-Id: ceaf386c-4f9c-470b-77c5-08db82a15b1e X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: oYldZnDEIVqEoW2mVMwHSrkRx4Us+YgDQZxZ5u3xkUkaCrNk+KB815CZ2a7HdjTn6iIHWfsdNRDKvjDsCFnboGWrUtrhx3SSPk019Yx8J3Q5fhTyCjSLbl10SToSsbFn7fUwXnnoPrwxMpMvB+BIirk//ZAPh+s66kLrq/76zCjEWS3WtpndPvxLSg2w6jXFrWK7f1liQ8kbL30IESyBPpX7AcI0/ZwEHghx2lCQy6asqobbQPsovGtPa8myjtJeawiE9v3+0tnry5vw9hqE39gdAgiS9EMW58lGWjB0gl4gPGTYR84dhCrOBKW998SB1y3qjkLVWY9UH1RvraqNPVkQgeyoyeXvY9UUdUkFM0Xgx/QhMdtIQzo74xvLVDzmvIoEGB8D6hwdjEr5GqJbjreS+kw0G4nUo3VghKBmblsMSuqDQZR11hlQTYPEfdYLADqM3Klsf2s+WET7VR2PHMIQ3h/1Zrjl4zBUrcFFstVrxKZw9euWd7+XpxfYZsuCl3cxnnmfg6u6kWgL30dePI5Gs5I7GsHvaZu0qSK/acahlgAgI9ELYP8P9hBY+xrEPL/KRAjLGt9B7pZ9VUjliEjDNMwV0XTLv3wa+xcVSwfdaGN/eIVSRug0JruiyxDC 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)(346002)(376002)(136003)(366004)(396003)(451199021)(41300700001)(316002)(8676002)(8936002)(6512007)(478600001)(110136005)(52116002)(66476007)(66556008)(6486002)(4326008)(66946007)(83380400001)(1076003)(6506007)(6666004)(38100700002)(38350700002)(86362001)(36756003)(2906002)(26005)(5660300002)(2616005)(186003)(4744005);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: k2/D+aimpvP96QLCaOwOz6nNbAiT78ZOtBK22pBI7u+ONblJtdUnlZD2lYJZyG7rX9B59NNQTV3VUsnlgeO+cPrUJZuOupR6qYxSOonG9X+Kv4LcMG0x3u19tC/bDsX6PFd0AoqmnLkx5UPFm6bO7t9t7g56dbxmLWMTg8zYZx7HkuN0qiEyOTj0Y2gm1z2hgyMQDEYqWjFhHjofgECFQBXlfWnhZ/ywRC1kPkH5o3DtExn7Qs8a40AjPfrcbtdVzw3S4JT6LhjPCyTAR+qGBJdqnJjVo9x9EB5r/1s9CZ3KXx//ZGufkkwBlfvjn7u4rlNjfP+SbhpKH6y6Keiyelqw6uS1KLXULKUIoGmmStHty8LZpgDpM4ldKOw98iIKZ+Ux7niIl7J0qSDskYJ8Nt0ZNsCxxefAV3iCtg5g7Nk0mx/Fs3SyzGgtScNOeV9AwJUCtm9qFRcXseUIcHI1m2bhoA+7Qklu5vP4LLNgrgptffPwBmW/VwgT8dkBjxZomI7MqfKtQKs000DBT/uwTRmF3PcjXfFvHfn9JUDJHMtG70jbGXq9C8kg9bIPL2WwbpjnG+8dYMVWWLXqii+YmKW90k4Ea3AMFUNfe+EcMMs0OeGo10DeGnaPabYAoOvOoBnMU/RwvcT8YqjSpud0xPWwGkkfFfge8u4LYMDgfK5BKl1eUMgdsnV7LuF2a7T/YP+GQMK3j4fsFcCFBwuFbyhcm4ov0FW3WfzQ42uJtOKKfwQ3kCbC+da5ARymcDn3BG3TsH4CFF8JE0VSoBOrQ6ozBtCCtxK2l5s7xn4HoGZgSXq53HaHGLLEjyyAVmAprz+zhErwhwbNM6c/zxGfDfbnedVkA+L+qiXbE5LRZ4IdgYulWRtT7f1J9ODB+I9yDjvIVY/aAwkFNK/cFxJaidAz7dCyaasaWcAYz7anL+KvJoZo40SUHPH3N/xE2jBmENQo5zSdnVgH7hwiVUZwEjNb7mAr10+ZR0snGwSoEzrkdEBhHq6TUYbrtxyk5PXGwQpGNPxeaHFRDejcrfw+bVjNcxHak6wCUb4x64NboOBP4HXAI7WDi4JPWOKsx7Jyi/Cbk1w/JT+Dl8msTa5736tLPuOjSGd7/oPFmXyqcDddMlMUSIk20liulz8jn0SGBjoyrGdB5XAb/47Xraku7Q5UrSrLl5IN9PbhjitGTQX3kbsKEEdm7XefUlf4and7XDhc5LLKHZiGW6FNmH6q/tD1zGeRZd534zF5+RolG3xhj7LPvMT2qJmvb2RPTd0bFxhTPQKwrT4BVCGGOdV3qhvd19aejblyO7PU++/LGMmoFh+jq8FvgyveYm9+kyCoVAL+L5Dh6GLseS7leve4FATg6Rj+36NZZfDDERmRl5VNrVbiET9fg5rSKnwGOkP5+EmwRDdP2jY3tZoNyeUwu9PIGQdi4ASqJdS9aIStPJIZypr0kjgmN2D7aq5N0FHL4D6mDKSenquzTFmruC2M/1RuQDxwegTK8yiaSwjHVuu9Z6BA062kAi1OgvUGXyCE6mG7t3X5LETYa4iy4S7LHMPNHAUK/Y2s3b0jJ1+97fSMG6jX4AvRlmACK4+wLvO2 X-OriginatorOrg: vivo.com X-MS-Exchange-CrossTenant-Network-Message-Id: ceaf386c-4f9c-470b-77c5-08db82a15b1e X-MS-Exchange-CrossTenant-AuthSource: SEZPR06MB5269.apcprd06.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 12 Jul 2023 06:29:33.5349 (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: Y5NcnwOAROXxsGgfWP7c8ZMdEfBO9GZLdSde2mFESBB4FfmqOuHO1nB3ZMqvu+fX+B8pmhobdL3Ly6RRzcRPAg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: SI2PR06MB3963 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_BLOCKED, 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 X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1771195897855065164 X-GMAIL-MSGID: 1771195897855065164 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/tty/serial/sifive.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/drivers/tty/serial/sifive.c b/drivers/tty/serial/sifive.c index 1f565a216e74..684933f5504c 100644 --- a/drivers/tty/serial/sifive.c +++ b/drivers/tty/serial/sifive.c @@ -917,12 +917,9 @@ static int sifive_serial_probe(struct platform_device *pdev) if (irq < 0) return -EPROBE_DEFER; - mem = platform_get_resource(pdev, IORESOURCE_MEM, 0); - base = devm_ioremap_resource(&pdev->dev, mem); - if (IS_ERR(base)) { - dev_err(&pdev->dev, "could not acquire device memory\n"); + base = devm_platform_get_and_ioremap_resource(pdev, 0, &mem); + if (IS_ERR(base)) return PTR_ERR(base); - } clk = devm_clk_get_enabled(&pdev->dev, NULL); if (IS_ERR(clk)) { From patchwork Wed Jul 12 06:28:52 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: =?utf-8?b?5p2O5oms6Z+s?= X-Patchwork-Id: 118861 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:a6b2:0:b0:3e4:2afc:c1 with SMTP id c18csp949237vqm; Tue, 11 Jul 2023 23:43:23 -0700 (PDT) X-Google-Smtp-Source: APBJJlFZ44AJfWfZZEi0CM89sjA58m4Ey8HFKwwtAS4kIjpI5WK7bNNvmaQXEpQdyZOd9eVgLXqJ X-Received: by 2002:a05:620a:17a9:b0:765:614a:aa0d with SMTP id ay41-20020a05620a17a900b00765614aaa0dmr19902119qkb.56.1689144203657; Tue, 11 Jul 2023 23:43:23 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1689144203; cv=pass; d=google.com; s=arc-20160816; b=VFegMl+Ut3HoC+qETDT28peZCt81Q6BTbS/5SFkg/B0H5154/tTBCEFw6E1W7R4yfP mPIGNyAVmNMh8m83xb3M6chiwsVa5gJBxdumZoyCmyVccoTF+S1/PPG73wmKaJZwMc/V ED0PRxr/7DFdbXmDFcjsTAYr6lQWNgcSxN3RytEf1AVJjmT/A9VnB+DRDLdAJj5oQS8o hJ3rvtp6gpj5jbMcRrJyZuHa/R3ZlrunUyCLf77n/p1UHLcJtGfTsQ17etIb4HhjT55O CXqL9hD99jv213PYleSJJoDUIr/KJMMNEJqeRJ0iXRytN8ikAkzIhm5JbDFd0MbBT3hW b5RQ== 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=ms9emQaF7GKuxScgT02zxDwxqIVIqWXVhbmRq1X7480=; fh=7/sV52MI2eIx233oDJJfJpQtIOupT5wMUxK7J7B/sYs=; b=TdNEg8BxikE9S4ZHy26cBsMfQ0HJVYYTSNB93jM47YoD/7Bt4thXBmB4+E784gxcgJ g4/o9MbjFZPDZhwbh5y2iUzJkRSyo9nINuL22QF9lkbSM5SQkRG2sZjKcyVfOaPv9Xwv qANZcyv/eGaBF0CKNkjQLt0skd99rZZikVVUW0Q0uAoMr0w6YLLmaSlGxNMMcy+iM8uy P33+6NbpH8sGc5REkxntWAfDKjSfYx8O/pOqfdDHDNTtxX7A+Uh/seCjKJpD45scLzaX 9BPHCkjV77eay7tmi+d2Lk6gM1khfH4y9zMcDgz7frHfLwiSLTnQiaEg48wBWqWvjSDO QKFQ== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@vivo.com header.s=selector2 header.b=A5vmeZoJ; 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: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id i73-20020a639d4c000000b0055387ef9633si2618552pgd.804.2023.07.11.23.43.10; Tue, 11 Jul 2023 23:43:23 -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=A5vmeZoJ; 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 S231368AbjGLGck (ORCPT + 99 others); Wed, 12 Jul 2023 02:32:40 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59316 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231601AbjGLGcF (ORCPT ); Wed, 12 Jul 2023 02:32:05 -0400 Received: from APC01-TYZ-obe.outbound.protection.outlook.com (mail-tyzapc01on2131.outbound.protection.outlook.com [40.107.117.131]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4C68B2736; Tue, 11 Jul 2023 23:31:08 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=l2hyUWuwoT30FVxUOSMCfvYqCCIOmHB0Di1dRBXpC7W/jq2aQwi6kH7/TO7kP6GOK6z80vNPzLFf0PP8FfM5/1FU5IybKFfaewhDHZDZ+t/dY7xwRYL0tsNFdW874FgL7HieZlMsg9j3GGKxaeYmlrLELkcGqB67v+7ykLVR2Rn2XGg+QePW4Bn6CGQt7rtPfFBfsf3i5VNZo77rSTNG/gpPUY011Nt6AV9/Z6jFO/xITiqfKGQhOsg5tg25RZIHCVeNLchk3uaj8FTJQeP0ifMvt4grfYR26YRJvaIi8lqREYA+ZgUBqUIVH7TDvJCNNu71fG48TcSxucN4gki4Dg== 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=ms9emQaF7GKuxScgT02zxDwxqIVIqWXVhbmRq1X7480=; b=MzSmyg6DMn7j5tHsLjq9C7P8YJA0ieUATJUFhZ+7joHvT9zKNApEZdJsSJRpEB2t1lKuoAZ1D43xZ76kgmIn0eiuXJrbm+ad/V2YDXn7HjuAQU4MO2UyKnszGtdxy00FVYF4AUlvTwXD/PQhTeBXsATnFJLezLQ18r7IzVrxKnlUX3YsNk1nsx8iiTTXnl+Kqk8/6onQVAnfkqUZMLgVFdxtBAVQCjD3+EgShVwTq/4BdZaNyTn+ultzdhoPcLUuonOIDHoMqFvbf91/WMTbpbdd/RuIioNTIezZBdYQGJdaibEHIaOCShi2ErG+jY3vOtiSOG4+jWK9yoGNrJMv2g== 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=ms9emQaF7GKuxScgT02zxDwxqIVIqWXVhbmRq1X7480=; b=A5vmeZoJCksxEA5DDALP5VfKm5kSdS8XAg8SHSNJicWaE1mVUejLAFX7mwLBgNKujho8z7kn3TUU1i0eJLMR7PgTsqyHY7u764ue5P6ln1y6hUysxkFWFsPZdZkaoe+LKyEBsIso0PtjiAXJj7Q5Ub3Ef9Z89pGNyyHqAfPM7q3745WGwTKRavZU3wxllu0zrm/+W+jtYUj5fA9ZvUZgd2A09m+K3MSqxcJjrdIlBkO0J73pOVTdLm67wK8G0flZxFqvhwDMEG9Ts2U5WfikMZvWGPpMaysTixKfwezrpfVvXG8WNZKR651+KghjzgcQy6j63dId/COe8xPAzeIwgw== 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 SI2PR06MB3963.apcprd06.prod.outlook.com (2603:1096:4:f2::10) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6565.32; Wed, 12 Jul 2023 06:29: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.028; Wed, 12 Jul 2023 06:29:36 +0000 From: Yangtao Li To: Greg Kroah-Hartman , Jiri Slaby , Shawn Guo , Sascha Hauer , Pengutronix Kernel Team , Fabio Estevam , NXP Linux Team Cc: Yangtao Li , linux-serial@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH 14/15] serial: imx: Use devm_platform_get_and_ioremap_resource() Date: Wed, 12 Jul 2023 14:28:52 +0800 Message-Id: <20230712062853.11007-14-frank.li@vivo.com> X-Mailer: git-send-email 2.39.0 In-Reply-To: <20230712062853.11007-1-frank.li@vivo.com> References: <20230712062853.11007-1-frank.li@vivo.com> X-ClientProxiedBy: SI2PR01CA0024.apcprd01.prod.exchangelabs.com (2603:1096:4:192::20) To SEZPR06MB5269.apcprd06.prod.outlook.com (2603:1096:101:78::6) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: SEZPR06MB5269:EE_|SI2PR06MB3963:EE_ X-MS-Office365-Filtering-Correlation-Id: e5fa0193-dcf8-4bc8-0421-08db82a15ca3 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: rkyKt5ZJTgbCIm46xwAcjeMLBl6CnxR5D30gqzJ+vfEfRN/mEAH7OtMs5tyTEiph2MNs9WUUKy1dkHawYFdpgDV2XgguKCIrKJhZXpb3LnjMCY/Cvt0XELjk8NxkBEnih+JxfIQkVs5NrI7cUX9wT6VD9bBASwJNTWcMfT38daIEl1fndXCysoqH8Zaf+hhZbdXVIBMmQirG8iU7STiiIuIJerUwpO12E0vVzGuJFJFU9SNCt7jiUR9lcANxeEmjAJg7vuN4beyKRKnr2vk1lxDV3dK35Rn38LBum6/wuEP/WRnXhoLy1tRMO7CTx5vykC84dRZ2SYGz1QS0DUMjHJfIRGfd0564IFRrv76OYSUeoeHo2v9ZhFyvlRYR+ayZPrrbc1N83WZnng2gVYQ8e6jwY9bjO+sMGS+kmwyN7+Q03i/Q9iQJIlFkev3TjLRAaliQkVHzmcN7sjfAWYVxdeba2f6GCONDp42noWHORRu+hOu7d4mzoYJ5u8XWfZemxU5A0rT2cJtaHBeNEDv4bDvD4v9XxS2Jjo4bwuAqELBT2mIznp8s0ONx8gIAowT7XeRh+xxk4kSwfngoULtXK29bb0Ulw14Tp/FsqJsHGhQ8C5G4Kx1EAw6JRULW3M1N 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)(346002)(376002)(136003)(366004)(396003)(451199021)(41300700001)(316002)(8676002)(8936002)(6512007)(478600001)(110136005)(52116002)(66476007)(66556008)(6486002)(4326008)(66946007)(83380400001)(1076003)(6506007)(7416002)(6666004)(38100700002)(38350700002)(86362001)(36756003)(2906002)(26005)(5660300002)(2616005)(186003)(4744005);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: SxVptWZIftY1Xff5PKI01JGU24jbp2r8XYS2137sCWsYIwV/cOot5WUoAkpscfKL+DvvE1Aw/+fma8Ytk+qp/G5aI+04KzQrSgB/2qSrl+lSxCUruonk5La94lgseGGEvNAB+Tvctuff5uh9q/ZL9OcLOID/AulWnf/B8/on+Y3iBBYj3vyHura7NOns64xU99BdQTTrQ+6HD5w7LDYq5cld97/zb4D6Dg24ggQ8hrBRDH36vrzcUda7qA6bYPatDsIkp56+cqB//8ZqOxyn8gqR80ak7vpjppCbcmDvTb+OF3KEsL9FHUFloxVTU3k9c62IwGGF7KfBTTDowvGbPhTUW3u05zAZk4FMpTg2OpgENc5OrQ2W7f7Ff2djNMflqzVW3+jjm0Om3vwTrdzQ7eNwVIrCtSf6HS8THZ9CGfHnPt7XxhRFROPQQcF+KuAkGPhagFQ1BAvg7aIH0BfEGkoWJ+y3z/ki7w+lPFSyt2kcbturZFoAOnOJ1z4lxq5xybPPsE1tV7Jn/oP+NS0fxTDtg6WKtjBFIL1iEaBZ0k4rv9NsBXHCtC/Yhifsi6Aa3aLKLlLxKgNOZ6nuaqvfIz4CXOWbgiug57xhl/Xdqs99Gnpkp65cmcsoyZ5USenC0onUbisAZg5TJ+zX+/hxDyzl2NwVgL+wi3CQH5gqzeNHO/L/xD2tx+MWvuI+hndQSN8L/dypJ8VwsXMGBdB3+nEs7A/Dp9ZJ+13Zi8bVEXu3lp33cesV2Ho9QhjgOa9+jcN7dTZoq6Cpf6Ci6T5Z1swdyORKVli8V4R3MS/rf4tBJi0yDbn7xBy/emrGxvFEvpWvT2Tb78nEk/DVXeqj0pTkTG0j9UzwIXJS/LckIvHknlSiCMeMDibe6/dPv4Dic/pJ6j2EG7gDGU/mCUggJLJ1VvXJvqNFchKLfhf5/NenYJ1U2Ttv624/i2YCn7Z3JwGjtPpVlesY/GL0ZFyQxK0JUFk/RhpbuMoG5OLtzurfYCfWrdA2aTqpuIjmJZWTYNXTnRaS0RwQNv9d/47mfmmW7kQ6hdwIzRXVhdSt0WiZRvfzKbW4muh5p3XWiunzlFol/mRYSB/5Z9NMKkqBioB3rIjS9QwyrNGVb5hAGtce0l95fw1/ZwxymJX0BKN2lvTiJTThY3Q2UtFNE8ajHQlxjFG9Lr7uSm8D4EKoLxcw/A19AsoOeBbK2Gl9Dr8V67w+ipXgPgCjMPMMPgCvFwOzcf7rze42DuITd5wiTMCrD8J3fDLAEuFa1W1lyQOU8GhHXWVQ5q+HnH5Vs6iPkms83UYb2aVrW6Gc3eEqPlCpmnce9vJ6Sed7VFgFsg6UbxIPMdLYuakIqd7b1/i3rzl79BPJd3Dk/ylQP7AesGZpU2dj/hNkeraxeW2mwfpdIAAaAe9ifGWddIGrxeaDLeq+j6njQndazJAu0cxcLrc0C8o2n4oysoMORSeTx3NBDb15uBFiNDuZqDGWs2pwBtrHybLk+WiuzNyEjEsr+CRejhJogp77+AuXK4kuu5Q985YGBQMxkvHlTEzb0/g+4O23Nyhhegw3N+lPLmkf5P84pnvrZe/q2NUPCTl4ZcYt X-OriginatorOrg: vivo.com X-MS-Exchange-CrossTenant-Network-Message-Id: e5fa0193-dcf8-4bc8-0421-08db82a15ca3 X-MS-Exchange-CrossTenant-AuthSource: SEZPR06MB5269.apcprd06.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 12 Jul 2023 06:29:36.1036 (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: QTl/a0QEJa1G+ZFWNZOKuLaUm6OhYSovTMfGqut2rHOhG1kqMi1QJwaH1CjFfMnzfBzXhfKiUV4bBZ7lKIntmw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: SI2PR06MB3963 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_BLOCKED, 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 X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1771196072196137680 X-GMAIL-MSGID: 1771196072196137680 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/tty/serial/imx.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/tty/serial/imx.c b/drivers/tty/serial/imx.c index 7341d060f85c..4256bc41cf1b 100644 --- a/drivers/tty/serial/imx.c +++ b/drivers/tty/serial/imx.c @@ -2276,8 +2276,7 @@ static int imx_uart_probe(struct platform_device *pdev) return -EINVAL; } - res = platform_get_resource(pdev, IORESOURCE_MEM, 0); - base = devm_ioremap_resource(&pdev->dev, res); + base = devm_platform_get_and_ioremap_resource(pdev, 0, &res); if (IS_ERR(base)) return PTR_ERR(base); From patchwork Wed Jul 12 06:28:53 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: =?utf-8?b?5p2O5oms6Z+s?= X-Patchwork-Id: 118851 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:a6b2:0:b0:3e4:2afc:c1 with SMTP id c18csp948147vqm; Tue, 11 Jul 2023 23:40:11 -0700 (PDT) X-Google-Smtp-Source: APBJJlH9ZKNd9ftiywJ1nmxD+3nL2hTgmr48Jw6dX830xVTzA2MOddnBc0mI3xWhL3wMRQoxzng1 X-Received: by 2002:a17:907:8d11:b0:96f:8439:6143 with SMTP id tc17-20020a1709078d1100b0096f84396143mr18754775ejc.40.1689144010839; Tue, 11 Jul 2023 23:40:10 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1689144010; cv=pass; d=google.com; s=arc-20160816; b=hiBEinUjqrA3LSFyH0cHAMKzhh1W1IdTMLM0LWCjU9PPzNAS2cuevZN58bH0ZiTxyf Q1WBL5J1266aaj0aF6qY7OX+Zuw7iLwZV8DHZQE7La9Fes9485ygjlTVrnm9U6F+IrXO TtQLUxPepOEVMedm2mdMi03AOAMeaI3fx6o0CHUqQ4QV3SnERiIPBhxpGttZi8DSggyZ W7bEZEYyHtw+nPsBZBeWsZ3jxko7m3mQ09lvjP/Nh1Evnn3gI+5zjGuIMjBGibiy3g/N wV1wjdbqikCobRExJ6GOX+KT39O/SqhtwqbhTMoE0g2X77bhO3NBji38myrW5kPXDz60 xy3A== 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=QKZcowGWkU6nw18hO0sNW75IfqhjK1fOjaTByF99/uo=; fh=orAnxuKrfxqktGSG6elEHLBPGv5VHIzvwjhO8FVIWgI=; b=ld1CVIro34YEcG2J32ChQDm0iz2AFpxsHk/Mon0R4WXTEc0ikudQVfMO2oCyZUZ3ke oxyRMjkvMzJ2RacG2r89TH/W1Z9um7a5ygourjpt2L6rpgN5FIhbp9mkcewVuvS+hQqW a6+z8ZX93p9N+g1z0IWGkBJlyeXDfZdvT7OQRZ/LTPSAjelB2NuFQQz7UqAz3eiS3w4w uzXCLvOSihj5cUiWKLgmG0kvBaSGyIaxzUQHvOFo68cNosNh/Rd2c7u7a2tpmMAGO+Mm aLOz4ZEqEhHJjh6WI2QavWjv2uk9EYa2O71582dOMq/SxTnf1l903E4I3+TmOJW6SAXr jANQ== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@vivo.com header.s=selector2 header.b=UUtUHNbR; 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: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id i2-20020a170906850200b00992f45c9348si3799018ejx.1010.2023.07.11.23.39.46; Tue, 11 Jul 2023 23:40:10 -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=UUtUHNbR; 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 S232014AbjGLGc7 (ORCPT + 99 others); Wed, 12 Jul 2023 02:32:59 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59426 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232127AbjGLGcM (ORCPT ); Wed, 12 Jul 2023 02:32:12 -0400 Received: from APC01-TYZ-obe.outbound.protection.outlook.com (mail-tyzapc01on2106.outbound.protection.outlook.com [40.107.117.106]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0507C268C; Tue, 11 Jul 2023 23:31:16 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=dtoX9bL3grk4AUnz/dMNRXAkQihxOLK6ktHamwhj5Q/pxbP6ITdxWpVAqXzJEwndUruyyMHM2FZyAh8f2D0a3T5y/NwQD24vmLxPj/iYE+YH7gc+sg1CMHWIRypZxoRUt8C6voHeFzozgpUoz9MMxehJ4HgLoE81+icoa3MhD4iYPqIbKtRafwnocz/auWCUNX+FCINxF9N2+BWlTtD8/gLHKqhnzC6HLfCHF+x1epfheMlwkwQ/T3DDcROsf9i9quCmHN/awhd7PHGMi+TPZn1Pvw9gPKxKDzKY5Ag8SOEtq9AF7+b1cqSjIu0PeQceTkJDoOj0spgARn2IWMMmlw== 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=QKZcowGWkU6nw18hO0sNW75IfqhjK1fOjaTByF99/uo=; b=l8onTcwQ8K80bzPAWbWFE4dMnSGA39LCG0NSkwtqcE7gAeBng5boRz9X8aWHSQLK+JvcKf4LQBxW/ypbW4NehahjXTZTG87GI9+lULkCC+kfzZEICMgsJ0+bUbFYxXAbQgiujr1fJAqFmPhL1ZKL/70tHSCBGzXHLO45MNpKmghLZLQ4OXR6vKcDaGqOftBLcFhyEhKje1U6X8P1+i/yhOvUwsJFLq4Meev28fT++7kVqeaj1WzpsNTQxuBHLpKiKQwWXrXN9QVDtwd3VyCaCTTx3UQ+acX7v/ox9FzGZc/30TpktBPY8wX2xh0e5LnxAYA9ok1yBGo5CIZCp9N2DA== 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=QKZcowGWkU6nw18hO0sNW75IfqhjK1fOjaTByF99/uo=; b=UUtUHNbRfwlyQVSiOUGN2SCexqv3UczIT5bvmThObFmzjLBB/aENZnKgHtTN+dPOVfcLUVwML8YVO7RkWs9eFkChoiMwxhMvwZ8V3c+QmqW/6JiIU1iUBwBjv7vr2v2A06r1mwCmZNLpcchy49DCtcbeph1H7PAl/B5JsDMl1LDWFvrbR4/RVH6wlJ9PPWv2QHbHtVeNl+9f6rbBwsE9b9ceW+4vBawutvwjWZ8eVCTAQLLoQLvPnxtKdq1c27F7KmfCB9Zhp6WO7E2u5Z9HbjLbO9czeZrMFAwEs1awsmRKBQBDKMeuRqj21v9iqzrkJ9IwExWMYJgz5gkeNIxk2g== 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 SI2PR06MB3963.apcprd06.prod.outlook.com (2603:1096:4:f2::10) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6565.32; Wed, 12 Jul 2023 06:29: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.028; Wed, 12 Jul 2023 06:29:38 +0000 From: Yangtao Li To: Patrice Chotard , Greg Kroah-Hartman , Jiri Slaby Cc: Yangtao Li , linux-arm-kernel@lists.infradead.org, linux-serial@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 15/15] serial: st-asc: Use devm_platform_get_and_ioremap_resource() Date: Wed, 12 Jul 2023 14:28:53 +0800 Message-Id: <20230712062853.11007-15-frank.li@vivo.com> X-Mailer: git-send-email 2.39.0 In-Reply-To: <20230712062853.11007-1-frank.li@vivo.com> References: <20230712062853.11007-1-frank.li@vivo.com> X-ClientProxiedBy: SI2PR01CA0024.apcprd01.prod.exchangelabs.com (2603:1096:4:192::20) To SEZPR06MB5269.apcprd06.prod.outlook.com (2603:1096:101:78::6) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: SEZPR06MB5269:EE_|SI2PR06MB3963:EE_ X-MS-Office365-Filtering-Correlation-Id: 9f3b8244-ed3b-4495-8186-08db82a15df5 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: yxGNQcfkzdzh5/RqTOXdkNvSrSDNbxJ6ML3+aJk1CSq8sexB9i3RHQ29iP58vvHRHjFPnf/fxnsyFOOo8qD25vzg2+HS2OjwWOO8vAbWS/LfG+H6x7vvzrNG58zxLBJR7UmVaysJQWqcMAWWtjfE62ch3lw9GLD3UoF+2AXSzt38ekl6Em234ByYLRfbvs3apc7hTn8uV2HL7vbGPLBrfiRNBOCDQ2pzb+H+/45vIQwI40da2IzSkdUOhJDAsZRKGdOMFfH5MY6a9Col6t5WUqa8FmhgA6cGXyYoLmG/ySATIwlsOVkmhtPQTdcoZBOLDkrg0tqV9YPcO0PMwdYKhtW4ck/18VQGYyINfmXK5GMZrK9CyZtJlHcmwRzsiyVRxqtmppoSLaEiryX0BLXTl79nL4SZSvuXrpoqrurGQohu7ehE8MwIMjgP0g35vnIyydktuo7ePuyysqo1NdllOSxCReKPsrnhVHZFCv7GkZw1SxQPSvjHZD6wvzodsqBh0nAaCgB8Hee74Sd9rUy4b3HsU66ybFrUiOgXzdRhsHt/pqOWCQwqFYc1Ct/mWsTP+Ncz8wXPw8ilEQzUAzT/kq2tcd4GgZaYJ70LZKdqUrDvayxWCjD+8nFM0YrCXtYT 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)(346002)(376002)(136003)(366004)(396003)(451199021)(41300700001)(316002)(8676002)(8936002)(6512007)(478600001)(110136005)(52116002)(66476007)(66556008)(6486002)(4326008)(66946007)(83380400001)(1076003)(6506007)(6666004)(38100700002)(38350700002)(86362001)(36756003)(2906002)(26005)(5660300002)(2616005)(186003)(4744005);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: q5WHCByYiaD0HH/Rmzc631joEWzVtmwuQBFC4Mduz6tFxt6o1a8Kv1aJVZY+5Y5GUDtuT3zw50108pK3JshIvhcNujDbTr1sit0VqYcRBiHr4bMdlbraBKsV+TiAn5dMcPXXCNu+m/tAaGPLgE/wLXqfyfzLwwQm//C7b0bTEo0EJFdHRV6f6O9f2coNG2ZTDPFcqY7LUMEMEn4JC/K7uRvZr5ifJZmR00NBT4+igUatl/JYCf3KQzhKYrYuXgGyvNVZOBEo1xyMB+RjQfFndU2p4vdxytMFSzwMAMzuHb0gYTn9rC24+cnKLsLwIaPFAszyI7q5ukFOXKQ78+bGMKW7r6IQ58nlGmeHdrSzWQpdG5+Wx50o5a3XVdlj7v4tFqEr/eQkHWEiY8O0Gdxk5nQGj+Zzu3SHATkiPVajAMphcxFHXcB/Rvb8WhcN4pEzC4cqFWFdq2x3uVeOGSjmnAIhqwIcnn0skSRxd29XUNBp8mVSUyW61Wkje4LxSuWbGzcbLwqC3BkbvT7a6Y+6JiuUZUPjYcHPEYs/yBGj9+s2rdobE19fuP9WS8eXPzjWYTB3cj+/THoENmPYC5ZdgjqojO67GZb1u5kpvZXmpcbsaqDuFWFWv1lDNNeQvlhbc/+eSYMnoxXpa134LVu4DQPzfWWVyDmX5s5mbmsiJIUq6x0td9cIIMLNzjb8pAf8LjVKLAkcfcUeG0ugOxCpaCobO+URkLkEkQZNSe58DKV9bZ2IJl6LKfgL7blxmG/DRHuGpwnD6DuRKmcfA3v+yn+XBk0wdg8uHSPGM/U8tfkU1Qtipqpmw7X0rtddBSLGaxTk+gFkgW1f9WPz6HkpQOc0VbhefyyPMbb2zH5tQAzsAbh4e46ojjq4Un+q7DQawiYWos/An7F4pD2fR/XmAKVUhhpHELEzEUuiBEx8+BBJQtCWV7Np18nH9OAkjBcNcsEe6yQkYFzXNxoHidXQxDRZHc3KMN2ThLJyocu4QjngOSJM37To6UrlyGqNRXgSIGx7vtMOvG2cnm0fFqpdxdKpbPAW+j6QCdSD9rakocoTSJeiq8Pf6QB5afk5BU0TuPTikjU7SXcT+VPhGf89hBSyq463ME5SNSG5RSTFch8VeoT4mH5c3RxC6+0PZuE01MFVKLCSw4qGyohTfb3ixSxhjQES+uf8retVkoAIdaVttxrvV3f5duYiG6nHJBaI2A4uL4rQKY+Hv+4DmTY3lLgqMuZ0810fYayrjITBvSI+xOEvNySuvCgQeSD/5431qqzmqW99nDuUxBzCqt98O7Z2k7ii80qewO7TXpaZ/jTp2/ru7RofC0H3U4O3GJKPn8qivjUinyFKj7lt+fbzwmWSSHFr9vhH/CprvEBwzyf7ezkoHxqsv06knxDfbbGxS2rQbNBtLb0CZSii4vQkTmELPGrjrwl67JmLJE+c7uKQl9XutIq77etv2tC2vB0gmVqGYFVtA6ZbmSq/Pz4RU1gFmyRU2kf5xeyGFmZBRWIwNJsC4vFNxvJsH2RzU3ETGYlOBN5c+SDFiNiIrZotl8ivp9q3QOUcarUo7OFldjgmdRlLdYnaYpZ7YUP0VZ7l X-OriginatorOrg: vivo.com X-MS-Exchange-CrossTenant-Network-Message-Id: 9f3b8244-ed3b-4495-8186-08db82a15df5 X-MS-Exchange-CrossTenant-AuthSource: SEZPR06MB5269.apcprd06.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 12 Jul 2023 06:29:38.3096 (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: MVOvTlKsY532beJT3bhfMXZBIYqA2jWcIdgmYXWGZbH0zMb6FnBZG/7T9xjZQx00lwNCLgeLEQJihDte1QW7YA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: SI2PR06MB3963 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_BLOCKED, 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 X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1771195870640306125 X-GMAIL-MSGID: 1771195870640306125 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/tty/serial/st-asc.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/tty/serial/st-asc.c b/drivers/tty/serial/st-asc.c index aa471c9c24d9..4d3b74e48546 100644 --- a/drivers/tty/serial/st-asc.c +++ b/drivers/tty/serial/st-asc.c @@ -691,8 +691,7 @@ static int asc_init_port(struct asc_port *ascport, port->irq = platform_get_irq(pdev, 0); port->has_sysrq = IS_ENABLED(CONFIG_SERIAL_ST_ASC_CONSOLE); - res = platform_get_resource(pdev, IORESOURCE_MEM, 0); - port->membase = devm_ioremap_resource(&pdev->dev, res); + port->membase = devm_platform_get_and_ioremap_resource(pdev, 0, &res); if (IS_ERR(port->membase)) return PTR_ERR(port->membase); port->mapbase = res->start;