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: 702686 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 333CAEB64DA for ; Wed, 12 Jul 2023 06:29:22 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232014AbjGLG3V (ORCPT ); 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+Sz6m1Kbn8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wIxhXr2Lb6WL55C0G0G0MIDaGb/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 Precedence: bulk List-ID: X-Mailing-List: linux-serial@vger.kernel.org Convert platform_get_resource(), devm_ioremap_resource() to a single call to devm_platform_get_and_ioremap_resource(), as this is exactly what this function does. Signed-off-by: Yangtao Li --- drivers/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: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: 702685 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 3BF08EB64D9 for ; Wed, 12 Jul 2023 06:29:27 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232091AbjGLG3Z (ORCPT ); Wed, 12 Jul 2023 02:29:25 -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 Precedence: bulk List-ID: X-Mailing-List: linux-serial@vger.kernel.org Convert platform_get_resource(), devm_ioremap_resource() to a single call to devm_platform_get_and_ioremap_resource(), as this is exactly what this function does. Signed-off-by: Yangtao Li --- drivers/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: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: 702684 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 4D119EB64D9 for ; Wed, 12 Jul 2023 06:29:53 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232167AbjGLG3v (ORCPT ); Wed, 12 Jul 2023 02:29:51 -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+HPR1VoJo9PKj7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nK9JBgHsw3dKeKfRWflcKrAffSo32armxdpwYuK9BxXIw1OZSqEDHMt7B4I7jkv2fYOLPINO 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 Precedence: bulk List-ID: X-Mailing-List: linux-serial@vger.kernel.org Convert platform_get_resource(), devm_ioremap_resource() to a single call to devm_platform_get_and_ioremap_resource(), as this is exactly what this function does. Signed-off-by: Yangtao Li --- drivers/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: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: 702683 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id A8117EB64D9 for ; Wed, 12 Jul 2023 06:30:50 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232224AbjGLGas (ORCPT ); Wed, 12 Jul 2023 02:30:48 -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/3PaWmoloPc2Y4uGpjufPMthodUEoiTO31MTlXMizTcPIefsXCbGfXdpT7wrmtAZsEMZ8ywkx5I3KDL74iN25wDoPigLyNzGNZO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PPx2sg5+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 Precedence: bulk List-ID: X-Mailing-List: linux-serial@vger.kernel.org Convert platform_get_resource(), devm_ioremap_resource() to a single call to devm_platform_get_and_ioremap_resource(), as this is exactly what this function does. Signed-off-by: Yangtao Li --- drivers/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: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: 702682 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 15F05EB64DA for ; Wed, 12 Jul 2023 06:31:27 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232225AbjGLGbY (ORCPT ); Wed, 12 Jul 2023 02:31:24 -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 Precedence: bulk List-ID: X-Mailing-List: linux-serial@vger.kernel.org Convert platform_get_resource(), devm_ioremap_resource() to a single call to devm_platform_get_and_ioremap_resource(), as this is exactly what this function does. Signed-off-by: Yangtao Li --- drivers/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: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: 702681 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 71E84EB64DD for ; Wed, 12 Jul 2023 06:32:29 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230472AbjGLGb6 (ORCPT ); Wed, 12 Jul 2023 02:31:58 -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+eEPnQkEpiviDzje7qCRVclx0FxbnK01hz8tO8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-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 Precedence: bulk List-ID: X-Mailing-List: linux-serial@vger.kernel.org Convert platform_get_resource(), devm_ioremap_resource() to a single call to devm_platform_get_and_ioremap_resource(), as this is exactly what this function does. Signed-off-by: Yangtao Li --- drivers/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: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: 702680 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 8B9ADC001DF for ; Wed, 12 Jul 2023 06:32:33 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230431AbjGLGcb (ORCPT ); Wed, 12 Jul 2023 02:32:31 -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)(4744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k/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 Precedence: bulk List-ID: X-Mailing-List: linux-serial@vger.kernel.org Convert platform_get_resource(), devm_ioremap_resource() to a single call to devm_platform_get_and_ioremap_resource(), as this is exactly what this function does. Signed-off-by: Yangtao Li --- drivers/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);