linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 01/13] mailbox: altera: convert to devm_platform_ioremap_resource
@ 2019-12-28 18:35 Yangtao Li
  2019-12-28 18:35 ` [PATCH 02/13] mailbox: xgene-slimpro: do some cleanup Yangtao Li
                   ` (12 more replies)
  0 siblings, 13 replies; 19+ messages in thread
From: Yangtao Li @ 2019-12-28 18:35 UTC (permalink / raw)
  To: jassisinghbrar, nsaenzjulienne, f.fainelli, rjui, sbranden,
	bcm-kernel-feedback-list, lftan, matthias.bgg, agross,
	bjorn.andersson, mcoquelin.stm32, alexandre.torgue,
	thierry.reding, jonathanh, linux-kernel, linux-rpi-kernel,
	linux-arm-kernel, nios2-dev, linux-mediatek, linux-arm-msm,
	linux-stm32, linux-tegra
  Cc: Yangtao Li

Use devm_platform_ioremap_resource() to simplify code.

Signed-off-by: Yangtao Li <tiny.windzz@gmail.com>
---
 drivers/mailbox/mailbox-altera.c | 5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)

diff --git a/drivers/mailbox/mailbox-altera.c b/drivers/mailbox/mailbox-altera.c
index 75282666fb06..afb320e9d69c 100644
--- a/drivers/mailbox/mailbox-altera.c
+++ b/drivers/mailbox/mailbox-altera.c
@@ -285,7 +285,6 @@ static const struct mbox_chan_ops altera_mbox_ops = {
 static int altera_mbox_probe(struct platform_device *pdev)
 {
 	struct altera_mbox *mbox;
-	struct resource	*regs;
 	struct mbox_chan *chans;
 	int ret;
 
@@ -299,9 +298,7 @@ static int altera_mbox_probe(struct platform_device *pdev)
 	if (!chans)
 		return -ENOMEM;
 
-	regs = platform_get_resource(pdev, IORESOURCE_MEM, 0);
-
-	mbox->mbox_base = devm_ioremap_resource(&pdev->dev, regs);
+	mbox->mbox_base = devm_platform_ioremap_resource(pdev, 0);
 	if (IS_ERR(mbox->mbox_base))
 		return PTR_ERR(mbox->mbox_base);
 
-- 
2.17.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] 19+ messages in thread

* [PATCH 02/13] mailbox: xgene-slimpro: do some cleanup
  2019-12-28 18:35 [PATCH 01/13] mailbox: altera: convert to devm_platform_ioremap_resource Yangtao Li
@ 2019-12-28 18:35 ` Yangtao Li
  2019-12-28 18:35 ` [PATCH 03/13] mailbox: qcom-apcs: convert to devm_platform_ioremap_resource Yangtao Li
                   ` (11 subsequent siblings)
  12 siblings, 0 replies; 19+ messages in thread
From: Yangtao Li @ 2019-12-28 18:35 UTC (permalink / raw)
  To: jassisinghbrar, nsaenzjulienne, f.fainelli, rjui, sbranden,
	bcm-kernel-feedback-list, lftan, matthias.bgg, agross,
	bjorn.andersson, mcoquelin.stm32, alexandre.torgue,
	thierry.reding, jonathanh, linux-kernel, linux-rpi-kernel,
	linux-arm-kernel, nios2-dev, linux-mediatek, linux-arm-msm,
	linux-stm32, linux-tegra
  Cc: Yangtao Li

Use devm_platform_ioremap_resource() to simplify code.
'i' and 'rc' are variables of the same type and there is no
need to use two lines.

Signed-off-by: Yangtao Li <tiny.windzz@gmail.com>
---
 drivers/mailbox/mailbox-xgene-slimpro.c | 7 ++-----
 1 file changed, 2 insertions(+), 5 deletions(-)

diff --git a/drivers/mailbox/mailbox-xgene-slimpro.c b/drivers/mailbox/mailbox-xgene-slimpro.c
index de260799f1b9..908c0eb99b5a 100644
--- a/drivers/mailbox/mailbox-xgene-slimpro.c
+++ b/drivers/mailbox/mailbox-xgene-slimpro.c
@@ -170,10 +170,8 @@ static const struct mbox_chan_ops slimpro_mbox_ops = {
 static int slimpro_mbox_probe(struct platform_device *pdev)
 {
 	struct slimpro_mbox *ctx;
-	struct resource *regs;
 	void __iomem *mb_base;
-	int rc;
-	int i;
+	int rc, i;
 
 	ctx = devm_kzalloc(&pdev->dev, sizeof(struct slimpro_mbox), GFP_KERNEL);
 	if (!ctx)
@@ -181,8 +179,7 @@ static int slimpro_mbox_probe(struct platform_device *pdev)
 
 	platform_set_drvdata(pdev, ctx);
 
-	regs = platform_get_resource(pdev, IORESOURCE_MEM, 0);
-	mb_base = devm_ioremap_resource(&pdev->dev, regs);
+	mb_base = devm_platform_ioremap_resource(pdev, 0);
 	if (IS_ERR(mb_base))
 		return PTR_ERR(mb_base);
 
-- 
2.17.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] 19+ messages in thread

* [PATCH 03/13] mailbox: qcom-apcs: convert to devm_platform_ioremap_resource
  2019-12-28 18:35 [PATCH 01/13] mailbox: altera: convert to devm_platform_ioremap_resource Yangtao Li
  2019-12-28 18:35 ` [PATCH 02/13] mailbox: xgene-slimpro: do some cleanup Yangtao Li
@ 2019-12-28 18:35 ` Yangtao Li
  2019-12-29  1:59   ` Bjorn Andersson
  2019-12-28 18:35 ` [PATCH 04/13] mailbox: mediatek: cmdq: " Yangtao Li
                   ` (10 subsequent siblings)
  12 siblings, 1 reply; 19+ messages in thread
From: Yangtao Li @ 2019-12-28 18:35 UTC (permalink / raw)
  To: jassisinghbrar, nsaenzjulienne, f.fainelli, rjui, sbranden,
	bcm-kernel-feedback-list, lftan, matthias.bgg, agross,
	bjorn.andersson, mcoquelin.stm32, alexandre.torgue,
	thierry.reding, jonathanh, linux-kernel, linux-rpi-kernel,
	linux-arm-kernel, nios2-dev, linux-mediatek, linux-arm-msm,
	linux-stm32, linux-tegra
  Cc: Yangtao Li

Use devm_platform_ioremap_resource() to simplify code.

Signed-off-by: Yangtao Li <tiny.windzz@gmail.com>
---
 drivers/mailbox/qcom-apcs-ipc-mailbox.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/drivers/mailbox/qcom-apcs-ipc-mailbox.c b/drivers/mailbox/qcom-apcs-ipc-mailbox.c
index eeebafd546e5..0faf69137780 100644
--- a/drivers/mailbox/qcom-apcs-ipc-mailbox.c
+++ b/drivers/mailbox/qcom-apcs-ipc-mailbox.c
@@ -49,7 +49,6 @@ static int qcom_apcs_ipc_probe(struct platform_device *pdev)
 {
 	struct qcom_apcs_ipc *apcs;
 	struct regmap *regmap;
-	struct resource *res;
 	unsigned long offset;
 	void __iomem *base;
 	unsigned long i;
@@ -64,8 +63,7 @@ static int qcom_apcs_ipc_probe(struct platform_device *pdev)
 	if (!apcs)
 		return -ENOMEM;
 
-	res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
-	base = devm_ioremap_resource(&pdev->dev, res);
+	base = devm_platform_ioremap_resource(pdev, 0);
 	if (IS_ERR(base))
 		return PTR_ERR(base);
 
-- 
2.17.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] 19+ messages in thread

* [PATCH 04/13] mailbox: mediatek: cmdq: convert to devm_platform_ioremap_resource
  2019-12-28 18:35 [PATCH 01/13] mailbox: altera: convert to devm_platform_ioremap_resource Yangtao Li
  2019-12-28 18:35 ` [PATCH 02/13] mailbox: xgene-slimpro: do some cleanup Yangtao Li
  2019-12-28 18:35 ` [PATCH 03/13] mailbox: qcom-apcs: convert to devm_platform_ioremap_resource Yangtao Li
@ 2019-12-28 18:35 ` Yangtao Li
  2019-12-30  1:58   ` CK Hu
  2019-12-28 18:35 ` [PATCH 05/13] mailbox: bcm2835: " Yangtao Li
                   ` (9 subsequent siblings)
  12 siblings, 1 reply; 19+ messages in thread
From: Yangtao Li @ 2019-12-28 18:35 UTC (permalink / raw)
  To: jassisinghbrar, nsaenzjulienne, f.fainelli, rjui, sbranden,
	bcm-kernel-feedback-list, lftan, matthias.bgg, agross,
	bjorn.andersson, mcoquelin.stm32, alexandre.torgue,
	thierry.reding, jonathanh, linux-kernel, linux-rpi-kernel,
	linux-arm-kernel, nios2-dev, linux-mediatek, linux-arm-msm,
	linux-stm32, linux-tegra
  Cc: Yangtao Li

Use devm_platform_ioremap_resource() to simplify code.

Signed-off-by: Yangtao Li <tiny.windzz@gmail.com>
---
 drivers/mailbox/mtk-cmdq-mailbox.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/drivers/mailbox/mtk-cmdq-mailbox.c b/drivers/mailbox/mtk-cmdq-mailbox.c
index 9a6ce9f5a7db..7f9e34b021c8 100644
--- a/drivers/mailbox/mtk-cmdq-mailbox.c
+++ b/drivers/mailbox/mtk-cmdq-mailbox.c
@@ -458,7 +458,6 @@ static struct mbox_chan *cmdq_xlate(struct mbox_controller *mbox,
 static int cmdq_probe(struct platform_device *pdev)
 {
 	struct device *dev = &pdev->dev;
-	struct resource *res;
 	struct cmdq *cmdq;
 	int err, i;
 
@@ -466,8 +465,7 @@ static int cmdq_probe(struct platform_device *pdev)
 	if (!cmdq)
 		return -ENOMEM;
 
-	res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
-	cmdq->base = devm_ioremap_resource(dev, res);
+	cmdq->base = devm_platform_ioremap_resource(pdev, 0);
 	if (IS_ERR(cmdq->base)) {
 		dev_err(dev, "failed to ioremap gce\n");
 		return PTR_ERR(cmdq->base);
-- 
2.17.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] 19+ messages in thread

* [PATCH 05/13] mailbox: bcm2835: convert to devm_platform_ioremap_resource
  2019-12-28 18:35 [PATCH 01/13] mailbox: altera: convert to devm_platform_ioremap_resource Yangtao Li
                   ` (2 preceding siblings ...)
  2019-12-28 18:35 ` [PATCH 04/13] mailbox: mediatek: cmdq: " Yangtao Li
@ 2019-12-28 18:35 ` Yangtao Li
  2020-01-07 10:57   ` Nicolas Saenz Julienne
  2019-12-28 18:35 ` [PATCH 06/13] mailbox: hi3660: " Yangtao Li
                   ` (8 subsequent siblings)
  12 siblings, 1 reply; 19+ messages in thread
From: Yangtao Li @ 2019-12-28 18:35 UTC (permalink / raw)
  To: jassisinghbrar, nsaenzjulienne, f.fainelli, rjui, sbranden,
	bcm-kernel-feedback-list, lftan, matthias.bgg, agross,
	bjorn.andersson, mcoquelin.stm32, alexandre.torgue,
	thierry.reding, jonathanh, linux-kernel, linux-rpi-kernel,
	linux-arm-kernel, nios2-dev, linux-mediatek, linux-arm-msm,
	linux-stm32, linux-tegra
  Cc: Yangtao Li

Use devm_platform_ioremap_resource() to simplify code.

Signed-off-by: Yangtao Li <tiny.windzz@gmail.com>
---
 drivers/mailbox/bcm2835-mailbox.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/drivers/mailbox/bcm2835-mailbox.c b/drivers/mailbox/bcm2835-mailbox.c
index 39761d190545..79f93c9c7682 100644
--- a/drivers/mailbox/bcm2835-mailbox.c
+++ b/drivers/mailbox/bcm2835-mailbox.c
@@ -137,7 +137,6 @@ static int bcm2835_mbox_probe(struct platform_device *pdev)
 {
 	struct device *dev = &pdev->dev;
 	int ret = 0;
-	struct resource *iomem;
 	struct bcm2835_mbox *mbox;
 
 	mbox = devm_kzalloc(dev, sizeof(*mbox), GFP_KERNEL);
@@ -153,8 +152,7 @@ static int bcm2835_mbox_probe(struct platform_device *pdev)
 		return -ENODEV;
 	}
 
-	iomem = platform_get_resource(pdev, IORESOURCE_MEM, 0);
-	mbox->regs = devm_ioremap_resource(&pdev->dev, iomem);
+	mbox->regs = devm_platform_ioremap_resource(pdev, 0);
 	if (IS_ERR(mbox->regs)) {
 		ret = PTR_ERR(mbox->regs);
 		dev_err(&pdev->dev, "Failed to remap mailbox regs: %d\n", ret);
-- 
2.17.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] 19+ messages in thread

* [PATCH 06/13] mailbox: hi3660: convert to devm_platform_ioremap_resource
  2019-12-28 18:35 [PATCH 01/13] mailbox: altera: convert to devm_platform_ioremap_resource Yangtao Li
                   ` (3 preceding siblings ...)
  2019-12-28 18:35 ` [PATCH 05/13] mailbox: bcm2835: " Yangtao Li
@ 2019-12-28 18:35 ` Yangtao Li
  2019-12-30  1:04   ` Leo Yan
  2019-12-28 18:35 ` [PATCH 07/13] mailbox: platform-mhu: " Yangtao Li
                   ` (7 subsequent siblings)
  12 siblings, 1 reply; 19+ messages in thread
From: Yangtao Li @ 2019-12-28 18:35 UTC (permalink / raw)
  To: jassisinghbrar, nsaenzjulienne, f.fainelli, rjui, sbranden,
	bcm-kernel-feedback-list, lftan, matthias.bgg, agross,
	bjorn.andersson, mcoquelin.stm32, alexandre.torgue,
	thierry.reding, jonathanh, linux-kernel, linux-rpi-kernel,
	linux-arm-kernel, nios2-dev, linux-mediatek, linux-arm-msm,
	linux-stm32, linux-tegra
  Cc: Yangtao Li

Use devm_platform_ioremap_resource() to simplify code.

Signed-off-by: Yangtao Li <tiny.windzz@gmail.com>
---
 drivers/mailbox/hi3660-mailbox.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/drivers/mailbox/hi3660-mailbox.c b/drivers/mailbox/hi3660-mailbox.c
index 53f4bc2488c5..97e2c4ed807d 100644
--- a/drivers/mailbox/hi3660-mailbox.c
+++ b/drivers/mailbox/hi3660-mailbox.c
@@ -240,7 +240,6 @@ static int hi3660_mbox_probe(struct platform_device *pdev)
 	struct device *dev = &pdev->dev;
 	struct hi3660_mbox *mbox;
 	struct mbox_chan *chan;
-	struct resource *res;
 	unsigned long ch;
 	int err;
 
@@ -248,8 +247,7 @@ static int hi3660_mbox_probe(struct platform_device *pdev)
 	if (!mbox)
 		return -ENOMEM;
 
-	res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
-	mbox->base = devm_ioremap_resource(dev, res);
+	mbox->base = devm_platform_ioremap_resource(pdev, 0);
 	if (IS_ERR(mbox->base))
 		return PTR_ERR(mbox->base);
 
-- 
2.17.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] 19+ messages in thread

* [PATCH 07/13] mailbox: platform-mhu: convert to devm_platform_ioremap_resource
  2019-12-28 18:35 [PATCH 01/13] mailbox: altera: convert to devm_platform_ioremap_resource Yangtao Li
                   ` (4 preceding siblings ...)
  2019-12-28 18:35 ` [PATCH 06/13] mailbox: hi3660: " Yangtao Li
@ 2019-12-28 18:35 ` Yangtao Li
  2019-12-28 18:35 ` [PATCH 08/13] mailbox: stm32-ipcc: " Yangtao Li
                   ` (6 subsequent siblings)
  12 siblings, 0 replies; 19+ messages in thread
From: Yangtao Li @ 2019-12-28 18:35 UTC (permalink / raw)
  To: jassisinghbrar, nsaenzjulienne, f.fainelli, rjui, sbranden,
	bcm-kernel-feedback-list, lftan, matthias.bgg, agross,
	bjorn.andersson, mcoquelin.stm32, alexandre.torgue,
	thierry.reding, jonathanh, linux-kernel, linux-rpi-kernel,
	linux-arm-kernel, nios2-dev, linux-mediatek, linux-arm-msm,
	linux-stm32, linux-tegra
  Cc: Yangtao Li

Use devm_platform_ioremap_resource() to simplify code.

Signed-off-by: Yangtao Li <tiny.windzz@gmail.com>
---
 drivers/mailbox/platform_mhu.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/drivers/mailbox/platform_mhu.c b/drivers/mailbox/platform_mhu.c
index b6e34952246b..a5922ac0b0bf 100644
--- a/drivers/mailbox/platform_mhu.c
+++ b/drivers/mailbox/platform_mhu.c
@@ -117,7 +117,6 @@ static int platform_mhu_probe(struct platform_device *pdev)
 	int i, err;
 	struct platform_mhu *mhu;
 	struct device *dev = &pdev->dev;
-	struct resource *res;
 	int platform_mhu_reg[MHU_CHANS] = {
 		MHU_SEC_OFFSET, MHU_LP_OFFSET, MHU_HP_OFFSET
 	};
@@ -127,8 +126,7 @@ static int platform_mhu_probe(struct platform_device *pdev)
 	if (!mhu)
 		return -ENOMEM;
 
-	res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
-	mhu->base = devm_ioremap_resource(dev, res);
+	mhu->base = devm_platform_ioremap_resource(pdev, 0);
 	if (IS_ERR(mhu->base)) {
 		dev_err(dev, "ioremap failed\n");
 		return PTR_ERR(mhu->base);
-- 
2.17.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] 19+ messages in thread

* [PATCH 08/13] mailbox: stm32-ipcc: convert to devm_platform_ioremap_resource
  2019-12-28 18:35 [PATCH 01/13] mailbox: altera: convert to devm_platform_ioremap_resource Yangtao Li
                   ` (5 preceding siblings ...)
  2019-12-28 18:35 ` [PATCH 07/13] mailbox: platform-mhu: " Yangtao Li
@ 2019-12-28 18:35 ` Yangtao Li
  2019-12-28 18:35 ` [PATCH 09/13] mailbox: sti: do some cleanup Yangtao Li
                   ` (5 subsequent siblings)
  12 siblings, 0 replies; 19+ messages in thread
From: Yangtao Li @ 2019-12-28 18:35 UTC (permalink / raw)
  To: jassisinghbrar, nsaenzjulienne, f.fainelli, rjui, sbranden,
	bcm-kernel-feedback-list, lftan, matthias.bgg, agross,
	bjorn.andersson, mcoquelin.stm32, alexandre.torgue,
	thierry.reding, jonathanh, linux-kernel, linux-rpi-kernel,
	linux-arm-kernel, nios2-dev, linux-mediatek, linux-arm-msm,
	linux-stm32, linux-tegra
  Cc: Yangtao Li

Use devm_platform_ioremap_resource() to simplify code.

Signed-off-by: Yangtao Li <tiny.windzz@gmail.com>
---
 drivers/mailbox/stm32-ipcc.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/drivers/mailbox/stm32-ipcc.c b/drivers/mailbox/stm32-ipcc.c
index ef966887aa15..0a7e9ce0fb31 100644
--- a/drivers/mailbox/stm32-ipcc.c
+++ b/drivers/mailbox/stm32-ipcc.c
@@ -205,7 +205,6 @@ static int stm32_ipcc_probe(struct platform_device *pdev)
 	struct device *dev = &pdev->dev;
 	struct device_node *np = dev->of_node;
 	struct stm32_ipcc *ipcc;
-	struct resource *res;
 	unsigned int i;
 	int ret;
 	u32 ip_ver;
@@ -235,8 +234,7 @@ static int stm32_ipcc_probe(struct platform_device *pdev)
 	}
 
 	/* regs */
-	res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
-	ipcc->reg_base = devm_ioremap_resource(dev, res);
+	ipcc->reg_base = devm_platform_ioremap_resource(pdev, 0);
 	if (IS_ERR(ipcc->reg_base))
 		return PTR_ERR(ipcc->reg_base);
 
-- 
2.17.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] 19+ messages in thread

