Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp31698795rwd; Fri, 7 Jul 2023 03:12:10 -0700 (PDT) X-Google-Smtp-Source: APBJJlGTPsunvRd5NGRxKnE3pVWueCbGaycF5jyX9CKs1bB3Cp8mQEJnoHFRKSoz1qd/Zt3pmHqG X-Received: by 2002:a05:6a00:14ce:b0:668:8b43:8ded with SMTP id w14-20020a056a0014ce00b006688b438dedmr5753489pfu.26.1688724729934; Fri, 07 Jul 2023 03:12:09 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1688724729; cv=pass; d=google.com; s=arc-20160816; b=ljKkwiaz6fgm7UsQYkST/IBWeyxIi3eYOcsb0vo2niJSsGNLnWItY+Fn101EuY6Ysq U53eQGXMA+y7asvoonTvXRjwVxrQ/1bL0vb4pJLp4e63IuI2N7CFuETx9WPtQoAQccaq M+evyGbyNkBq6phVNvU9JuMbY6BZTn14th17bOhbMnMJO35F+IAN7QbVITv3jc+KYgbJ 0wFKQNKa9m18g4trFpynlX3J8sFEUQ1yHgAv+6n1yBAFzFlq49Kqc8YsC4PfEihRLKvD PpeMWKDCn38OIpNCwfe7l5nEj2zlFKAT69i6WQy/ijCfHn42zc60BCL6xONt6C2N545+ Lihw== 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=vtXrkZc6lrarwnwxiKvSo2UKZJon4pdysOPyLWTj4AA=; b=ICzTLgbGvT5HJv1jplxifRQ5nyr2Q9/az4rQvZqcDIKDrg1t3Q+V/XmF1O2VKXOVtP F6Kexa3LkJaPGAAiEmtU1ldeV7kVG8BUe6ZXa9VeN95KGI48DHOZC41Ohbs4z26WdXYu R6YJsmgEjGUJtuE7WySrb1f13M2qUO36DfvLnXs6++Y6i5XckkRWHNFsyQU2zfNXXwsu P1ywBzL5LKl/2uq9LOnL+PUv0Vcsgz+0hDwVtPxyx16xkNqLUydVfvUnDAwHKXKlfsSk dDmliOXLORgciT53dKZqDnQCQaWl/brjFZrxObCeTTY5bi7eePy5LHolBzXORuog4B5C dKnQ== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@vivo.com header.s=selector2 header.b=ZIX6TFcz; arc=pass (i=1 spf=pass spfdomain=vivo.com dkim=pass dkdomain=vivo.com dmarc=pass fromdomain=vivo.com); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=vivo.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id e186-20020a6369c3000000b0055b4c11043asi3410488pgc.875.2023.07.07.03.11.55; Fri, 07 Jul 2023 03:12:09 -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=ZIX6TFcz; 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 S233115AbjGGJ4q (ORCPT + 99 others); Fri, 7 Jul 2023 05:56:46 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33716 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232900AbjGGJzr (ORCPT ); Fri, 7 Jul 2023 05:55:47 -0400 Received: from APC01-PSA-obe.outbound.protection.outlook.com (mail-psaapc01on2138.outbound.protection.outlook.com [40.107.255.138]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 165BD1BEE; Fri, 7 Jul 2023 02:55:46 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=AP4wlFeaQEgQRMXw+XwPZMtmXy2jF8B0elKC1LOvaapDDfVML3ur6sJZiYSmv13iEORMeU5aer/Ho5PsMlNe3iuCwSMhPyC+31UGS02LKqe+8JlHbz+WdshqagrRe/OsVL77J9KdiQ7JIVazWlenJWQ85/WLn8hlcv+Qa4GCr7hi+OfvfkxZDSDjd5+msI5LZb0TB1lj/X1Z0IQdIaUEV9yEx0hRUW47HQMYkDqMbxAe8OfMELezfDhHvX62mjXy2Gr81sfA+kBGcVMGpXDDuc386QeVJBzlENrDr/L+UfMlQHG9gTOydc35ErQRu/MJqDL8IQSkHN9tDxOnBIrIKQ== 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=ICHZYMQseO4lxBmQuwHXwJn2R2XViTapafBzSSu4k9ObP9GOqxXodAdoZKFeNd0+eqIHDld0TP035CuDtLLtNlzerrI0vwAbQx6TszMJvowiMuhs1XD7V0HnVFROQCOe5LEfqVOnBeUnIWCTNHCSerE5sP28Vujhqef2tCELmjpBUfr+fDwKHcw2lZDi3l+GdigAxZCFGZdbT3bJLmNLUWuTRAmQNTvx7VWEL3vsMD2yZ3WhkLu75Q0SMGSQjUWkU47aVkHza4WadaHkgXGu7OCU4aLgDqj0mQMUaOqEL7+RjEMSWtvq1UYO8Mag9vTosWEHAaqJVkObD87xepOSOg== 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=ZIX6TFczR24druyIV35b3mEbbfomss3F/OHu3SOmQdW6dLmBJ9Tll7u72+FwmNHaQdQnICDJLna0RD5v1U8d3S8S7fKG8kU7fLFlQSCIItTU3YO44KerHbg/mT0hsDbJ2Rzojm6RZiPxsI3uKo8UX9hwOz1L6U3aE/r4INQ9MjBDxmP9QS4eE4z/q2/m2L2bJJ0X1Gfy5KMw9Yn5UI+EdCgCrZ5qoVXynfeMNinnuUzYVdA4jBKctA1JlPLokKxSGpqqfJWVm6vrhoGuQUQO8jKyHu4BQ6j0px4PaTRrECwbXYZaWwY2eECjPAz26/4HOKNOZJ1iE4UD1AnqGOGF9Q== 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 KL1PR0601MB4356.apcprd06.prod.outlook.com (2603:1096:820:6d::12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6565.17; Fri, 7 Jul 2023 09:55:43 +0000 Received: from SEZPR06MB5269.apcprd06.prod.outlook.com ([fe80::fa0e:6c06:7474:285c]) by SEZPR06MB5269.apcprd06.prod.outlook.com ([fe80::fa0e:6c06:7474:285c%5]) with mapi id 15.20.6565.025; Fri, 7 Jul 2023 09:55:43 +0000 From: Yangtao Li To: Linus Walleij , Sergey Shtylyov , Damien Le Moal Cc: Yangtao Li , linux-ide@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH v2 10/11] ata: pata_ftide010: Use devm_platform_get_and_ioremap_resource() Date: Fri, 7 Jul 2023 17:55:12 +0800 Message-Id: <20230707095513.64224-10-frank.li@vivo.com> X-Mailer: git-send-email 2.39.0 In-Reply-To: <20230707095513.64224-1-frank.li@vivo.com> References: <20230707095513.64224-1-frank.li@vivo.com> Content-Transfer-Encoding: 8bit Content-Type: text/plain X-ClientProxiedBy: SI2P153CA0004.APCP153.PROD.OUTLOOK.COM (2603:1096:4:140::23) To SEZPR06MB5269.apcprd06.prod.outlook.com (2603:1096:101:78::6) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: SEZPR06MB5269:EE_|KL1PR0601MB4356:EE_ X-MS-Office365-Filtering-Correlation-Id: fd5b9101-9910-4918-c655-08db7ed05404 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: NyCgdGGFUEdL/7bSwxJ61PnkC4FdB09CaQAscC0MH0b64GFUc7jAQEKuv24pHziRQ25yh0BPKeMIQPG7xNvXLmn1o0DLmJzCW8uk8+RjMtcDV0TdXv38POC/CcQIhWxyX+BEhf6E2ZLIhFgGpH6Po5JEBVak1PcYBvv0ER2Ljuh92nuRLHq1AeG9zrbgqUflBHD711IgIt/bq3MfAAkqci/fenyHpwkxG9hfHHDno0yMZTS4PMjsZYGf+4IrzJxvra8PUYDQ6i8/D2QzHOk7zGXyaXDZE7O7DB1yhWmNgAYzPvRkrsvmZhcs2t5k+xV8ko69p0rGajuwOJiWtLucPdnvr+4SFPzviHSuVqTGi2tl7LDL1RN0V74utydtDB+MPSotGSUhE4rUnZE1FsCq5e8n+YAnJ42cIUExQ4pSZ4WTTogRchxnZask+B4gzwkFf1niUDhjWdSh9pUWCMMAjcvjECVkEVXybZ2kRRaCfFhGQLocM8rpOV4IjSZZIrUezxcc6If/fdv7jxeequHZDEnIsNEpT/+JSo61tZweZt77FI03WvHXoDN44nNvh58jvwrOvXUjtQzhXxx5CMJ0RxwUlrGOt1ZZTWU1ja3+CP4gy9CedQ/F+0qJV/O8UJh0 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)(136003)(39860400002)(346002)(376002)(396003)(451199021)(38350700002)(38100700002)(2616005)(186003)(6506007)(26005)(4744005)(41300700001)(8936002)(5660300002)(66476007)(6486002)(2906002)(52116002)(36756003)(86362001)(110136005)(316002)(66946007)(1076003)(6666004)(6512007)(478600001)(83380400001)(66556008)(4326008)(8676002);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?us-ascii?Q?BZnLIyZS3VmgKygfbRcw1nU/MXyQkb6rDU4jp+if0N1KWcRyJ6qA9Bm6Qvmu?= =?us-ascii?Q?q1hFIywElzPwr9IObdK+Xo7w6hy15ZZpbbrh8qHjai0V0hc9lnFKzGyEMP4e?= =?us-ascii?Q?pnAzkRznWrFFKuuz5zOUJsz13VLAs5psJr8ARlACDlnSJhoQQ1SxMaR52YOE?= =?us-ascii?Q?aZHDJyQUjDOn5pEmSnhe+X54hnTkNmjf3dDSbORZ3IdyfPMsSaVtjERqkjOU?= =?us-ascii?Q?ml+k/+kg2AFqLPs1EIRAKJcE7uTWZJvLKU6bF+WABA91VsbB04sNOT5gr9qc?= =?us-ascii?Q?I6YhuTMSSKqoZE5F2/85IB31F3U2AP/ILMaZzuNj8pTY7eyoRCRx2rC7r2Hw?= =?us-ascii?Q?ywB0O38OO/ptT24F1ys57E2M7s/crS1/lsjMdKdKpujeHpuUo0smk6GFSqd8?= =?us-ascii?Q?d2ZB6bpzWemlNeP7HMQUH3xbVlF/zo3xu/WA1OIVqBajguTMXocMrSsddD9+?= =?us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pCdHLllkemAp5fCZO4cDJ4UXt1FoaimgJ?= =?us-ascii?Q?L5LLtziURHCRj+N3ynC+bkcbFEpHmlhcEuves6Afw3FKyPItZ7hOvLbHD4zi?= =?us-ascii?Q?oJUXZmU4oUK5WpId6xwzxhS61oMtLIkdne/6VClZXkW00X6ikHtwqScIOXvd?= =?us-ascii?Q?2IXwDJnSANBccI+MgFm9qortES+1aGRrSVGr021DJKGREDFb3uW1teVtfdxj?= =?us-ascii?Q?PU2syqY1v+OaL62lqZWPFozCExyzJIYs0sawpK+I?= X-OriginatorOrg: vivo.com X-MS-Exchange-CrossTenant-Network-Message-Id: fd5b9101-9910-4918-c655-08db7ed05404 X-MS-Exchange-CrossTenant-AuthSource: SEZPR06MB5269.apcprd06.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 07 Jul 2023 09:55:43.3138 (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: sh4e3ElvzlHrXSiSejANlvnFptgmeojiLkSh/X/rPAj2D7pByXVAvlvUFSi+ZNWCQqHjakX0dXG1134FRkvhIQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: KL1PR0601MB4356 X-Spam-Status: No, score=-0.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2,RCVD_IN_VALIDITY_RPBL,SPF_HELO_PASS,SPF_PASS, T_SCC_BODY_TEXT_LINE,URIBL_BLOCKED autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Convert platform_get_resource(), devm_ioremap_resource() to a single call to devm_platform_get_and_ioremap_resource(), as this is exactly what this function does. Signed-off-by: Yangtao Li 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); -- 2.39.0