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/c8ld35PGGB4A21W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9rtDOpidwphfU3Q03FKDaLxiu468f2JVKH03usgzvbz5b4HKdTNgzfzBcIKMrRkCJn61l3TimlQl2L0 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)