All of lore.kernel.org
 help / color / mirror / Atom feed
From: Yangtao Li <tiny.windzz@gmail.com>
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 09/13] mailbox: sti: do some cleanup
Date: Sat, 28 Dec 2019 18:35:34 +0000	[thread overview]
Message-ID: <20191228183538.26189-9-tiny.windzz@gmail.com> (raw)
In-Reply-To: <20191228183538.26189-1-tiny.windzz@gmail.com>

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


WARNING: multiple messages have this Message-ID (diff)
From: Yangtao Li <tiny.windzz@gmail.com>
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 09/13] mailbox: sti: do some cleanup
Date: Sat, 28 Dec 2019 18:35:34 +0000	[thread overview]
Message-ID: <20191228183538.26189-9-tiny.windzz@gmail.com> (raw)
In-Reply-To: <20191228183538.26189-1-tiny.windzz@gmail.com>

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-mediatek mailing list
Linux-mediatek@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-mediatek

WARNING: multiple messages have this Message-ID (diff)
From: Yangtao Li <tiny.windzz@gmail.com>
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 09/13] mailbox: sti: do some cleanup
Date: Sat, 28 Dec 2019 18:35:34 +0000	[thread overview]
Message-ID: <20191228183538.26189-9-tiny.windzz@gmail.com> (raw)
In-Reply-To: <20191228183538.26189-1-tiny.windzz@gmail.com>

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

  parent reply	other threads:[~2019-12-28 18:36 UTC|newest]

Thread overview: 60+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 ` 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-28 18:35   ` 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-28 18:35   ` Yangtao Li
2019-12-29  1:59   ` Bjorn Andersson
2019-12-29  1:59     ` Bjorn Andersson
2019-12-29  1:59     ` Bjorn Andersson
2019-12-28 18:35 ` [PATCH 04/13] mailbox: mediatek: cmdq: " Yangtao Li
2019-12-28 18:35   ` Yangtao Li
2019-12-28 18:35   ` Yangtao Li
2019-12-30  1:58   ` CK Hu
2019-12-30  1:58     ` CK Hu
2019-12-30  1:58     ` CK Hu
2019-12-30  1:58     ` CK Hu
2019-12-28 18:35 ` [PATCH 05/13] mailbox: bcm2835: " Yangtao Li
2019-12-28 18:35   ` Yangtao Li
2019-12-28 18:35   ` Yangtao Li
2020-01-07 10:57   ` Nicolas Saenz Julienne
2020-01-07 10:57     ` Nicolas Saenz Julienne
2020-01-07 10:57     ` Nicolas Saenz Julienne
2019-12-28 18:35 ` [PATCH 06/13] mailbox: hi3660: " Yangtao Li
2019-12-28 18:35   ` Yangtao Li
2019-12-28 18:35   ` Yangtao Li
2019-12-30  1:04   ` Leo Yan
2019-12-30  1:04     ` Leo Yan
2019-12-30  1:04     ` Leo Yan
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   ` Yangtao Li
2019-12-28 18:35   ` Yangtao Li
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   ` Yangtao Li
2019-12-28 18:35 ` Yangtao Li [this message]
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 10/13] mailbox: tegra: convert to devm_platform_ioremap_resource Yangtao Li
2019-12-28 18:35   ` Yangtao Li
2019-12-28 18:35   ` Yangtao Li
2019-12-28 18:35 ` [PATCH 11/13] mailbox: hi6220: " Yangtao Li
2019-12-28 18:35   ` Yangtao Li
2019-12-28 18:35   ` Yangtao Li
2019-12-28 18:35 ` [PATCH 12/13] mailbox: omap: do some cleanup Yangtao Li
2019-12-28 18:35   ` 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-28 18:35   ` Yangtao Li
2019-12-28 18:35   ` Yangtao Li
2020-01-08  9:43   ` Gregory CLEMENT
2020-01-08  9:43     ` Gregory CLEMENT
2020-01-08  9:43     ` Gregory CLEMENT
2020-01-08  9:43     ` Gregory CLEMENT
2019-12-30  1:50 ` [PATCH 01/13] mailbox: altera: " Tan, Ley Foon
2019-12-30  1:50   ` Tan, Ley Foon
2019-12-30  1:50   ` Tan, Ley Foon

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20191228183538.26189-9-tiny.windzz@gmail.com \
    --to=tiny.windzz@gmail.com \
    --cc=agross@kernel.org \
    --cc=alexandre.torgue@st.com \
    --cc=bcm-kernel-feedback-list@broadcom.com \
    --cc=bjorn.andersson@linaro.org \
    --cc=f.fainelli@gmail.com \
    --cc=jassisinghbrar@gmail.com \
    --cc=jonathanh@nvidia.com \
    --cc=lftan@altera.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-arm-msm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mediatek@lists.infradead.org \
    --cc=linux-rpi-kernel@lists.infradead.org \
    --cc=linux-stm32@st-md-mailman.stormreply.com \
    --cc=linux-tegra@vger.kernel.org \
    --cc=matthias.bgg@gmail.com \
    --cc=mcoquelin.stm32@gmail.com \
    --cc=nios2-dev@lists.rocketboards.org \
    --cc=nsaenzjulienne@suse.de \
    --cc=rjui@broadcom.com \
    --cc=sbranden@broadcom.com \
    --cc=thierry.reding@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.