From patchwork Mon Jul 10 02:45: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: 117560 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:9f45:0:b0:3ea:f831:8777 with SMTP id v5csp4743418vqx; Sun, 9 Jul 2023 20:10:35 -0700 (PDT) X-Google-Smtp-Source: APBJJlH6iLDLVSUonKtalYVUu3D6HmMplKPigjvt4qvkDFmlrzXPaT1cRGJePx8vl739id0cyYlG X-Received: by 2002:a05:6358:249b:b0:135:253d:e994 with SMTP id m27-20020a056358249b00b00135253de994mr10013894rwc.29.1688958635365; Sun, 09 Jul 2023 20:10:35 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1688958635; cv=pass; d=google.com; s=arc-20160816; b=fQ8n4a64f5toJVds5Vm3OvhEkGTso7Oa5amR04tPbvhnSAqUzHZftbD1Bs7eDzzDYR dOpSfwBRROzeFlS31qOJ+rCB9I+Q95pgWxU6j0T/RGNHyseCtj7O70iAVsIEs16r+YCl Wna6A9jV4Z+U+Qnt6nYpmAueJd7Tdpb6yAsF7eiFA0VLZ+8KJnz+3ZS/rZoobuYVvs+w VZRzUb6cl4BcPLZzVdnNTGZsfZ0YqcscGRDZ+J4C7CcYWpY8+idrNj61bUAPqWLdxrWV WkSylmP4AhhFhPhYpfNHdnNXpogtRgro8JKb/VjTHcbfcvTZzAXZ7nu7GCXAp3d/fRR1 96sw== 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=4I/mwc09ffvaDEMugdzolQ1SUKOTSVAVCt8sK8ABcJk=; fh=vr4PVV210g1zrLNsh1xSQdTce3UD/Dr8XasFzuJIwB4=; b=dhxk8ABxV3/04FBMZGBydaXT1qMA2TiI+Z/ZDSgQkR9m4Oe8NtvXT7m+lnGTLvdhq/ HcLFvWgeog03xegoqEYkf4ayTOKHILSyiBJvo9ylpuu8Heu0TX7exYY4kKA0LQjiAuZF Gdmy8kr+F9YU05+BeYgvJcZlCIZ+3rKGBUngV/RmXpt0u5LnMDbKqIlCZGOJdfeP93DE N8fdGLb2cRPYfw49eZMZYwzq6Srn5ufQLE+rrlHdmUTj1yrAubjkXw6J2jE2ckUizHFV nrcRPW0vbjkdG7EmGxrjcn/MyUHd+nWO+acxPr8t7CdaIjjyHafMser3ln20D0IToIBl jMTg== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@vivo.com header.s=selector2 header.b=Yj6BTk7j; 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 eh12-20020a056a00808c00b00680252dda3csi8156335pfb.87.2023.07.09.20.10.22; Sun, 09 Jul 2023 20:10:35 -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=Yj6BTk7j; 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 S229795AbjGJCrk (ORCPT + 99 others); Sun, 9 Jul 2023 22:47:40 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44408 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229983AbjGJCri (ORCPT ); Sun, 9 Jul 2023 22:47:38 -0400 Received: from APC01-SG2-obe.outbound.protection.outlook.com (mail-sgaapc01on2097.outbound.protection.outlook.com [40.107.215.97]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5B239E48; Sun, 9 Jul 2023 19:47:04 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=YEaHVHxxxmNBr9ONKUqTr65+y0rVjdRJE2/2r07fK/6D2kSV4TmLPzZiaNbylFIr71lFOx6c1uGGFKl8yT+2lOengRw2u+ga2cPozjMT1lQI3SfMCVumgbMhuaZNJx4w3LCC3AbXsY2OxL2bGoGB/J//NXT0C+uwVmW15SvTDeTN3rnVbIOJds/0xiE9cRqmtG6Xhfsd/Fg3NAQuyTvBXyTzFPPdmao/kWCZqE8mk/R1jbLWEpDusAVP+yDMe8yqIJxSLWDgCg8jr2liSpY6+C9uOfYm+VtA04UzEl2qjuG0mu8unZZPsjtkE1mLC4KzDEmdcUAECmz4f8XjyKKJ4g== 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=4I/mwc09ffvaDEMugdzolQ1SUKOTSVAVCt8sK8ABcJk=; b=oVZ61gKBCZ9BSKV+P6huiCkP/GWItxPgpC7Ap3tBPCl8uOejLE1vQ2XwnlQp/AO27r0gJDHoI+w5TqrjHG2KU+E+GYLjzU0f1LfHSwsRHzhIWe5Ox3/ddy5RQ9GNm6nqffeL0EX7Vy4W8l0Vqpy6PCJxTRa1KB1Iy6PNjDnIzxDEYpGz80KpqjPajeMVk9DX169Q80xzHNogb7PVD79JbUx7SvTV5VTj0fDr6EKIqvPb6QdyYhxHxjKIcF4Hw5keoImeqY02G8yCSjenvbkhhOguCh0rqRxNw9Gm6Lw6K+9p8sLON9moTa8/667QYfJPQwMY3BI7x6m3t94i2WbFgw== 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=4I/mwc09ffvaDEMugdzolQ1SUKOTSVAVCt8sK8ABcJk=; b=Yj6BTk7jO4UUZ1SBwrjqa0jSE/4T/N1l39zppIoGwsJdE0/MFiwrtFZTqOxIvPvVWqL5hUsd0C8kwgZh9hr8n0QS/alXZ1BeXSnAbNT31Ur40kOfXQBYJU/XQ6JA5m1vUPliiiwlHzrd/T+YVaIQBAcQM0RwAcDK2OzTZbogaiiMUAM36ue/PopvPkfY3+ga1jcFsL+l5IjEdfm1OpZBG198Bnmfej60gWtuONMROAb4bNVdL3k8fRGzJJUEleQ7KRhJhEOt1gXbJ/BlnW9jFPiTE8Ao2eD/nSZOsnN+B2W+Gi0gS8x4sA3bG04l7B0eVkICbdMlJlmBtu5DguutAg== 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 KL1PR0601MB4273.apcprd06.prod.outlook.com (2603:1096:820:64::12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6565.30; Mon, 10 Jul 2023 02:46: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; Mon, 10 Jul 2023 02:46:23 +0000 From: Yangtao Li To: Sergey Shtylyov , Linus Walleij , Damien Le Moal Cc: Yangtao Li , linux-ide@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH v3 10/11] ata: pata_ftide010: Use devm_platform_get_and_ioremap_resource() Date: Mon, 10 Jul 2023 10:45:49 +0800 Message-Id: <20230710024550.59544-10-frank.li@vivo.com> X-Mailer: git-send-email 2.39.0 In-Reply-To: <20230710024550.59544-1-frank.li@vivo.com> References: <20230710024550.59544-1-frank.li@vivo.com> X-ClientProxiedBy: SG2PR03CA0100.apcprd03.prod.outlook.com (2603:1096:4:7c::28) To SEZPR06MB5269.apcprd06.prod.outlook.com (2603:1096:101:78::6) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: SEZPR06MB5269:EE_|KL1PR0601MB4273:EE_ X-MS-Office365-Filtering-Correlation-Id: b57c2a51-70c6-4482-7900-08db80efd8f5 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: Hw/MPZGwlIIcRyUm6jVw4j2JV7wBl9z+FD5fadjQyn9x8iGUs27zsrIML5y+RLjNv0vtfgyI3hY/Sw41uNE0esxrhB3zZoSIUwKOOlS8Sm6nb6yOL8/uLg7G/lMI5r0/3rkoswVXW4aVOZW1gZ0L9U8SZuxNYJln/Ae6vncR7t4Iw8/ngM+w1a7OHpg9rpRSS4CogYs1JQgzzZSZ5bYXq7COEevTcVT5MrYDqN1zXJGnI2XNmOkbXpeyPzILaAQeEeSotJx3bCSodKWEHwq3Bq3FfTETmB+wBImmQ9Hjx0jUzkEVKzVkrnMQyeX6wFLnxnH9mwHAxwZcQZNY353TWKvyD5/uUAgYcb9RtYxbvYl58Ke68109/jX+NJXk6EPjG2bcxT7GI5ydCu9UNiIe74MH9FZor4kQ6rT4URVsyF+11ynVk7/w4GL2uh3LI6G60KuH50BWUSAV7yhmhvlzbgIIWTBozJo6znb03OViy0Emygv0IOQjUPOI+q+LbD6NHMZgKzWnBsFZvkP5nXttGF+DrkHqaJUza3TRVFbF18cP/3HIEYBXAS3x85pl1VUcrkvqXQghPBtd2ofKUNGZk34CSy83B48+jJC8RSSsTaWcTSHi/flOIFvMwIze5xoO 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)(136003)(376002)(366004)(396003)(451199021)(186003)(6506007)(26005)(2616005)(6512007)(1076003)(83380400001)(4744005)(41300700001)(4326008)(2906002)(66556008)(316002)(5660300002)(8676002)(8936002)(66476007)(478600001)(66946007)(6486002)(52116002)(6666004)(110136005)(36756003)(86362001)(38350700002)(38100700002);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: KzKzTxcF7ttAOrcdvphLDBIMcYvX48+ZeRl8FDLPEfW8/qYi42+Ptfcjhe+yq56WTZhLoW1AHRktsIXxpH6rLcZn4LON0RpuHztJ5a/cwP9WLr6a5lfTI15yKFyDAH6E8A70oY0Mrt6f/WQG3t3Tgt6vm/rL0FbxYOcKBL91rAhMfHKF3HIf0UajHGEMO0VQqhoz05HUqcjs7HKWSINsw5AuzwHR5KxAdgcLu5bob8ZK+P9yUmcd2w4kXXSxf90WnA3nX0TEM2VU2xT8J5LsNuJbM5sm684pyO5PjfJR3FUO0l6T+EgURU8smUnSbDuCyfujP/a9uqoortFS3PP8pEBLQO8Ju+iLMN5HcXjfGf3nfKy5QXlOPA1rgFzA5Y167UDizVOV5QSYwiAl1etAKj8O8JTzgo49BN4f/u/cbvuyP762Bsw5rPjer2LedCwrfno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97/6AoZvAYuu08YVgubqRYDf7uEaC5OXnm8lD4oPF1gRBmqL1pAjLPIZBhkgZZ1WlHNB50aq6vIMXlg2pubDCrbAK X-OriginatorOrg: vivo.com X-MS-Exchange-CrossTenant-Network-Message-Id: b57c2a51-70c6-4482-7900-08db80efd8f5 X-MS-Exchange-CrossTenant-AuthSource: SEZPR06MB5269.apcprd06.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 10 Jul 2023 02:46:23.0588 (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: 8MwSnWeMNi8lvcjG28nuAKgPsj3rY/ybTRhOozHg2oHfRu1g4fLtL+8P3DqgEjBUGtskldJ17MRc8A82u63P2g== X-MS-Exchange-Transport-CrossTenantHeadersStamped: KL1PR0601MB4273 X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2,SPF_HELO_PASS,SPF_PASS,T_SCC_BODY_TEXT_LINE 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: 1771001489879826262 X-GMAIL-MSGID: 1771001489879826262 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 Reviewed-by: Linus Walleij Reviewed-by: Sergey Shtylyov --- drivers/ata/pata_ftide010.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/drivers/ata/pata_ftide010.c b/drivers/ata/pata_ftide010.c index 6f6734c09b11..c6f60f1a908f 100644 --- a/drivers/ata/pata_ftide010.c +++ b/drivers/ata/pata_ftide010.c @@ -470,11 +470,7 @@ static int pata_ftide010_probe(struct platform_device *pdev) if (irq < 0) return irq; - res = platform_get_resource(pdev, IORESOURCE_MEM, 0); - if (!res) - return -ENODEV; - - ftide->base = devm_ioremap_resource(dev, res); + ftide->base = devm_platform_get_and_ioremap_resource(pdev, 0, &res); if (IS_ERR(ftide->base)) return PTR_ERR(ftide->base);