Message ID | 202211171411439883050@zte.com.cn |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:f944:0:0:0:0:0 with SMTP id q4csp238101wrr; Wed, 16 Nov 2022 22:16:55 -0800 (PST) X-Google-Smtp-Source: AA0mqf6M94ORX3xnLDYKPLx1zLQg1tBoAV0ltadYZ3ccCEw5Q0IRyiuDA6Jk1sSjMH/dLOoa5f4y X-Received: by 2002:a17:906:1ecf:b0:7ad:902c:d1d6 with SMTP id m15-20020a1709061ecf00b007ad902cd1d6mr933984ejj.143.1668665815006; Wed, 16 Nov 2022 22:16:55 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1668665815; cv=none; d=google.com; s=arc-20160816; b=nmmxV5dF6jz75t3wiYl2iJeT5kY4NzqfmbRH2SGSnCBMkK/KmvObdcnLFArbQEJHjX +HbE13I8/ezoCJVLWlsKzMc7iPJzpK2vS+hVooMkVBUHwz7eMY8D2b3EHkaCOpqtKE03 UvHeiZliwb3jMtoAyxjoyTAkzBfzwNwIik4KdCjZAGYAC/xsYbyc1VoMCIGl6buspczH ouP0t1COBmeAGP+HZjdZD5BFnkCQw9mfxwSDw1UE9OeNpj7yhbtvNMTUxt3DMXtmLPhf f9IGqE5eWr6MD2VgJlBjwfZJjQ/6fNqTff4OTDcqmaUqX/PZvszsecI0PInOFpzLWgr4 hNVA== 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=AK9+MCxmCM1S7n/WSlFht/igpYpndY/Tucpo0/cVAbk=; b=toHDXFpON1ngjfWOWJfzIrQeSqwL/ljvI3iKCbcRdIVsZ9CZMgVokNb7FYb6LGoRpl X53K8D6KjGP3dqCntW8d57I3ud8hxA29oH9qaVfzl4hqc3hJGcK1L8OtjZ45IXJZetUJ bMQEi4zLmM5C/mIx7GnzxHC02Bg+dyhOygg53bgX3+8aVtX4RYNKNtUo2EwKYF6L8Dq2 6h9Yy7YPexXW+Xe/vQPCqk5bK2uFdlaV0qinUoLqBNUpMEdKwcQ8Hnnk2lNY+X1hQxYX PwFIgl4diCxD1CaubbWMwj5gOwz0aTbCx1jdvslatgC1RxUT0WRokGCJ/9gC2/Ual1Sj MrKg== 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 jg24-20020a170907971800b0078dcfe6a000si15500539ejc.727.2022.11.16.22.16.32; Wed, 16 Nov 2022 22:16:54 -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 S234702AbiKQGL6 (ORCPT <rfc822;just.gull.subs@gmail.com> + 99 others); Thu, 17 Nov 2022 01:11:58 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57472 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233725AbiKQGLz (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Thu, 17 Nov 2022 01:11:55 -0500 Received: from mxct.zte.com.cn (mxct.zte.com.cn [183.62.165.209]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id DD2032F3AE for <linux-kernel@vger.kernel.org>; Wed, 16 Nov 2022 22:11:54 -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 mxct.zte.com.cn (FangMail) with ESMTPS id 4NCV1P3QQ7z4y3ZH; Thu, 17 Nov 2022 14:11:53 +0800 (CST) Received: from xaxapp01.zte.com.cn ([10.88.40.50]) by mse-fl2.zte.com.cn with SMTP id 2AH6Bg2Z089429; Thu, 17 Nov 2022 14:11:42 +0800 (+08) (envelope-from ye.xingchen@zte.com.cn) Received: from mapi (xaxapp01[null]) by mapi (Zmail) with MAPI id mid31; Thu, 17 Nov 2022 14:11:43 +0800 (CST) Date: Thu, 17 Nov 2022 14:11:43 +0800 (CST) X-Zmail-TransId: 2af96375d09ffffffffffba5c3e2 X-Mailer: Zmail v1.0 Message-ID: <202211171411439883050@zte.com.cn> Mime-Version: 1.0 From: <ye.xingchen@zte.com.cn> To: <vkoul@kernel.org> Cc: <kishon@kernel.org>, <linux-phy@lists.infradead.org>, <linux-kernel@vger.kernel.org> Subject: =?utf-8?b?W1BBVENIXSBwaHk6IHVzZSBkZXZtX3BsYXRmb3JtX2dldF9hbmRfaW9y?= =?utf-8?b?ZW1hcF9yZXNvdXJjZSgp?= Content-Type: text/plain; charset="UTF-8" X-MAIL: mse-fl2.zte.com.cn 2AH6Bg2Z089429 X-Fangmail-Gw-Spam-Type: 0 X-FangMail-Miltered: at cgslv5.04-192.168.251.13.novalocal with ID 6375D0A9.000 by FangMail milter! X-FangMail-Envelope: 1668665513/4NCV1P3QQ7z4y3ZH/6375D0A9.000/10.5.228.133/[10.5.228.133]/mse-fl2.zte.com.cn/<ye.xingchen@zte.com.cn> X-Fangmail-Anti-Spam-Filtered: true X-Fangmail-MID-QID: 6375D0A9.000/4NCV1P3QQ7z4y3ZH 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: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1749722925179271532?= X-GMAIL-MSGID: =?utf-8?q?1749722925179271532?= |
Series |
phy: use devm_platform_get_and_ioremap_resource()
|
|
Commit Message
ye.xingchen@zte.com.cn
Nov. 17, 2022, 6:11 a.m. UTC
From: Minghao Chi <chi.minghao@zte.com.cn> 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 <chi.minghao@zte.com.cn> Signed-off-by: ye xingchen <ye.xingchen@zte.com.cn> --- drivers/phy/marvell/phy-mmp3-hsic.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-)
Comments
On 17-11-22, 14:11, ye.xingchen@zte.com.cn wrote: > From: Minghao Chi <chi.minghao@zte.com.cn> > > 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. Applied, thanks > > Signed-off-by: Minghao Chi <chi.minghao@zte.com.cn> > Signed-off-by: ye xingchen <ye.xingchen@zte.com.cn> > --- > drivers/phy/marvell/phy-mmp3-hsic.c | 4 +--- > 1 file changed, 1 insertion(+), 3 deletions(-) > > diff --git a/drivers/phy/marvell/phy-mmp3-hsic.c b/drivers/phy/marvell/phy-mmp3-hsic.c > index 7cccf01848d8..f2537fdcc3ab 100644 > --- a/drivers/phy/marvell/phy-mmp3-hsic.c > +++ b/drivers/phy/marvell/phy-mmp3-hsic.c > @@ -41,12 +41,10 @@ static int mmp3_hsic_phy_probe(struct platform_device *pdev) > { > struct device *dev = &pdev->dev; > struct phy_provider *provider; > - struct resource *resource; > void __iomem *base; > struct phy *phy; > > - resource = platform_get_resource(pdev, IORESOURCE_MEM, 0); > - base = devm_ioremap_resource(dev, resource); > + base = devm_platform_get_and_ioremap_resource(pdev, 0, NULL); > if (IS_ERR(base)) > return PTR_ERR(base); > > -- > 2.25.1
diff --git a/drivers/phy/marvell/phy-mmp3-hsic.c b/drivers/phy/marvell/phy-mmp3-hsic.c index 7cccf01848d8..f2537fdcc3ab 100644 --- a/drivers/phy/marvell/phy-mmp3-hsic.c +++ b/drivers/phy/marvell/phy-mmp3-hsic.c @@ -41,12 +41,10 @@ static int mmp3_hsic_phy_probe(struct platform_device *pdev) { struct device *dev = &pdev->dev; struct phy_provider *provider; - struct resource *resource; void __iomem *base; struct phy *phy; - resource = platform_get_resource(pdev, IORESOURCE_MEM, 0); - base = devm_ioremap_resource(dev, resource); + base = devm_platform_get_and_ioremap_resource(pdev, 0, NULL); if (IS_ERR(base)) return PTR_ERR(base);