linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/7] usb: mtu3: convert to devm_platform_ioremap_resource_byname
@ 2020-07-22  7:51 Chunfeng Yun
  2020-07-22  7:51 ` [PATCH 2/7] usb: phy: am335x: " Chunfeng Yun
                   ` (6 more replies)
  0 siblings, 7 replies; 15+ messages in thread
From: Chunfeng Yun @ 2020-07-22  7:51 UTC (permalink / raw)
  To: Felipe Balbi, Greg Kroah-Hartman
  Cc: linux-usb, linux-kernel, Chunfeng Yun, linux-mediatek,
	Matthias Brugger, linux-arm-kernel

Use devm_platform_ioremap_resource_byname() to simplify code

Signed-off-by: Chunfeng Yun <chunfeng.yun@mediatek.com>
---
 drivers/usb/mtu3/mtu3_core.c | 4 +---
 drivers/usb/mtu3/mtu3_plat.c | 4 +---
 2 files changed, 2 insertions(+), 6 deletions(-)

diff --git a/drivers/usb/mtu3/mtu3_core.c b/drivers/usb/mtu3/mtu3_core.c
index 9dd0216..ca48089 100644
--- a/drivers/usb/mtu3/mtu3_core.c
+++ b/drivers/usb/mtu3/mtu3_core.c
@@ -828,7 +828,6 @@ int ssusb_gadget_init(struct ssusb_mtk *ssusb)
 	struct device *dev = ssusb->dev;
 	struct platform_device *pdev = to_platform_device(dev);
 	struct mtu3 *mtu = NULL;
-	struct resource *res;
 	int ret = -ENOMEM;
 
 	mtu = devm_kzalloc(dev, sizeof(struct mtu3), GFP_KERNEL);
@@ -840,8 +839,7 @@ int ssusb_gadget_init(struct ssusb_mtk *ssusb)
 		return mtu->irq;
 	dev_info(dev, "irq %d\n", mtu->irq);
 
-	res = platform_get_resource_byname(pdev, IORESOURCE_MEM, "mac");
-	mtu->mac_base = devm_ioremap_resource(dev, res);
+	mtu->mac_base = devm_platform_ioremap_resource_byname(pdev, "mac");
 	if (IS_ERR(mtu->mac_base)) {
 		dev_err(dev, "error mapping memory for dev mac\n");
 		return PTR_ERR(mtu->mac_base);
diff --git a/drivers/usb/mtu3/mtu3_plat.c b/drivers/usb/mtu3/mtu3_plat.c
index 9c256ea..d44d541 100644
--- a/drivers/usb/mtu3/mtu3_plat.c
+++ b/drivers/usb/mtu3/mtu3_plat.c
@@ -216,7 +216,6 @@ static int get_ssusb_rscs(struct platform_device *pdev, struct ssusb_mtk *ssusb)
 	struct device_node *node = pdev->dev.of_node;
 	struct otg_switch_mtk *otg_sx = &ssusb->otg_switch;
 	struct device *dev = &pdev->dev;
-	struct resource *res;
 	int i;
 	int ret;
 
@@ -263,8 +262,7 @@ static int get_ssusb_rscs(struct platform_device *pdev, struct ssusb_mtk *ssusb)
 		}
 	}
 
-	res = platform_get_resource_byname(pdev, IORESOURCE_MEM, "ippc");
-	ssusb->ippc_base = devm_ioremap_resource(dev, res);
+	ssusb->ippc_base = devm_platform_ioremap_resource_byname(pdev, "ippc");
 	if (IS_ERR(ssusb->ippc_base))
 		return PTR_ERR(ssusb->ippc_base);
 
-- 
1.9.1
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply related	[flat|nested] 15+ messages in thread

* [PATCH 2/7] usb: phy: am335x: convert to devm_platform_ioremap_resource_byname
  2020-07-22  7:51 [PATCH 1/7] usb: mtu3: convert to devm_platform_ioremap_resource_byname Chunfeng Yun