* [PATCH 09/13] mailbox: sti: do some cleanup
  2019-12-28 18:35 [PATCH 01/13] mailbox: altera: convert to devm_platform_ioremap_resource Yangtao Li
                   ` (6 preceding siblings ...)
  2019-12-28 18:35 ` [PATCH 08/13] mailbox: stm32-ipcc: " Yangtao Li
@ 2019-12-28 18:35 ` Yangtao Li
  2019-12-28 18:35 ` [PATCH 10/13] mailbox: tegra: convert to devm_platform_ioremap_resource Yangtao Li
                   ` (4 subsequent siblings)
  12 siblings, 0 replies; 19+ messages in thread
From: Yangtao Li @ 2019-12-28 18:35 UTC (permalink / raw)
  To: jassisinghbrar, nsaenzjulienne, f.fainelli, rjui, sbranden,
	bcm-kernel-feedback-list, lftan, matthias.bgg, agross,
	bjorn.andersson, mcoquelin.stm32, alexandre.torgue,
	thierry.reding, jonathanh, linux-kernel, linux-rpi-kernel,
	linux-arm-kernel, nios2-dev, linux-mediatek, linux-arm-msm,
	linux-stm32, linux-tegra
  Cc: Yangtao Li

Use devm_platform_ioremap_resource() to simplify code.
'irq' and 'ret' are variables of the same type and there is no
need to use two lines.

Signed-off-by: Yangtao Li <tiny.windzz@gmail.com>
---
 drivers/mailbox/mailbox-sti.c | 7 ++-----
 1 file changed, 2 insertions(+), 5 deletions(-)

diff --git a/drivers/mailbox/mailbox-sti.c b/drivers/mailbox/mailbox-sti.c
index 2baf69a0b81c..2a2316dfdca0 100644
--- a/drivers/mailbox/mailbox-sti.c
+++ b/drivers/mailbox/mailbox-sti.c
@@ -408,9 +408,7 @@ static int sti_mbox_probe(struct platform_device *pdev)
 	struct sti_mbox_device *mdev;
 	struct device_node *np = pdev->dev.of_node;
 	struct mbox_chan *chans;
-	struct resource *res;
-	int irq;
-	int ret;
+	int irq, ret;
 
 	match = of_match_device(sti_mailbox_match, &pdev->dev);
 	if (!match) {
@@ -425,8 +423,7 @@ static int sti_mbox_probe(struct platform_device *pdev)
 
 	platform_set_drvdata(pdev, mdev);
 
-	res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
-	mdev->base = devm_ioremap_resource(&pdev->dev, res);
+	mdev->base = devm_platform_ioremap_resource(pdev, 0);
 	if (IS_ERR(mdev->base))
 		return PTR_ERR(mdev->base);
 
-- 
2.17.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] 19+ messages in thread

* [PATCH 10/13] mailbox: tegra: convert to devm_platform_ioremap_resource
  2019-12-28 18:35 [PATCH 01/13] mailbox: altera: convert to devm_platform_ioremap_resource Yangtao Li
                   ` (7 preceding siblings ...)
  2019-12-28 18:35 ` [PATCH 09/13] mailbox: sti: do some cleanup Yangtao Li
@ 2019-12-28 18:35 ` Yangtao Li
  2019-12-28 18:35 ` [PATCH 11/13] mailbox: hi6220: " Yangtao Li
                   ` (3 subsequent siblings)
  12 siblings, 0 replies; 19+ messages in thread
