From patchwork Tue Nov 22 01:39:03 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: 24107 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:f944:0:0:0:0:0 with SMTP id q4csp1945092wrr; Mon, 21 Nov 2022 17:45:54 -0800 (PST) X-Google-Smtp-Source: AA0mqf6wAqg25LKyjJy1szDgxRWyWTglXt/z0s3ge5kUfBM43UxE6cJoKLfSMoHx9fZDjSCaDJe+ X-Received: by 2002:a62:79c8:0:b0:56e:827d:dcce with SMTP id u191-20020a6279c8000000b0056e827ddccemr1771308pfc.51.1669081553730; Mon, 21 Nov 2022 17:45:53 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1669081553; cv=none; d=google.com; s=arc-20160816; b=D+aKbLvE2FZ8xn5Z+Zi+uHSUqzkYpUxd8QUsh3zwX6CJGyq3MM2oEJQwJjjkuqW8bn 2mrQe/jU/KH2+Ucxwb978W2PNIQgZ8sEskvuuauUvN//7aWk6oer6Mq9jfZlkQwLgv9F 6AvNRQ8HBPI7Pq4u+F2R6WtUIQyI/mzCN0QlOIvZq3V3o0dg+ba22SLkl4WR412qG3jf wy+7zBwhzFxD2OiX3/oPTkJFnaL8s7ZESO889ax4dG0V4B85IDQILGZoKwiVJ8dGiukc GcaIYf38ql4ZbtKLjTtIxPiEDL/MhP4OJQn4ZS/taH+6SyYp7txvW5glc0abaPNMJ45E r/cA== 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=WEorRcnpn68HgyNLhBzoKHb5CnAkBBqY5wrXtq3JhRw=; b=hYLm6+M8cWd8QEEk0zivoEQpGz15/mUkSpGSFR8eyS362TwqbPbS7SacNndU3S1kO6 rE/j17umjwCE5UcUuMgg5uBRm/6WmnTsjtByP3K9wH9fYb8EjE6Ecu23Z34DsYGMRnPc 3vXqDxgE6w9bfMQ8v5k1bDOx95vcyn/ZF2s8HXw/R/KrIOzb5WRGYRsG3sxSkCKKO5XL 8O4ZKWJ6rFSk7c0SpDvXXhcALVhiU7fijh45+a5fd44f0kShGDlpxTpppo1FLyr4EJ6L /hMWgWU9irZpEPMMYNH5Jllct+7xYJ+D66OaPZc3x9iMWnyb3qawAwLbrV4nD+umZ+Zf 7wOA== 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 lx13-20020a17090b4b0d00b0020382775a6fsi13499841pjb.149.2022.11.21.17.45.38; Mon, 21 Nov 2022 17:45:53 -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 S232300AbiKVBjM (ORCPT + 99 others); Mon, 21 Nov 2022 20:39:12 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43544 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231463AbiKVBjL (ORCPT ); Mon, 21 Nov 2022 20:39:11 -0500 Received: from mxhk.zte.com.cn (mxhk.zte.com.cn [63.216.63.40]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A43E3AB0C5; Mon, 21 Nov 2022 17:39:10 -0800 (PST) Received: from mse-fl1.zte.com.cn (unknown [10.5.228.132]) (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 4NGRkP39Vrz8RV5L; Tue, 22 Nov 2022 09:39:09 +0800 (CST) Received: from xaxapp01.zte.com.cn ([10.88.40.50]) by mse-fl1.zte.com.cn with SMTP id 2AM1d2t0028295; Tue, 22 Nov 2022 09:39:02 +0800 (+08) (envelope-from ye.xingchen@zte.com.cn) Received: from mapi (xaxapp02[null]) by mapi (Zmail) with MAPI id mid31; Tue, 22 Nov 2022 09:39:03 +0800 (CST) Date: Tue, 22 Nov 2022 09:39:03 +0800 (CST) X-Zmail-TransId: 2afa637c2837328fa23d X-Mailer: Zmail v1.0 Message-ID: <202211220939032286231@zte.com.cn> Mime-Version: 1.0 From: To: Cc: , , , , , , , Subject: =?utf-8?q?=5BPATCH=5D_EDAC=3A_use_devm=5Fplatform=5Fget=5Fand=5Fior?= =?utf-8?q?emap=5Fresource=28=29?= X-MAIL: mse-fl1.zte.com.cn 2AM1d2t0028295 X-Fangmail-Gw-Spam-Type: 0 X-FangMail-Miltered: at cgslv5.04-192.168.250.137.novalocal with ID 637C283D.001 by FangMail milter! X-FangMail-Envelope: 1669081149/4NGRkP39Vrz8RV5L/637C283D.001/10.5.228.132/[10.5.228.132]/mse-fl1.zte.com.cn/ X-Fangmail-Anti-Spam-Filtered: true X-Fangmail-MID-QID: 637C283D.001/4NGRkP39Vrz8RV5L X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,RCVD_IN_MSPIKE_H2, 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?1750158858980463291?= X-GMAIL-MSGID: =?utf-8?q?1750158858980463291?= 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. Signed-off-by: Minghao Chi Signed-off-by: ye xingchen --- drivers/edac/dmc520_edac.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/edac/dmc520_edac.c b/drivers/edac/dmc520_edac.c index 1fa5ca57e9ec..77756b5b811f 100644 --- a/drivers/edac/dmc520_edac.c +++ b/drivers/edac/dmc520_edac.c @@ -480,7 +480,6 @@ static int dmc520_edac_probe(struct platform_device *pdev) struct mem_ctl_info *mci; void __iomem *reg_base; u32 irq_mask_all = 0; - struct resource *res; struct device *dev; int ret, idx, irq; u32 reg_val; @@ -505,8 +504,7 @@ static int dmc520_edac_probe(struct platform_device *pdev) } /* Initialize dmc520 edac */ - res = platform_get_resource(pdev, IORESOURCE_MEM, 0); - reg_base = devm_ioremap_resource(dev, res); + reg_base = devm_platform_get_and_ioremap_resource(pdev, 0, NULL); if (IS_ERR(reg_base)) return PTR_ERR(reg_base);