@ 2020-07-22  7:51 ` Chunfeng Yun
  2020-07-22  7:51 ` [PATCH 3/7] usb: cdns3: " Chunfeng Yun
                   ` (5 subsequent siblings)
  6 siblings, 0 replies; 15+ messages in thread
From: Chunfeng Yun @ 2020-07-22  7:51 UTC (permalink / raw)
  To: Felipe Balbi, Greg Kroah-Hartman
  Cc: linux-usb, linux-kernel, Chunfeng Yun, linux-mediatek,
	Matthias Brugger, linux-arm-kernel

Use devm_platform_ioremap_resource_byname() to simplify code

Signed-off-by: Chunfeng Yun <chunfeng.yun@mediatek.com>
---
 drivers/usb/phy/phy-am335x-control.c | 7 ++-----
 1 file changed, 2 insertions(+), 5 deletions(-)

diff --git a/drivers/usb/phy/phy-am335x-control.c b/drivers/usb/phy/phy-am335x-control.c
index d16dfc3..97e6603 100644
--- a/drivers/usb/phy/phy-am335x-control.c
+++ b/drivers/usb/phy/phy-am335x-control.c
@@ -149,7 +149,6 @@ struct phy_control *am335x_get_phy_control(struct device *dev)
 
 static int am335x_control_usb_probe(struct platform_device *pdev)
 {
-	struct resource	*res;
 	struct am335x_control_usb *ctrl_usb;
 	const struct of_device_id *of_id;
 	const struct phy_control *phy_ctrl;
@@ -166,13 +165,11 @@ static int am335x_control_usb_probe(struct platform_device *pdev)
 
 	ctrl_usb->dev = &pdev->dev;
 
-	res = platform_get_resource_byname(pdev, IORESOURCE_MEM, "phy_ctrl");
-	ctrl_usb->phy_reg = devm_ioremap_resource(&pdev->dev, res);
+	ctrl_usb->phy_reg = devm_platform_ioremap_resource_byname(pdev, "phy_ctrl");
 	if (IS_ERR(ctrl_usb->phy_reg))
 		return PTR_ERR(ctrl_usb->phy_reg);
 
-	res = platform_get_resource_byname(pdev, IORESOURCE_MEM, "wakeup");
-	ctrl_usb->wkup = devm_ioremap_resource(&pdev->dev, res);
+	ctrl_usb->wkup = devm_platform_ioremap_resource_byname(pdev, "wakeup");
 	if (IS_ERR(ctrl_usb->wkup))
 		return PTR_ERR(ctrl_usb->wkup);
 
-- 
1.9.1
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply related	[flat|nested] 15+ messages in thread

* [PATCH 3/7] usb: cdns3: convert to devm_platform_ioremap_resource_byname
  2020-07-22  7:51 [PATCH 1/7] usb: mtu3: convert to devm_platform_ioremap_resource_byname Chunfeng Yun
  2020-07-22  7:51 ` [PATCH 2/7] usb: phy: am335x: " Chunfeng Yun
@ 2020-07-22  7:51 ` Chunfeng Yun
  2020-07-22  8:46   ` Peter Chen
  2020-07-22  7:51 ` [PATCH 4/7] usb: dwc3: " Chunfeng Yun
                   ` (4 subsequent siblings)
  6 siblings, 1 reply; 15+ messages in thread
From: Chunfeng Yun @ 2020-07-22  7:51 UTC (permalink / raw)
  To: Felipe Balbi, Greg Kroah-Hartman
  Cc: Peter Chen, linux-usb, linux-kernel, Chunfeng Yun,
	linux-mediatek, Matthias Brugger, linux-arm-kernel

Use devm_platform_ioremap_resource_byname() to simplify code

Cc: Peter Chen <peter.chen@nxp.com>
Signed-off-by: Chunfeng Yun <chunfeng.yun@mediatek.com>
---
 drivers/usb/cdns3/core.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/drivers/usb/cdns3/core.c b/drivers/usb/cdns3/core.c
index 19bbb5b..24faf60 100644
--- a/drivers/usb/cdns3/core.c
+++ b/drivers/usb/cdns3/core.c
@@ -436,8 +436,7 @@ static int cdns3_probe(struct platform_device *pdev)
 	if (cdns->dev_irq < 0)
 		dev_err(dev, "couldn't get peripheral irq\n");
 
-	res = platform_get_resource_byname(pdev, IORESOURCE_MEM, "dev");
-	regs = devm_ioremap_resource(dev, res);
+	regs = devm_platform_ioremap_resource_byname(pdev, "dev");
 	if (IS_ERR(regs))
 		return PTR_ERR(regs);
 	cdns->dev_regs	= regs;
-- 
1.9.1
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply related	[flat|nested] 15+ messages in thread

* [PATCH 4/7] usb: dwc3: convert to devm_platform_ioremap_resource_byname
  2020-07-22  7:51 [PATCH 1/7] usb: mtu3: convert to devm_platform_ioremap_resource_byname Chunfeng Yun
  2020-07-22  7:51 ` [PATCH 2/7] usb: phy: am335x: " Chunfeng Yun
  2020-07-22  7:51 ` [PATCH 3/7] usb: cdns3: " Chunfeng Yun