From: Yangtao Li @ 2019-12-28 18:35 UTC (permalink / raw)
  To: jassisinghbrar, nsaenzjulienne, f.fainelli, rjui, sbranden,
	bcm-kernel-feedback-list, lftan, matthias.bgg, agross,
	bjorn.andersson, mcoquelin.stm32, alexandre.torgue,
	thierry.reding, jonathanh, linux-kernel, linux-rpi-kernel,
	linux-arm-kernel, nios2-dev, linux-mediatek, linux-arm-msm,
	linux-stm32, linux-tegra
  Cc: Yangtao Li

Use devm_platform_ioremap_resource() to simplify code.

Signed-off-by: Yangtao Li <tiny.windzz@gmail.com>
---
 drivers/mailbox/tegra-hsp.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/drivers/mailbox/tegra-hsp.c b/drivers/mailbox/tegra-hsp.c
index 834b35dc3b13..6d16e56942ff 100644
--- a/drivers/mailbox/tegra-hsp.c
+++ b/drivers/mailbox/tegra-hsp.c
@@ -631,7 +631,6 @@ static int tegra_hsp_request_shared_irq(struct tegra_hsp *hsp)
 static int tegra_hsp_probe(struct platform_device *pdev)
 {
 	struct tegra_hsp *hsp;
-	struct resource *res;
 	unsigned int i;
 	u32 value;
 	int err;
@@ -645,8 +644,7 @@ static int tegra_hsp_probe(struct platform_device *pdev)
 	INIT_LIST_HEAD(&hsp->doorbells);
 	spin_lock_init(&hsp->lock);
 
-	res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
-	hsp->regs = devm_ioremap_resource(&pdev->dev, res);
+	hsp->regs = devm_platform_ioremap_resource(pdev, 0);
 	if (IS_ERR(hsp->regs))
 		return PTR_ERR(hsp->regs);
 
-- 
2.17.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] 19+ messages in thread

