From patchwork Wed Nov 30 07:53:06 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: zhang.songyi@zte.com.cn X-Patchwork-Id: 27623 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:f944:0:0:0:0:0 with SMTP id q4csp789997wrr; Wed, 30 Nov 2022 00:04:24 -0800 (PST) X-Google-Smtp-Source: AA0mqf5KDzbCRfH/k17QnSdYIZsCtFsOKi94/zd4a7UrUOcOlvFeN3HKomWKvdYxa6Im5BGXkO6i X-Received: by 2002:a17:90a:8d02:b0:219:1ffc:143c with SMTP id c2-20020a17090a8d0200b002191ffc143cmr20018996pjo.9.1669795464618; Wed, 30 Nov 2022 00:04:24 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1669795464; cv=none; d=google.com; s=arc-20160816; b=c8/LpO5YQCrbFhJavKKaRAZiMKijZwEK+SIp0VtplYrum2opLmP7abfu2agzwWTGzE YP7ZpHx64ycgOp0IYAUEZi8ztETaKVo/XL3i0wE2pEVy59bP4cvBISkM8ArTA3kd96BG sF9ElXqHUfbdWh+hMWh8jKDpZbQZlDYM7lZTKrEd4sxQW1Bt2oKjTe4t9LzVaShmwY5N 6GrDo3OvL667y620J0UwKN8xte1K1s1NFcsNDzCr3JcQlfqlVLliSD5nsFRYLxK96xer dm/yScJqaiJHcEVEwhaYGiltdpqWHTbLFFx2OvbLKTZn5QNUYgy4hEty6HOLvHQQ61of +Vhg== 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=Xplnlx8n8cup1bNMQwrBWibiTVq+cXeudlxyRCWhom8=; b=h/UhdNNKMEPrnNLo0nVH6kULBjWoQboiDGaTloC8kXpg9R5jwwvYxMNyKbMxDxGkmF 5pfJ5HSPG7ukzjd/PkBc5STY9Jdbqj14dWsOq2GzDCuG2ypolw5lukSrlSaWIOEw/2tX aplqpQLFvxErHWwG8ESt0JtQR1mpcT5imLOmg7BCG45IyoOct7zQkvablbMolgFb2GPW jb6Rq4LQ7JBidQXtAHIGlsCYm6Dhn3r1hwIoSNAZ/usmqb3oO3lKqf3D8JkhWuVH12Ii UZAHY7fLC37pTThNx5GLf408ITs6e5L1ujryNhzlDYs3eKlETdBkkdp2LXB8cWfQ79FV mDWw== 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 v191-20020a6389c8000000b0046ef5b35735si616191pgd.654.2022.11.30.00.04.10; Wed, 30 Nov 2022 00:04:24 -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 S234213AbiK3HxT (ORCPT + 99 others); Wed, 30 Nov 2022 02:53:19 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60366 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232267AbiK3HxS (ORCPT ); Wed, 30 Nov 2022 02:53:18 -0500 Received: from mxhk.zte.com.cn (mxhk.zte.com.cn [63.216.63.40]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E4D87FD3C; Tue, 29 Nov 2022 23:53:16 -0800 (PST) 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 4NMWfM4ghVz8RTZK; Wed, 30 Nov 2022 15:53:15 +0800 (CST) Received: from xaxapp01.zte.com.cn ([10.88.40.50]) by mse-fl2.zte.com.cn with SMTP id 2AU7r4l0003483; Wed, 30 Nov 2022 15:53:04 +0800 (+08) (envelope-from zhang.songyi@zte.com.cn) Received: from mapi (xaxapp01[null]) by mapi (Zmail) with MAPI id mid31; Wed, 30 Nov 2022 15:53:06 +0800 (CST) Date: Wed, 30 Nov 2022 15:53:06 +0800 (CST) X-Zmail-TransId: 2af963870be2fffffffffea666c9 X-Mailer: Zmail v1.0 Message-ID: <202211301553066158367@zte.com.cn> Mime-Version: 1.0 From: To: Cc: , , Subject: =?utf-8?q?=5BPATCH_linux-next=5D_sparc=3A_leon=3A_grpci1=3A_use_dev?= =?utf-8?q?m=5Fplatform=5Fioremap=5Fresource=28=29?= X-MAIL: mse-fl2.zte.com.cn 2AU7r4l0003483 X-Fangmail-Gw-Spam-Type: 0 X-FangMail-Miltered: at cgslv5.04-192.168.250.137.novalocal with ID 63870BEB.000 by FangMail milter! X-FangMail-Envelope: 1669794795/4NMWfM4ghVz8RTZK/63870BEB.000/10.5.228.133/[10.5.228.133]/mse-fl2.zte.com.cn/ X-Fangmail-Anti-Spam-Filtered: true X-Fangmail-MID-QID: 63870BEB.000/4NMWfM4ghVz8RTZK 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?1750907449070443541?= X-GMAIL-MSGID: =?utf-8?q?1750907449070443541?= From: zhang songyi Use the devm_platform_ioremap_resource() helper instead of calling platform_get_resource() and devm_ioremap_resource() separately Signed-off-by: zhang songyi --- arch/sparc/kernel/leon_pci_grpci1.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) -- 2.15.2 diff --git a/arch/sparc/kernel/leon_pci_grpci1.c b/arch/sparc/kernel/leon_pci_grpci1.c index e6935d0ac1ec..bbe9c95541e0 100644 --- a/arch/sparc/kernel/leon_pci_grpci1.c +++ b/arch/sparc/kernel/leon_pci_grpci1.c @@ -515,7 +515,6 @@ static int grpci1_of_probe(struct platform_device *ofdev) int err, len; const int *tmp; u32 cfg, size, err_mask; - struct resource *res; if (grpci1priv) { dev_err(&ofdev->dev, "only one GRPCI1 supported\n"); @@ -536,8 +535,7 @@ static int grpci1_of_probe(struct platform_device *ofdev) priv->dev = &ofdev->dev; /* find device register base address */ - res = platform_get_resource(ofdev, IORESOURCE_MEM, 0); - regs = devm_ioremap_resource(&ofdev->dev, res); + regs = devm_platform_ioremap_resource(ofdev, 0); if (IS_ERR(regs)) return PTR_ERR(regs);