@ 2020-07-22  7:51 ` Chunfeng Yun
  2020-07-27 12:55   ` Patrice CHOTARD
  2020-07-22  7:51 ` [PATCH 5/7] usb: gadget: r8a66597: " Chunfeng Yun
                   ` (3 subsequent siblings)
  6 siblings, 1 reply; 15+ messages in thread
From: Chunfeng Yun @ 2020-07-22  7:51 UTC (permalink / raw)
  To: Felipe Balbi, Greg Kroah-Hartman
  Cc: linux-usb, linux-kernel, Patrice Chotard, Chunfeng Yun,
	linux-mediatek, Matthias Brugger, linux-arm-kernel

Use devm_platform_ioremap_resource_byname() to simplify code

Cc: Patrice Chotard <patrice.chotard@st.com>
Signed-off-by: Chunfeng Yun <chunfeng.yun@mediatek.com>
---
 drivers/usb/dwc3/dwc3-st.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/usb/dwc3/dwc3-st.c b/drivers/usb/dwc3/dwc3-st.c
index c682420..e733be8 100644
--- a/drivers/usb/dwc3/dwc3-st.c
+++ b/drivers/usb/dwc3/dwc3-st.c
@@ -206,8 +206,8 @@ static int st_dwc3_probe(struct platform_device *pdev)
 	if (!dwc3_data)
 		return -ENOMEM;
 
-	res = platform_get_resource_byname(pdev, IORESOURCE_MEM, "reg-glue");
-	dwc3_data->glue_base = devm_ioremap_resource(dev, res);
+	dwc3_data->glue_base =
+		devm_platform_ioremap_resource_byname(pdev, "reg-glue");
 	if (IS_ERR(dwc3_data->glue_base))
 		return PTR_ERR(dwc3_data->glue_base);
 
-- 
1.9.1
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply related	[flat|nested] 15+ messages in thread

* [PATCH 5/7] usb: gadget: r8a66597: convert to devm_platform_ioremap_resource_byname
  2020-07-22  7:51 [PATCH 1/7] usb: mtu3: convert to devm_platform_ioremap_resource_byname Chunfeng Yun
                   ` (2 preceding siblings ...)
  2020-07-22  7:51 ` [PATCH 4/7] usb: dwc3: " Chunfeng Yun
@ 2020-07-22  7:51 ` Chunfeng Yun
  2020-07-22  7:51 ` [PATCH 6/7] usb: gadget: tegra-xudc: " Chunfeng Yun
                   ` (2 subsequent siblings)
  6 siblings, 0 replies; 15+ messages in thread
From: Chunfeng Yun @ 2020-07-22  7:51 UTC (permalink / raw)
  To: Felipe Balbi, Greg Kroah-Hartman
  Cc: linux-usb, linux-kernel, Chunfeng Yun, linux-mediatek,
	Matthias Brugger, linux-arm-kernel

Use devm_platform_ioremap_resource_byname() to simplify code

Signed-off-by: Chunfeng Yun <chunfeng.yun@mediatek.com>
---
 drivers/usb/gadget/udc/r8a66597-udc.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/drivers/usb/gadget/udc/r8a66597-udc.c b/drivers/usb/gadget/udc/r8a66597-udc.c
index 537094b4..896c1a0 100644
--- a/drivers/usb/gadget/udc/r8a66597-udc.c
+++ b/drivers/usb/gadget/udc/r8a66597-udc.c
@@ -1827,10 +1827,8 @@ static void nop_completion(struct usb_ep *ep, struct usb_request *r)
 static int r8a66597_sudmac_ioremap(struct r8a66597 *r8a66597,
 					  struct platform_device *pdev)
 {
-	struct resource *res;
-
-	res = platform_get_resource_byname(pdev, IORESOURCE_MEM, "sudmac");
-	r8a66597->sudmac_reg = devm_ioremap_resource(&pdev->dev, res);
+	r8a66597->sudmac_reg =
+		devm_platform_ioremap_resource_byname(pdev, "sudmac");
 	return PTR_ERR_OR_ZERO(r8a66597->sudmac_reg);
 }
 
-- 
1.9.1
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply related	[flat|nested] 15+ messages in thread

* [PATCH 6/7] usb: gadget: tegra-xudc: convert to devm_platform_ioremap_resource_byname
  2020-07-22  7:51 [PATCH 1/7] usb: mtu3: convert to devm_platform_ioremap_resource_byname Chunfeng Yun
                   ` (3 preceding siblings ...)
  2020-07-22  7:51 ` [PATCH 5/7] usb: gadget: r8a66597: " Chunfeng Yun
@ 2020-07-22  7:51 ` Chunfeng Yun
  2020-07-22  7:51 ` [PATCH 7/7] usb: musb: " Chunfeng Yun
  2020-09-07  7:42 ` [PATCH 1/7] usb: mtu3: " Felipe Balbi
  6 siblings, 0 replies; 15+ messages in thread