* [PATCH 11/13] mailbox: hi6220: convert to devm_platform_ioremap_resource
  2019-12-28 18:35 [PATCH 01/13] mailbox: altera: convert to devm_platform_ioremap_resource Yangtao Li
                   ` (8 preceding siblings ...)
  2019-12-28 18:35 ` [PATCH 10/13] mailbox: tegra: convert to devm_platform_ioremap_resource Yangtao Li
@ 2019-12-28 18:35 ` Yangtao Li
  2019-12-28 18:35 ` [PATCH 12/13] mailbox: omap: do some cleanup Yangtao Li
                   ` (2 subsequent siblings)
  12 siblings, 0 replies; 19+ messages in thread
From: Yangtao Li @ 2019-12-28 18:35 UTC (permalink / raw)
  To: jassisinghbrar, nsaenzjulienne, f.fainelli, rjui, sbranden,
	bcm-kernel-feedback-list, lftan, matthias.bgg, agross,
	bjorn.andersson, mcoquelin.stm32, alexandre.torgue,
	thierry.reding, jonathanh, linux-kernel, linux-rpi-kernel,
	linux-arm-kernel, nios2-dev, linux-mediatek, linux-arm-msm,
	linux-stm32, linux-tegra
  Cc: Yangtao Li

Use devm_platform_ioremap_resource() to simplify code.

Signed-off-by: Yangtao Li <tiny.windzz@gmail.com>
---
 drivers/mailbox/hi6220-mailbox.c | 7 ++-----
 1 file changed, 2 insertions(+), 5 deletions(-)

diff --git a/drivers/mailbox/hi6220-mailbox.c b/drivers/mailbox/hi6220-mailbox.c
index cc236ac7a0b5..d9140a016170 100644
--- a/drivers/mailbox/hi6220-mailbox.c
+++ b/drivers/mailbox/hi6220-mailbox.c
@@ -264,7 +264,6 @@ static int hi6220_mbox_probe(struct platform_device *pdev)
 	struct device_node *node = pdev->dev.of_node;
 	struct device *dev = &pdev->dev;
 	struct hi6220_mbox *mbox;
-	struct resource *res;
 	int i, err;
 
 	mbox = devm_kzalloc(dev, sizeof(*mbox), GFP_KERNEL);
@@ -287,15 +286,13 @@ static int hi6220_mbox_probe(struct platform_device *pdev)
 	if (mbox->irq < 0)
 		return mbox->irq;
 
-	res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
-	mbox->ipc = devm_ioremap_resource(dev, res);
+	mbox->ipc = devm_platform_ioremap_resource(pdev, 0);
 	if (IS_ERR(mbox->ipc)) {
 		dev_err(dev, "ioremap ipc failed\n");
 		return PTR_ERR(mbox->ipc);
 	}
 
-	res = platform_get_resource(pdev, IORESOURCE_MEM, 1);
-	mbox->base = devm_ioremap_resource(dev, res);
+	mbox->base = devm_platform_ioremap_resource(pdev, 1);
 	if (IS_ERR(mbox->base)) {
 		dev_err(dev, "ioremap buffer failed\n");
 		return PTR_ERR(mbox->base);
-- 
2.17.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] 19+ messages in thread

* [PATCH 12/13] mailbox: omap: do some cleanup
  2019-12-28 18:35 [PATCH 01/13] mailbox: altera: convert to devm_platform_ioremap_resource Yangtao Li
                   ` (9 preceding siblings ...)
  2019-12-28 18:35 ` [PATCH 11/13] mailbox: hi6220: " Yangtao Li
@ 2019-12-28 18:35 ` Yangtao Li
  2019-12-28 18:35 ` [PATCH 13/13] mailbox: armada-37xx-rwtm: convert to devm_platform_ioremap_resource Yangtao Li
  2019-12-30  1:50 ` [PATCH 01/13] mailbox: altera: " Tan, Ley Foon
  12 siblings, 0 replies; 19+ messages in thread
