From patchwork Fri Nov 11 08:47:12 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: ye.xingchen@zte.com.cn X-Patchwork-Id: 18555 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:6687:0:0:0:0:0 with SMTP id l7csp624757wru; Fri, 11 Nov 2022 00:55:30 -0800 (PST) X-Google-Smtp-Source: AA0mqf6n9jJsUsM6IghWfYhRicYzspu2CtloMF+mbVF9OsyIEhuXqRO4aSoUS1fw4RdG9O4Vzul6 X-Received: by 2002:a17:906:b41:b0:7a8:fd1a:c073 with SMTP id v1-20020a1709060b4100b007a8fd1ac073mr1139200ejg.4.1668156929980; Fri, 11 Nov 2022 00:55:29 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1668156929; cv=none; d=google.com; s=arc-20160816; b=ostgqI7HRvMImkyWj1kTMJf0bRX88SQwhW6t1RlslCnbLJrMO7nanz+N00YJPSG25N VSDodSs32pq4HPbySTXmJoDD4g7emTTGTekfaRizg348tVki2KB9RAZF2PmvPYOTGfgU sRGtrW/C9XSWraR3xQN0l+dj21GRGTlgo+Fd3AjXSOKFdddcOMec8RYgoOtmFpQNRDdj DjcvqSjmipxgbbavVfVVRQK6wbV3heJcZmPdPac2jGqxA81Nb8y68QOwO9XAVchDV6TX 06ux35Yy85UtF0BFKoRk0Tmzp2ebQmXAypEkyKwHC5yescl3xUmJ1gbZImJQmNk99fxa M4Cg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:subject:cc:to:from:mime-version:message-id:date; bh=KpHUrfTFa0LRRi09d41HwFFmSyXABN9W4tT7o8L2jxc=; b=l9dK1h/HaQaLZI9GUr//UAo08bi0r11DfEs0SGk0sjVuKfly0WIl/Hdojg0SJ6Pwey IxBlBBXlpQIZlxeCXGhdAdi3mCTwcMOvfPvkK6hWHt/gsSNf1bB6+Q0VAPsYyrISpTfP lmFu7uk3XnFoeRJoI/Gl4yOJrQYckEgqREkkoK6h6dDzCaKvXl05fKpnceIm2KKMtR69 4GbLtUdBv50H/NCqZZbqGoPwpJjWn7H5eGfYOE2UGDt70vArJZlgy83LpRvx7WJSPE4B kpU6/Ji10b5S3xc/p9kqULjSjekibJrDXVuQMzucwPMkoXaulBun0FWS592SOdtDHNcV KbbQ== ARC-Authentication-Results: i=1; mx.google.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=fail (p=NONE sp=NONE dis=NONE) header.from=zte.com.cn Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id f14-20020a0564021e8e00b004676034f552si296133edf.45.2022.11.11.00.55.05; Fri, 11 Nov 2022 00:55:29 -0800 (PST) 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; 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=fail (p=NONE sp=NONE dis=NONE) header.from=zte.com.cn Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233284AbiKKIrc (ORCPT + 99 others); Fri, 11 Nov 2022 03:47:32 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37754 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232675AbiKKIr3 (ORCPT ); Fri, 11 Nov 2022 03:47:29 -0500 Received: from mxct.zte.com.cn (mxct.zte.com.cn [58.251.27.85]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id EA1C3748FC; Fri, 11 Nov 2022 00:47:28 -0800 (PST) Received: from mxde.zte.com.cn (unknown [10.35.20.121]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mxct.zte.com.cn (FangMail) with ESMTPS id 4N7slg176gz1DyC; Fri, 11 Nov 2022 16:47:27 +0800 (CST) Received: from mxus.zte.com.cn (unknown [10.207.168.8]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mxde.zte.com.cn (FangMail) with ESMTPS id 4N7slb5b4kz9vSpC; Fri, 11 Nov 2022 16:47:23 +0800 (CST) Received: from mxhk.zte.com.cn (unknown [192.168.250.137]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mxus.zte.com.cn (FangMail) with ESMTPS id 4N7slX0YnFzdmYkm; Fri, 11 Nov 2022 16:47:20 +0800 (CST) Received: from mse-fl2.zte.com.cn (unknown [10.5.228.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mxhk.zte.com.cn (FangMail) with ESMTPS id 4N7slS5M4jz8R03x; Fri, 11 Nov 2022 16:47:16 +0800 (CST) Received: from xaxapp01.zte.com.cn ([10.88.40.50]) by mse-fl2.zte.com.cn with SMTP id 2AB8lAeA020835; Fri, 11 Nov 2022 16:47:10 +0800 (+08) (envelope-from ye.xingchen@zte.com.cn) Received: from mapi (xaxapp02[null]) by mapi (Zmail) with MAPI id mid31; Fri, 11 Nov 2022 16:47:12 +0800 (CST) Date: Fri, 11 Nov 2022 16:47:12 +0800 (CST) X-Zmail-TransId: 2afa636e0c10582f6ced X-Mailer: Zmail v1.0 Message-ID: <202211111647123266703@zte.com.cn> Mime-Version: 1.0 From: To: Cc: , , , Subject: =?utf-8?q?=5BPATCH=5D_ata=3A_ep93xx=3A_use_devm=5Fplatform=5Fget=5F?= =?utf-8?q?and=5Fioremap=5Fresource=28=29?= X-MAIL: mse-fl2.zte.com.cn 2AB8lAeA020835 X-Fangmail-Gw-Spam-Type: 0 X-FangMail-Miltered: at cgslv5.04-192.168.251.14.novalocal with ID 636E0C1E.000 by FangMail milter! X-FangMail-Envelope: 1668156447/4N7slg176gz1DyC/636E0C1E.000/10.35.20.121/[10.35.20.121]/mxde.zte.com.cn/ X-Fangmail-Anti-Spam-Filtered: true X-Fangmail-MID-QID: 636E0C1E.000/4N7slg176gz1DyC X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,SPF_HELO_NONE, SPF_PASS,UNPARSEABLE_RELAY 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: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1749189320826240929?= X-GMAIL-MSGID: =?utf-8?q?1749189320826240929?= From: Minghao Chi 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. Reported-by: Zeal Robot Signed-off-by: Minghao Chi Reviewed-by: Sergey Shtylyov --- drivers/ata/pata_ep93xx.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/ata/pata_ep93xx.c b/drivers/ata/pata_ep93xx.c index 6c75a22db12b..47845d920075 100644 --- a/drivers/ata/pata_ep93xx.c +++ b/drivers/ata/pata_ep93xx.c @@ -931,8 +931,7 @@ static int ep93xx_pata_probe(struct platform_device *pdev) goto err_rel_gpio; } - mem_res = platform_get_resource(pdev, IORESOURCE_MEM, 0); - ide_base = devm_ioremap_resource(&pdev->dev, mem_res); + ide_base = devm_platform_get_and_ioremap_resource(pdev, 0, &mem_res); if (IS_ERR(ide_base)) { err = PTR_ERR(ide_base); goto err_rel_gpio;