From: Chunfeng Yun @ 2020-07-22  7:51 UTC (permalink / raw)
  To: Felipe Balbi, Greg Kroah-Hartman
  Cc: linux-usb, linux-kernel, Chunfeng Yun, linux-mediatek,
	Matthias Brugger, Nagarjuna Kristam, linux-arm-kernel

Use devm_platform_ioremap_resource_byname() to simplify code

Cc: Nagarjuna Kristam <nkristam@nvidia.com>
Signed-off-by: Chunfeng Yun <chunfeng.yun@mediatek.com>
---
 drivers/usb/gadget/udc/tegra-xudc.c | 7 ++-----
 1 file changed, 2 insertions(+), 5 deletions(-)

diff --git a/drivers/usb/gadget/udc/tegra-xudc.c b/drivers/usb/gadget/udc/tegra-xudc.c
index bbe1a04..5a7c5cf 100644
--- a/drivers/usb/gadget/udc/tegra-xudc.c
+++ b/drivers/usb/gadget/udc/tegra-xudc.c
@@ -3750,15 +3750,12 @@ static int tegra_xudc_probe(struct platform_device *pdev)
 		return PTR_ERR(xudc->base);
 	xudc->phys_base = res->start;
 
-	res = platform_get_resource_byname(pdev, IORESOURCE_MEM, "fpci");
-	xudc->fpci = devm_ioremap_resource(&pdev->dev, res);
+	xudc->fpci = devm_platform_ioremap_resource_byname(pdev, "fpci");
 	if (IS_ERR(xudc->fpci))
 		return PTR_ERR(xudc->fpci);
 
 	if (xudc->soc->has_ipfs) {
-		res = platform_get_resource_byname(pdev, IORESOURCE_MEM,
-						   "ipfs");
-		xudc->ipfs = devm_ioremap_resource(&pdev->dev, res);
+		xudc->ipfs = devm_platform_ioremap_resource_byname(pdev, "ipfs");
 		if (IS_ERR(xudc->ipfs))
 			return PTR_ERR(xudc->ipfs);
 	}
-- 
1.9.1
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply related	[flat|nested] 15+ messages in thread

* [PATCH 7/7] usb: musb: convert to devm_platform_ioremap_resource_byname
  2020-07-22  7:51 [PATCH 1/7] usb: mtu3: convert to devm_platform_ioremap_resource_byname Chunfeng Yun
                   ` (4 preceding siblings ...)
  2020-07-22  7:51 ` [PATCH 6/7] usb: gadget: tegra-xudc: " Chunfeng Yun
@ 2020-07-22  7:51 ` Chunfeng Yun
  2020-11-12 14:08   ` Geert Uytterhoeven
  2020-09-07  7:42 ` [PATCH 1/7] usb: mtu3: " Felipe Balbi
  6 siblings, 1 reply; 15+ messages in thread
From: Chunfeng Yun @ 2020-07-22  7:51 UTC (permalink / raw)
  To: Felipe Balbi, Greg Kroah-Hartman
  Cc: linux-usb, linux-kernel, Chunfeng Yun, linux-mediatek,
	Matthias Brugger, Bin Liu, linux-arm-kernel

Use devm_platform_ioremap_resource_byname() to simplify code

Cc: Bin Liu <b-liu@ti.com>
Signed-off-by: Chunfeng Yun <chunfeng.yun@mediatek.com>
---
 drivers/usb/musb/musb_dsps.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/drivers/usb/musb/musb_dsps.c b/drivers/usb/musb/musb_dsps.c
index 8892317..9dbf977 100644
--- a/drivers/usb/musb/musb_dsps.c
+++ b/drivers/usb/musb/musb_dsps.c
@@ -429,12 +429,10 @@ static int dsps_musb_init(struct musb *musb)
 	struct platform_device *parent = to_platform_device(dev->parent);
 	const struct dsps_musb_wrapper *wrp = glue->wrp;
 	void __iomem *reg_base;
-	struct resource *r;
 	u32 rev, val;
 	int ret;
 
-	r = platform_get_resource_byname(parent, IORESOURCE_MEM, "control");
-	reg_base = devm_ioremap_resource(dev, r);
+	reg_base = devm_platform_ioremap_resource_byname(parent, "control");
 	if (IS_ERR(reg_base))
 		return PTR_ERR(reg_base);
 	musb->ctrl_base = reg_base;
-- 
1.9.1
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply related	[flat|nested] 15+ messages in thread

* RE: [PATCH 3/7] usb: cdns3: convert to devm_platform_ioremap_resource_byname
  2020-07-22  7:51 ` [PATCH 3/7] usb: cdns3: " Chunfeng Yun