From: Yangtao Li @ 2019-12-28 18:35 UTC (permalink / raw)
  To: jassisinghbrar, nsaenzjulienne, f.fainelli, rjui, sbranden,
	bcm-kernel-feedback-list, lftan, matthias.bgg, agross,
	bjorn.andersson, mcoquelin.stm32, alexandre.torgue,
	thierry.reding, jonathanh, linux-kernel, linux-rpi-kernel,
	linux-arm-kernel, nios2-dev, linux-mediatek, linux-arm-msm,
	linux-stm32, linux-tegra
  Cc: Yangtao Li

Use devm_platform_ioremap_resource() to simplify code.
'i' and 'ret' are variables of the same type and there is no
need to use two lines.

Signed-off-by: Yangtao Li <tiny.windzz@gmail.com>
---
 drivers/mailbox/omap-mailbox.c | 7 ++-----
 1 file changed, 2 insertions(+), 5 deletions(-)

diff --git a/drivers/mailbox/omap-mailbox.c b/drivers/mailbox/omap-mailbox.c
index 5978a35aac6d..9b9994be5602 100644
--- a/drivers/mailbox/omap-mailbox.c
+++ b/drivers/mailbox/omap-mailbox.c
@@ -695,8 +695,7 @@ static struct mbox_chan *omap_mbox_of_xlate(struct mbox_controller *controller,
 
 static int omap_mbox_probe(struct platform_device *pdev)
 {
-	struct resource *mem;
-	int ret;
+	int ret, i;
 	struct mbox_chan *chnls;
 	struct omap_mbox **list, *mbox, *mboxblk;
 	struct omap_mbox_fifo_info *finfo, *finfoblk;
@@ -709,7 +708,6 @@ static int omap_mbox_probe(struct platform_device *pdev)
 	u32 num_users, num_fifos;
 	u32 tmp[3];
 	u32 l;
-	int i;
 
 	if (!node) {
 		pr_err("%s: only DT-based devices are supported\n", __func__);
@@ -772,8 +770,7 @@ static int omap_mbox_probe(struct platform_device *pdev)
 	if (!mdev)
 		return -ENOMEM;
 
-	mem = platform_get_resource(pdev, IORESOURCE_MEM, 0);
-	mdev->mbox_base = devm_ioremap_resource(&pdev->dev, mem);
+	mdev->mbox_base = devm_platform_ioremap_resource(pdev, 0);
 	if (IS_ERR(mdev->mbox_base))
 		return PTR_ERR(mdev->mbox_base);
 
-- 
2.17.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] 19+ messages in thread

* [PATCH 13/13] mailbox: armada-37xx-rwtm: convert to devm_platform_ioremap_resource
  2019-12-28 18:35 [PATCH 01/13] mailbox: altera: convert to devm_platform_ioremap_resource Yangtao Li
                   ` (10 preceding siblings ...)
  2019-12-28 18:35 ` [PATCH 12/13] mailbox: omap: do some cleanup Yangtao Li
@ 2019-12-28 18:35 ` Yangtao Li
  2020-01-08  9:43   ` Gregory CLEMENT
  2019-12-30  1:50 ` [PATCH 01/13] mailbox: altera: " Tan, Ley Foon
  12 siblings, 1 reply; 19+ messages in thread
From: Yangtao Li @ 2019-12-28 18:35 UTC (permalink / raw)
  To: jassisinghbrar, nsaenzjulienne, f.fainelli, rjui, sbranden,
	bcm-kernel-feedback-list, lftan, matthias.bgg, agross,
	bjorn.andersson, mcoquelin.stm32, alexandre.torgue,
	thierry.reding, jonathanh, linux-kernel, linux-rpi-kernel,
	linux-arm-kernel, nios2-dev, linux-mediatek, linux-arm-msm,
	linux-stm32, linux-tegra
  Cc: Yangtao Li

Use devm_platform_ioremap_resource() to simplify code.

Signed-off-by: Yangtao Li <tiny.windzz@gmail.com>
---
 drivers/mailbox/armada-37xx-rwtm-mailbox.c | 5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)

diff --git a/drivers/mailbox/armada-37xx-rwtm-mailbox.c b/drivers/mailbox/armada-37xx-rwtm-mailbox.c
index 19f086716dc5..02b7b28e6969 100644
--- a/drivers/mailbox/armada-37xx-rwtm-mailbox.c
+++ b/drivers/mailbox/armada-37xx-rwtm-mailbox.c
@@ -143,7 +143,6 @@ static const struct mbox_chan_ops a37xx_mbox_ops = {
 static int armada_37xx_mbox_probe(struct platform_device *pdev)
 {
 	struct a37xx_mbox *mbox;
-	struct resource *regs;
 	struct mbox_chan *chans;
 	int ret;
 
@@ -156,9 +155,7 @@ static int armada_37xx_mbox_probe(struct platform_device *pdev)
 	if (!chans)
 		return -ENOMEM;
 
-	regs = platform_get_resource(pdev, IORESOURCE_MEM, 0);
-
-	mbox->base = devm_ioremap_resource(&pdev->dev, regs);
+	mbox->base = devm_platform_ioremap_resource(pdev, 0);
 	if (IS_ERR(mbox->base)) {
 		dev_err(&pdev->dev, "ioremap failed\n");
 		return PTR_ERR(mbox->base);
-- 
2.17.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] 19+ messages in thread

* Re: [PATCH 03/13] mailbox: qcom-apcs: convert to devm_platform_ioremap_resource
  2019-12-28 18:35 ` [PATCH 03/13] mailbox: qcom-apcs: convert to devm_platform_ioremap_resource Yangtao Li
@ 2019-12-29  1:59   ` Bjorn Andersson
  0 siblings, 0 replies; 19+ messages in thread
From: Bjorn Andersson @ 2019-12-29  1:59 UTC (permalink / raw)
  To: Yangtao Li
  Cc: thierry.reding, f.fainelli, alexandre.torgue, sbranden, rjui,
	linux-arm-msm, jassisinghbrar, linux-mediatek, linux-kernel,
	jonathanh, linux-tegra, agross, bcm-kernel-feedback-list,
	linux-rpi-kernel, mcoquelin.stm32, nios2-dev, matthias.bgg,
	lftan, linux-stm32, nsaenzjulienne, linux-arm-kernel

On Sat 28 Dec 10:35 PST 2019, Yangtao Li wrote:

> Use devm_platform_ioremap_resource() to simplify code.
> 
> Signed-off-by: Yangtao Li <tiny.windzz@gmail.com>

Reviewed-by: Bjorn Andersson <bjorn.andersson@linaro.org>

> ---
>  drivers/mailbox/qcom-apcs-ipc-mailbox.c | 4 +---
>  1 file changed, 1 insertion(+), 3 deletions(-)
> 
> diff --git a/drivers/mailbox/qcom-apcs-ipc-mailbox.c b/drivers/mailbox/qcom-apcs-ipc-mailbox.c
> index eeebafd546e5..0faf69137780 100644
> --- a/drivers/mailbox/qcom-apcs-ipc-mailbox.c
> +++ b/drivers/mailbox/qcom-apcs-ipc-mailbox.c
> @@ -49,7 +49,6 @@ static int qcom_apcs_ipc_probe(struct platform_device *pdev)
>  {
>  	struct qcom_apcs_ipc *apcs;
>  	struct regmap *regmap;
> -	struct resource *res;
>  	unsigned long offset;
>  	void __iomem *base;
>  	unsigned long i;
> @@ -64,8 +63,7 @@ static int qcom_apcs_ipc_probe(struct platform_device *pdev)
>  	if (!apcs)
>  		return -ENOMEM;
>  
> -	res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
> -	base = devm_ioremap_resource(&pdev->dev, res);
> +	base = devm_platform_ioremap_resource(pdev, 0);
>  	if (IS_ERR(base))
>  		return PTR_ERR(base);
>  
> -- 
> 2.17.1
> 

_______________________________________________
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] 19+ messages in thread

* Re: [PATCH 06/13] mailbox: hi3660: convert to devm_platform_ioremap_resource
  2019-12-28 18:35 ` [PATCH 06/13] mailbox: hi3660: " Yangtao Li
@ 2019-12-30  1:04   ` Leo Yan
  0 siblings, 0 replies; 19+ messages in thread
From: Leo Yan @ 2019-12-30  1:04 UTC (permalink / raw)
  To: Yangtao Li
  Cc: bjorn.andersson, matthias.bgg, thierry.reding, linux-stm32,
	f.fainelli, jassisinghbrar, jonathanh, agross,
	bcm-kernel-feedback-list, linux-arm-msm, alexandre.torgue, rjui,
	linux-mediatek, linux-rpi-kernel, lftan, linux-tegra,
	linux-arm-kernel, sbranden, linux-kernel, mcoquelin.stm32,
	nios2-dev, nsaenzjulienne

On Sat, Dec 28, 2019 at 06:35:31PM +0000, Yangtao Li wrote:
> Use devm_platform_ioremap_resource() to simplify code.
> 
> Signed-off-by: Yangtao Li <tiny.windzz@gmail.com>

Reviewed-by: Leo Yan <leo.yan@linaro.org>

> ---
>  drivers/mailbox/hi3660-mailbox.c | 4 +---
>  1 file changed, 1 insertion(+), 3 deletions(-)
> 
> diff --git a/drivers/mailbox/hi3660-mailbox.c b/drivers/mailbox/hi3660-mailbox.c
> index 53f4bc2488c5..97e2c4ed807d 100644
> --- a/drivers/mailbox/hi3660-mailbox.c
> +++ b/drivers/mailbox/hi3660-mailbox.c
> @@ -240,7 +240,6 @@ static int hi3660_mbox_probe(struct platform_device *pdev)
>  	struct device *dev = &pdev->dev;
>  	struct hi3660_mbox *mbox;
>  	struct mbox_chan *chan;
> -	struct resource *res;
>  	unsigned long ch;
>  	int err;
>  
> @@ -248,8 +247,7 @@ static int hi3660_mbox_probe(struct platform_device *pdev)
>  	if (!mbox)
>  		return -ENOMEM;
>  
> -	res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
> -	mbox->base = devm_ioremap_resource(dev, res);
> +	mbox->base = devm_platform_ioremap_resource(pdev, 0);
>  	if (IS_ERR(mbox->base))
>  		return PTR_ERR(mbox->base);
>  
> -- 
> 2.17.1
> 

_______________________________________________
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] 19+ messages in thread

* RE: [PATCH 01/13] mailbox: altera: convert to devm_platform_ioremap_resource
  2019-12-28 18:35 [PATCH 01/13] mailbox: altera: convert to devm_platform_ioremap_resource Yangtao Li
                   ` (11 preceding siblings ...)
  2019-12-28 18:35 ` [PATCH 13/13] mailbox: armada-37xx-rwtm: convert to devm_platform_ioremap_resource Yangtao Li
@ 2019-12-30  1:50 ` Tan, Ley Foon
  12 siblings, 0 replies; 19+ messages in thread
From: Tan, Ley Foon @ 2019-12-30  1:50 UTC (permalink / raw)
  To: Yangtao Li, jassisinghbrar, nsaenzjulienne, f.fainelli, rjui,
	sbranden, bcm-kernel-feedback-list, lftan, matthias.bgg, agross,
	bjorn.andersson, mcoquelin.stm32, alexandre.torgue,
	thierry.reding, jonathanh, linux-kernel, linux-rpi-kernel,
	linux-arm-kernel, nios2-dev, linux-mediatek, linux-arm-msm,
	linux-stm32, linux-tegra



> -----Original Message-----
> From: Yangtao Li <tiny.windzz@gmail.com>
> Sent: Sunday, December 29, 2019 2:35 AM
> To: jassisinghbrar@gmail.com; nsaenzjulienne@suse.de;
> f.fainelli@gmail.com; rjui@broadcom.com; sbranden@broadcom.com; bcm-
> kernel-feedback-list@broadcom.com; lftan@altera.com;
> matthias.bgg@gmail.com; agross@kernel.org; bjorn.andersson@linaro.org;
> mcoquelin.stm32@gmail.com; alexandre.torgue@st.com;
> thierry.reding@gmail.com; jonathanh@nvidia.com; linux-
> kernel@vger.kernel.org; linux-rpi-kernel@lists.infradead.org; linux-arm-
> kernel@lists.infradead.org; nios2-dev@lists.rocketboards.org; linux-
> mediatek@lists.infradead.org; linux-arm-msm@vger.kernel.org; linux-
> stm32@st-md-mailman.stormreply.com; linux-tegra@vger.kernel.org
> Cc: Yangtao Li <tiny.windzz@gmail.com>
> Subject: [PATCH 01/13] mailbox: altera: convert to
> devm_platform_ioremap_resource
> 
> Use devm_platform_ioremap_resource() to simplify code.
> 
> Signed-off-by: Yangtao Li <tiny.windzz@gmail.com>

Reviewed-by: Ley Foon Tan <ley.foon.tan@intel.com>

> ---
>  drivers/mailbox/mailbox-altera.c | 5 +----
>  1 file changed, 1 insertion(+), 4 deletions(-)
> 
> diff --git a/drivers/mailbox/mailbox-altera.c b/drivers/mailbox/mailbox-
> altera.c
> index 75282666fb06..afb320e9d69c 100644
> --- a/drivers/mailbox/mailbox-altera.c
> +++ b/drivers/mailbox/mailbox-altera.c
> @@ -285,7 +285,6 @@ static const struct mbox_chan_ops altera_mbox_ops
> = {  static int altera_mbox_probe(struct platform_device *pdev)  {
>         struct altera_mbox *mbox;
> -       struct resource *regs;
>         struct mbox_chan *chans;
>         int ret;
> 
> @@ -299,9 +298,7 @@ static int altera_mbox_probe(struct platform_device
> *pdev)
>         if (!chans)
>                 return -ENOMEM;
> 
> -       regs = platform_get_resource(pdev, IORESOURCE_MEM, 0);
> -
> -       mbox->mbox_base = devm_ioremap_resource(&pdev->dev, regs);
> +       mbox->mbox_base = devm_platform_ioremap_resource(pdev, 0);
>         if (IS_ERR(mbox->mbox_base))
>                 return PTR_ERR(mbox->mbox_base);
> 
> --
> 2.17.1
> 
> 
> ________________________________
> 
> Confidentiality Notice.
> This message may contain information that is confidential or otherwise
> protected from disclosure. If you are not the intended recipient, you are
> hereby notified that any use, disclosure, dissemination, distribution, or
> copying of this message, or any attachments, is strictly prohibited. If you
> have received this message in error, please advise the sender by reply e-mail,
> and delete the message and any attachments. Thank you.

_______________________________________________
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] 19+ messages in thread

* Re: [PATCH 04/13] mailbox: mediatek: cmdq: convert to devm_platform_ioremap_resource
  2019-12-28 18:35 ` [PATCH 04/13] mailbox: mediatek: cmdq: " Yangtao Li
@ 2019-12-30  1:58   ` CK Hu
  0 siblings, 0 replies; 19+ messages in thread
From: CK Hu @ 2019-12-30  1:58 UTC (permalink / raw)
  To: Yangtao Li
  Cc: bjorn.andersson, matthias.bgg, thierry.reding, linux-stm32,
	f.fainelli, jassisinghbrar, jonathanh, agross,
	bcm-kernel-feedback-list, linux-arm-msm, alexandre.torgue, rjui,
	linux-mediatek, linux-rpi-kernel, lftan, linux-tegra,
	linux-arm-kernel, sbranden, linux-kernel, mcoquelin.stm32,
	nios2-dev, nsaenzjulienne

Hi, Yangtao:

On Sat, 2019-12-28 at 18:35 +0000, Yangtao Li wrote:
> Use devm_platform_ioremap_resource() to simplify code.
> 

Reviewed-by: CK Hu <ck.hu@mediatek.com>

> Signed-off-by: Yangtao Li <tiny.windzz@gmail.com>
> ---
>  drivers/mailbox/mtk-cmdq-mailbox.c | 4 +---
>  1 file changed, 1 insertion(+), 3 deletions(-)
> 
> diff --git a/drivers/mailbox/mtk-cmdq-mailbox.c b/drivers/mailbox/mtk-cmdq-mailbox.c
> index 9a6ce9f5a7db..7f9e34b021c8 100644
> --- a/drivers/mailbox/mtk-cmdq-mailbox.c
> +++ b/drivers/mailbox/mtk-cmdq-mailbox.c
> @@ -458,7 +458,6 @@ static struct mbox_chan *cmdq_xlate(struct mbox_controller *mbox,
>  static int cmdq_probe(struct platform_device *pdev)
>  {
>  	struct device *dev = &pdev->dev;
> -	struct resource *res;
>  	struct cmdq *cmdq;
>  	int err, i;
>  
> @@ -466,8 +465,7 @@ static int cmdq_probe(struct platform_device *pdev)
>  	if (!cmdq)
>  		return -ENOMEM;
>  
> -	res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
> -	cmdq->base = devm_ioremap_resource(dev, res);
> +	cmdq->base = devm_platform_ioremap_resource(pdev, 0);
>  	if (IS_ERR(cmdq->base)) {
>  		dev_err(dev, "failed to ioremap gce\n");
>  		return PTR_ERR(cmdq->base);

_______________________________________________
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] 19+ messages in thread

* Re: [PATCH 05/13] mailbox: bcm2835: convert to devm_platform_ioremap_resource
  2019-12-28 18:35 ` [PATCH 05/13] mailbox: bcm2835: " Yangtao Li
@ 2020-01-07 10:57   ` Nicolas Saenz Julienne
  0 siblings, 0 replies; 19+ messages in thread
From: Nicolas Saenz Julienne @ 2020-01-07 10:57 UTC (permalink / raw)
  To: Yangtao Li, jassisinghbrar, f.fainelli, rjui, sbranden,
	bcm-kernel-feedback-list, lftan, matthias.bgg, agross,
	bjorn.andersson, mcoquelin.stm32, alexandre.torgue,
	thierry.reding, jonathanh, linux-kernel, linux-rpi-kernel,
	linux-arm-kernel, nios2-dev, linux-mediatek, linux-arm-msm,
	linux-stm32, linux-tegra


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

On Sat, 2019-12-28 at 18:35 +0000, Yangtao Li wrote:
> Use devm_platform_ioremap_resource() to simplify code.
> 
> Signed-off-by: Yangtao Li <tiny.windzz@gmail.com>
> ---

Reviewed-by: Nicolas Saenz Julienne <nsaenzjulienne@suse.de>

Thanks!

>  drivers/mailbox/bcm2835-mailbox.c | 4 +---
>  1 file changed, 1 insertion(+), 3 deletions(-)
> 
> diff --git a/drivers/mailbox/bcm2835-mailbox.c b/drivers/mailbox/bcm2835-
> mailbox.c
> index 39761d190545..79f93c9c7682 100644
> --- a/drivers/mailbox/bcm2835-mailbox.c
> +++ b/drivers/mailbox/bcm2835-mailbox.c
> @@ -137,7 +137,6 @@ static int bcm2835_mbox_probe(struct platform_device
> *pdev)
>  {
>  	struct device *dev = &pdev->dev;
>  	int ret = 0;
> -	struct resource *iomem;
>  	struct bcm2835_mbox *mbox;
>  
>  	mbox = devm_kzalloc(dev, sizeof(*mbox), GFP_KERNEL);
> @@ -153,8 +152,7 @@ static int bcm2835_mbox_probe(struct platform_device
> *pdev)
>  		return -ENODEV;
>  	}
>  
> -	iomem = platform_get_resource(pdev, IORESOURCE_MEM, 0);
> -	mbox->regs = devm_ioremap_resource(&pdev->dev, iomem);
> +	mbox->regs = devm_platform_ioremap_resource(pdev, 0);
>  	if (IS_ERR(mbox->regs)) {
>  		ret = PTR_ERR(mbox->regs);
>  		dev_err(&pdev->dev, "Failed to remap mailbox regs: %d\n", ret);


[-- Attachment #1.2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 488 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] 19+ messages in thread

* Re: [PATCH 13/13] mailbox: armada-37xx-rwtm: convert to devm_platform_ioremap_resource
  2019-12-28 18:35 ` [PATCH 13/13] mailbox: armada-37xx-rwtm: convert to devm_platform_ioremap_resource Yangtao Li
@ 2020-01-08  9:43   ` Gregory CLEMENT
  0 siblings, 0 replies; 19+ messages in thread
From: Gregory CLEMENT @ 2020-01-08  9:43 UTC (permalink / raw)
  To: Yangtao Li, jassisinghbrar, nsaenzjulienne, f.fainelli, rjui,
	sbranden, bcm-kernel-feedback-list, lftan, matthias.bgg, agross,
	bjorn.andersson, mcoquelin.stm32, alexandre.torgue,
	thierry.reding, jonathanh, linux-kernel, linux-rpi-kernel,
	linux-arm-kernel, nios2-dev, linux-mediatek, linux-arm-msm,
	linux-stm32, linux-tegra
  Cc: Yangtao Li

Hi Yangtao Li,

> Use devm_platform_ioremap_resource() to simplify code.
>
> Signed-off-by: Yangtao Li <tiny.windzz@gmail.com>

Applied on mvebu/drivers

Thanks,

Gregory

> ---
>  drivers/mailbox/armada-37xx-rwtm-mailbox.c | 5 +----
>  1 file changed, 1 insertion(+), 4 deletions(-)
>
> diff --git a/drivers/mailbox/armada-37xx-rwtm-mailbox.c b/drivers/mailbox/armada-37xx-rwtm-mailbox.c
> index 19f086716dc5..02b7b28e6969 100644
> --- a/drivers/mailbox/armada-37xx-rwtm-mailbox.c
> +++ b/drivers/mailbox/armada-37xx-rwtm-mailbox.c
> @@ -143,7 +143,6 @@ static const struct mbox_chan_ops a37xx_mbox_ops = {
>  static int armada_37xx_mbox_probe(struct platform_device *pdev)
>  {
>  	struct a37xx_mbox *mbox;
> -	struct resource *regs;
>  	struct mbox_chan *chans;
>  	int ret;
>  
> @@ -156,9 +155,7 @@ static int armada_37xx_mbox_probe(struct platform_device *pdev)
>  	if (!chans)
>  		return -ENOMEM;
>  
> -	regs = platform_get_resource(pdev, IORESOURCE_MEM, 0);
> -
> -	mbox->base = devm_ioremap_resource(&pdev->dev, regs);
> +	mbox->base = devm_platform_ioremap_resource(pdev, 0);
>  	if (IS_ERR(mbox->base)) {
>  		dev_err(&pdev->dev, "ioremap failed\n");
>  		return PTR_ERR(mbox->base);
> -- 
> 2.17.1
>
>
> _______________________________________________
> linux-arm-kernel mailing list
> linux-arm-kernel@lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

-- 
Gregory Clement, Bootlin
Embedded Linux and Kernel engineering
http://bootlin.com

_______________________________________________
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] 19+ messages in thread

end of thread, other threads:[~2020-01-08  9:43 UTC | newest]

Thread overview: 19+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-12-28 18:35 [PATCH 01/13] mailbox: altera: convert to devm_platform_ioremap_resource Yangtao Li
2019-12-28 18:35 ` [PATCH 02/13] mailbox: xgene-slimpro: do some cleanup Yangtao Li
2019-12-28 18:35 ` [PATCH 03/13] mailbox: qcom-apcs: convert to devm_platform_ioremap_resource Yangtao Li
2019-12-29  1:59   ` Bjorn Andersson
2019-12-28 18:35 ` [PATCH 04/13] mailbox: mediatek: cmdq: " Yangtao Li
2019-12-30  1:58   ` CK Hu
2019-12-28 18:35 ` [PATCH 05/13] mailbox: bcm2835: " Yangtao Li
2020-01-07 10:57   ` Nicolas Saenz Julienne
2019-12-28 18:35 ` [PATCH 06/13] mailbox: hi3660: " Yangtao Li
2019-12-30  1:04   ` Leo Yan
2019-12-28 18:35 ` [PATCH 07/13] mailbox: platform-mhu: " Yangtao Li
2019-12-28 18:35 ` [PATCH 08/13] mailbox: stm32-ipcc: " Yangtao Li
2019-12-28 18:35 ` [PATCH 09/13] mailbox: sti: do some cleanup Yangtao Li
2019-12-28 18:35 ` [PATCH 10/13] mailbox: tegra: convert to devm_platform_ioremap_resource Yangtao Li
2019-12-28 18:35 ` [PATCH 11/13] mailbox: hi6220: " Yangtao Li
2019-12-28 18:35 ` [PATCH 12/13] mailbox: omap: do some cleanup Yangtao Li
2019-12-28 18:35 ` [PATCH 13/13] mailbox: armada-37xx-rwtm: convert to devm_platform_ioremap_resource Yangtao Li
2020-01-08  9:43   ` Gregory CLEMENT
2019-12-30  1:50 ` [PATCH 01/13] mailbox: altera: " Tan, Ley Foon

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).