@ 2020-07-22  8:46   ` Peter Chen
  0 siblings, 0 replies; 15+ messages in thread
From: Peter Chen @ 2020-07-22  8:46 UTC (permalink / raw)
  To: Chunfeng Yun, Felipe Balbi, Greg Kroah-Hartman
  Cc: Matthias Brugger, linux-usb, linux-mediatek, linux-kernel,
	linux-arm-kernel

 
> Use devm_platform_ioremap_resource_byname() to simplify code
> 
> Cc: Peter Chen <peter.chen@nxp.com>
> Signed-off-by: Chunfeng Yun <chunfeng.yun@mediatek.com>
> ---
>  drivers/usb/cdns3/core.c | 3 +--
>  1 file changed, 1 insertion(+), 2 deletions(-)
> 
> diff --git a/drivers/usb/cdns3/core.c b/drivers/usb/cdns3/core.c index
> 19bbb5b..24faf60 100644
> --- a/drivers/usb/cdns3/core.c
> +++ b/drivers/usb/cdns3/core.c
> @@ -436,8 +436,7 @@ static int cdns3_probe(struct platform_device *pdev)
>  	if (cdns->dev_irq < 0)
>  		dev_err(dev, "couldn't get peripheral irq\n");
> 
> -	res = platform_get_resource_byname(pdev, IORESOURCE_MEM, "dev");
> -	regs = devm_ioremap_resource(dev, res);
> +	regs = devm_platform_ioremap_resource_byname(pdev, "dev");
>  	if (IS_ERR(regs))
>  		return PTR_ERR(regs);
>  	cdns->dev_regs	= regs;
> --

Reviewed-by: Peter Chen <peter.chen@nxp.com>

Peter

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: [PATCH 4/7] usb: dwc3: convert to devm_platform_ioremap_resource_byname
  2020-07-22  7:51 ` [PATCH 4/7] usb: dwc3: " Chunfeng Yun
@ 2020-07-27 12:55   ` Patrice CHOTARD
  0 siblings, 0 replies; 15+ messages in thread
From: Patrice CHOTARD @ 2020-07-27 12:55 UTC (permalink / raw)
  To: Chunfeng Yun, Felipe Balbi, Greg Kroah-Hartman
  Cc: Matthias Brugger, linux-usb, linux-mediatek, linux-kernel,
	linux-arm-kernel

Hi Chunfeng

On 7/22/20 9:51 AM, Chunfeng Yun wrote:
> Use devm_platform_ioremap_resource_byname() to simplify code
>
> Cc: Patrice Chotard <patrice.chotard@st.com>
> Signed-off-by: Chunfeng Yun <chunfeng.yun@mediatek.com>
> ---
>  drivers/usb/dwc3/dwc3-st.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/usb/dwc3/dwc3-st.c b/drivers/usb/dwc3/dwc3-st.c
> index c682420..e733be8 100644
> --- a/drivers/usb/dwc3/dwc3-st.c
> +++ b/drivers/usb/dwc3/dwc3-st.c
> @@ -206,8 +206,8 @@ static int st_dwc3_probe(struct platform_device *pdev)
>  	if (!dwc3_data)
>  		return -ENOMEM;
>  
> -	res = platform_get_resource_byname(pdev, IORESOURCE_MEM, "reg-glue");
> -	dwc3_data->glue_base = devm_ioremap_resource(dev, res);
> +	dwc3_data->glue_base =
> +		devm_platform_ioremap_resource_byname(pdev, "reg-glue");
>  	if (IS_ERR(dwc3_data->glue_base))
>  		return PTR_ERR(dwc3_data->glue_base);
>  

Reviewed-by: Patrice Chotard <patrice.chotard@st.com>

Thanks

Patrice
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: [PATCH 1/7] usb: mtu3: convert to devm_platform_ioremap_resource_byname
  2020-07-22  7:51 [PATCH 1/7] usb: mtu3: convert to devm_platform_ioremap_resource_byname Chunfeng Yun
                   ` (5 preceding siblings ...)
  2020-07-22  7:51 ` [PATCH 7/7] usb: musb: " Chunfeng Yun
@ 2020-09-07  7:42 ` Felipe Balbi
  2020-09-18  3:38   ` Chunfeng Yun
  6 siblings, 1 reply; 15+ messages in thread
From: Felipe Balbi @ 2020-09-07  7:42 UTC (permalink / raw)
  To: Chunfeng Yun, Greg Kroah-Hartman
  Cc: linux-usb, linux-kernel, Chunfeng Yun, linux-mediatek,
	Matthias Brugger, linux-arm-kernel


[-- Attachment #1.1: Type: text/plain, Size: 564 bytes --]


Hi,

Chunfeng Yun <chunfeng.yun@mediatek.com> writes:
> Use devm_platform_ioremap_resource_byname() to simplify code
>
> Signed-off-by: Chunfeng Yun <chunfeng.yun@mediatek.com>

why is it so that your patches always come base64 encoded? They look
fine on the email client, but when I try to pipe the message to git am
it always gives me a lot of trouble and I have to manually decode the
body of your messages and recombine with the patch.

Can you try to send your patches as actual plain text without encoding
the body with base64?

-- 
balbi

[-- Attachment #1.2: signature.asc --]
[-- Type: application/pgp-signature, Size: 857 bytes --]

[-- Attachment #2: Type: text/plain, Size: 176 bytes --]

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: [PATCH 1/7] usb: mtu3: convert to devm_platform_ioremap_resource_byname
  2020-09-07  7:42 ` [PATCH 1/7] usb: mtu3: " Felipe Balbi
@ 2020-09-18  3:38   ` Chunfeng Yun
  2020-09-24  7:20     ` Felipe Balbi
  0 siblings, 1 reply; 15+ messages in thread
From: Chunfeng Yun @ 2020-09-18  3:38 UTC (permalink / raw)
  To: Felipe Balbi
  Cc: Greg Kroah-Hartman, linux-usb, linux-kernel, linux-mediatek,
	Matthias Brugger, linux-arm-kernel

Hi Felip,


On Mon, 2020-09-07 at 10:42 +0300, Felipe Balbi wrote:
> Hi,
> 
> Chunfeng Yun <chunfeng.yun@mediatek.com> writes:
> > Use devm_platform_ioremap_resource_byname() to simplify code
> >
> > Signed-off-by: Chunfeng Yun <chunfeng.yun@mediatek.com>
> 
> why is it so that your patches always come base64 encoded? They look
> fine on the email client, but when I try to pipe the message to git am
> it always gives me a lot of trouble and I have to manually decode the
> body of your messages and recombine with the patch.
> 
> Can you try to send your patches as actual plain text without encoding
> the body with base64?
Missed the email.

Sorry for inconvenience!
Is only the commit message base64 encoded, or includes the codes?

> 

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: [PATCH 1/7] usb: mtu3: convert to devm_platform_ioremap_resource_byname
  2020-09-18  3:38   ` Chunfeng Yun
@ 2020-09-24  7:20     ` Felipe Balbi
  2020-09-24  8:58       ` Chunfeng Yun
  0 siblings, 1 reply; 15+ messages in thread
From: Felipe Balbi @ 2020-09-24  7:20 UTC (permalink / raw)
  To: Chunfeng Yun
  Cc: Greg Kroah-Hartman, linux-usb, linux-kernel, linux-mediatek,
	Matthias Brugger, linux-arm-kernel


[-- Attachment #1.1: Type: text/plain, Size: 878 bytes --]

Chunfeng Yun <chunfeng.yun@mediatek.com> writes:

> Hi Felip,
>
>
> On Mon, 2020-09-07 at 10:42 +0300, Felipe Balbi wrote:
>> Hi,
>> 
>> Chunfeng Yun <chunfeng.yun@mediatek.com> writes:
>> > Use devm_platform_ioremap_resource_byname() to simplify code
>> >
>> > Signed-off-by: Chunfeng Yun <chunfeng.yun@mediatek.com>
>> 
>> why is it so that your patches always come base64 encoded? They look
>> fine on the email client, but when I try to pipe the message to git am
>> it always gives me a lot of trouble and I have to manually decode the
>> body of your messages and recombine with the patch.
>> 
>> Can you try to send your patches as actual plain text without encoding
>> the body with base64?
> Missed the email.
>
> Sorry for inconvenience!
> Is only the commit message base64 encoded, or includes the codes?

The entire thing :-)

-- 
balbi

[-- Attachment #1.2: signature.asc --]
[-- Type: application/pgp-signature, Size: 857 bytes --]

[-- Attachment #2: Type: text/plain, Size: 176 bytes --]

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: [PATCH 1/7] usb: mtu3: convert to devm_platform_ioremap_resource_byname
  2020-09-24  7:20     ` Felipe Balbi
@ 2020-09-24  8:58       ` Chunfeng Yun
  0 siblings, 0 replies; 15+ messages in thread
From: Chunfeng Yun @ 2020-09-24  8:58 UTC (permalink / raw)
  To: Felipe Balbi
  Cc: Greg Kroah-Hartman, linux-usb, linux-kernel, linux-mediatek,
	Matthias Brugger, linux-arm-kernel

On Thu, 2020-09-24 at 10:20 +0300, Felipe Balbi wrote:
> Chunfeng Yun <chunfeng.yun@mediatek.com> writes:
> 
> > Hi Felip,
> >
> >
> > On Mon, 2020-09-07 at 10:42 +0300, Felipe Balbi wrote:
> >> Hi,
> >> 
> >> Chunfeng Yun <chunfeng.yun@mediatek.com> writes:
> >> > Use devm_platform_ioremap_resource_byname() to simplify code
> >> >
> >> > Signed-off-by: Chunfeng Yun <chunfeng.yun@mediatek.com>
> >> 
> >> why is it so that your patches always come base64 encoded? They look
> >> fine on the email client, but when I try to pipe the message to git am
> >> it always gives me a lot of trouble and I have to manually decode the
> >> body of your messages and recombine with the patch.
> >> 
> >> Can you try to send your patches as actual plain text without encoding
> >> the body with base64?
> > Missed the email.
> >
> > Sorry for inconvenience!
> > Is only the commit message base64 encoded, or includes the codes?
> 
> The entire thing :-)
I checked my gitconfig, use the default encoding, that is 8bit. if you
still encounter the issue when apply the series patch
https://patchwork.kernel.org/patch/11764953/
I'll resend them by "git send-email --transfer-encoding=8bit 00*"

> 

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: [PATCH 7/7] usb: musb: convert to devm_platform_ioremap_resource_byname
  2020-07-22  7:51 ` [PATCH 7/7] usb: musb: " Chunfeng Yun
@ 2020-11-12 14:08   ` Geert Uytterhoeven
  2020-11-13  8:26     ` Chunfeng Yun
  0 siblings, 1 reply; 15+ messages in thread
From: Geert Uytterhoeven @ 2020-11-12 14:08 UTC (permalink / raw)
  To: Chunfeng Yun
  Cc: Felipe Balbi, Greg Kroah-Hartman, USB list,
	Linux Kernel Mailing List, linux-mediatek, Matthias Brugger,
	Bin Liu, Linux ARM

Hi Chunfeng,

On Wed, Jul 22, 2020 at 9:54 AM Chunfeng Yun <chunfeng.yun@mediatek.com> wrote:
> Use devm_platform_ioremap_resource_byname() to simplify code
>
> Cc: Bin Liu <b-liu@ti.com>
> Signed-off-by: Chunfeng Yun <chunfeng.yun@mediatek.com>

Thanks for your patch, which is now commit 2d30e408a2a6b344 ("usb: musb:
convert to devm_platform_ioremap_resource_byname") in v5.9.

> --- a/drivers/usb/musb/musb_dsps.c
> +++ b/drivers/usb/musb/musb_dsps.c
> @@ -429,12 +429,10 @@ static int dsps_musb_init(struct musb *musb)
>         struct platform_device *parent = to_platform_device(dev->parent);
>         const struct dsps_musb_wrapper *wrp = glue->wrp;
>         void __iomem *reg_base;
> -       struct resource *r;
>         u32 rev, val;
>         int ret;
>
> -       r = platform_get_resource_byname(parent, IORESOURCE_MEM, "control");
> -       reg_base = devm_ioremap_resource(dev, r);
> +       reg_base = devm_platform_ioremap_resource_byname(parent, "control");
>         if (IS_ERR(reg_base))
>                 return PTR_ERR(reg_base);
>         musb->ctrl_base = reg_base;

On Beaglebone Black, where each interface has 2 children:

    musb-dsps 47401c00.usb: can't request region for resource [mem
0x47401800-0x474019ff]
    musb-hdrc musb-hdrc.1: musb_init_controller failed with status -16
    musb-hdrc: probe of musb-hdrc.1 failed with error -16
    musb-dsps 47401400.usb: can't request region for resource [mem
0x47401000-0x474011ff]
    musb-hdrc musb-hdrc.0: musb_init_controller failed with status -16
    musb-hdrc: probe of musb-hdrc.0 failed with error -16

Before, devm_ioremap_resource() was called on "dev" ("musb-hdrc.0" or
"musb-hdrc.1"), after it is called on "&pdev->dev" ("47401400.usb" or
"47401c00.usb"), leading to a duplicate region request, which fails.

I have sent a revert:
https://lore.kernel.org/linux-usb/20201112135900.3822599-1-geert+renesas@glider.be/

Gr{oetje,eeting}s,

                        Geert

-- 
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
                                -- Linus Torvalds

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: [PATCH 7/7] usb: musb: convert to devm_platform_ioremap_resource_byname
  2020-11-12 14:08   ` Geert Uytterhoeven
@ 2020-11-13  8:26     ` Chunfeng Yun
  0 siblings, 0 replies; 15+ messages in thread
From: Chunfeng Yun @ 2020-11-13  8:26 UTC (permalink / raw)
  To: Geert Uytterhoeven
  Cc: Felipe Balbi, Greg Kroah-Hartman, USB list,
	Linux Kernel Mailing List, linux-mediatek, Matthias Brugger,
	Bin Liu, Linux ARM

On Thu, 2020-11-12 at 15:08 +0100, Geert Uytterhoeven wrote:
> Hi Chunfeng,
> 
> On Wed, Jul 22, 2020 at 9:54 AM Chunfeng Yun <chunfeng.yun@mediatek.com> wrote:
> > Use devm_platform_ioremap_resource_byname() to simplify code
> >
> > Cc: Bin Liu <b-liu@ti.com>
> > Signed-off-by: Chunfeng Yun <chunfeng.yun@mediatek.com>
> 
> Thanks for your patch, which is now commit 2d30e408a2a6b344 ("usb: musb:
> convert to devm_platform_ioremap_resource_byname") in v5.9.
> 
> > --- a/drivers/usb/musb/musb_dsps.c
> > +++ b/drivers/usb/musb/musb_dsps.c
> > @@ -429,12 +429,10 @@ static int dsps_musb_init(struct musb *musb)
> >         struct platform_device *parent = to_platform_device(dev->parent);
> >         const struct dsps_musb_wrapper *wrp = glue->wrp;
> >         void __iomem *reg_base;
> > -       struct resource *r;
> >         u32 rev, val;
> >         int ret;
> >
> > -       r = platform_get_resource_byname(parent, IORESOURCE_MEM, "control");
> > -       reg_base = devm_ioremap_resource(dev, r);
> > +       reg_base = devm_platform_ioremap_resource_byname(parent, "control");
> >         if (IS_ERR(reg_base))
> >                 return PTR_ERR(reg_base);
> >         musb->ctrl_base = reg_base;
> 
> On Beaglebone Black, where each interface has 2 children:
> 
>     musb-dsps 47401c00.usb: can't request region for resource [mem
> 0x47401800-0x474019ff]
>     musb-hdrc musb-hdrc.1: musb_init_controller failed with status -16
>     musb-hdrc: probe of musb-hdrc.1 failed with error -16
>     musb-dsps 47401400.usb: can't request region for resource [mem
> 0x47401000-0x474011ff]
>     musb-hdrc musb-hdrc.0: musb_init_controller failed with status -16
>     musb-hdrc: probe of musb-hdrc.0 failed with error -16
> 
> Before, devm_ioremap_resource() was called on "dev" ("musb-hdrc.0" or
> "musb-hdrc.1"), after it is called on "&pdev->dev" ("47401400.usb" or
> "47401c00.usb"), leading to a duplicate region request, which fails.
> 
My bad, I didn't notice that, thanks a lot.

And sorry, I missed your message

> I have sent a revert:
> https://lore.kernel.org/linux-usb/20201112135900.3822599-1-geert+renesas@glider.be/
> 
> Gr{oetje,eeting}s,
> 
>                         Geert
> 

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply	[flat|nested] 15+ messages in thread

end of thread, other threads:[~2020-11-13  8:27 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-07-22  7:51 [PATCH 1/7] usb: mtu3: convert to devm_platform_ioremap_resource_byname Chunfeng Yun
2020-07-22  7:51 ` [PATCH 2/7] usb: phy: am335x: " Chunfeng Yun
2020-07-22  7:51 ` [PATCH 3/7] usb: cdns3: " Chunfeng Yun
2020-07-22  8:46   ` Peter Chen
2020-07-22  7:51 ` [PATCH 4/7] usb: dwc3: " Chunfeng Yun
2020-07-27 12:55   ` Patrice CHOTARD
2020-07-22  7:51 ` [PATCH 5/7] usb: gadget: r8a66597: " Chunfeng Yun
2020-07-22  7:51 ` [PATCH 6/7] usb: gadget: tegra-xudc: " Chunfeng Yun
2020-07-22  7:51 ` [PATCH 7/7] usb: musb: " Chunfeng Yun
2020-11-12 14:08   ` Geert Uytterhoeven
2020-11-13  8:26     ` Chunfeng Yun
2020-09-07  7:42 ` [PATCH 1/7] usb: mtu3: " Felipe Balbi
2020-09-18  3:38   ` Chunfeng Yun
2020-09-24  7:20     ` Felipe Balbi
2020-09-24  8:58       ` Chunfeng Yun

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).