From: Eduardo Valentin <edubezval@gmail.com>
To: "Shenhar, Talel" <talel@amazon.com>
Cc: Dan Carpenter <dan.carpenter@oracle.com>,
Zhang Rui <rui.zhang@intel.com>,
Daniel Lezcano <daniel.lezcano@linaro.org>,
linux-pm@vger.kernel.org, kernel-janitors@vger.kernel.org
Subject: Re: [PATCH] thermal: mmio: remove some dead code
Date: Mon, 03 Jun 2019 02:09:03 +0000 [thread overview]
Message-ID: <20190603020901.GA7918@localhost.localdomain> (raw)
In-Reply-To: <87257cd4-a7c8-3531-1033-84a6f79e6588@amazon.com>
hey Dan, Talel,
On Mon, May 20, 2019 at 05:26:51PM +0300, Shenhar, Talel wrote:
>
> On 5/15/2019 12:34 PM, Dan Carpenter wrote:
> >The platform_get_resource() function doesn't return error pointers, it
> >returns NULL. The way this is normally done, is that we pass the NULL
> >resource to devm_ioremap_resource() and then check for errors from that.
> >See the comment in front of devm_ioremap_resource() for more details.
> >
> >Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
> Acked-by: Talel Shenhar <talel@amazon.com>
Cool. I will be collecting this. The only change I will do while
applying this is that the subject will look like this:
"thermal: thermal_mmio: remove some dead code"
Just to match the file / driver name.
> >---
> > drivers/thermal/thermal_mmio.c | 7 -------
> > 1 file changed, 7 deletions(-)
> >
> >diff --git a/drivers/thermal/thermal_mmio.c b/drivers/thermal/thermal_mmio.c
> >index de3cceea23bc..40524fa13533 100644
> >--- a/drivers/thermal/thermal_mmio.c
> >+++ b/drivers/thermal/thermal_mmio.c
> >@@ -53,13 +53,6 @@ static int thermal_mmio_probe(struct platform_device *pdev)
> > return -ENOMEM;
> > resource = platform_get_resource(pdev, IORESOURCE_MEM, 0);
> >- if (IS_ERR(resource)) {
> >- dev_err(&pdev->dev,
> >- "fail to get platform memory resource (%ld)\n",
> >- PTR_ERR(resource));
> >- return PTR_ERR(resource);
> >- }
> >-
> > sensor->mmio_base = devm_ioremap_resource(&pdev->dev, resource);
> > if (IS_ERR(sensor->mmio_base)) {
> > dev_err(&pdev->dev, "failed to ioremap memory (%ld)\n",
WARNING: multiple messages have this Message-ID (diff)
From: Eduardo Valentin <edubezval@gmail.com>
To: "Shenhar, Talel" <talel@amazon.com>
Cc: Dan Carpenter <dan.carpenter@oracle.com>,
Zhang Rui <rui.zhang@intel.com>,
Daniel Lezcano <daniel.lezcano@linaro.org>,
linux-pm@vger.kernel.org, kernel-janitors@vger.kernel.org
Subject: Re: [PATCH] thermal: mmio: remove some dead code
Date: Sun, 2 Jun 2019 19:09:03 -0700 [thread overview]
Message-ID: <20190603020901.GA7918@localhost.localdomain> (raw)
In-Reply-To: <87257cd4-a7c8-3531-1033-84a6f79e6588@amazon.com>
hey Dan, Talel,
On Mon, May 20, 2019 at 05:26:51PM +0300, Shenhar, Talel wrote:
>
> On 5/15/2019 12:34 PM, Dan Carpenter wrote:
> >The platform_get_resource() function doesn't return error pointers, it
> >returns NULL. The way this is normally done, is that we pass the NULL
> >resource to devm_ioremap_resource() and then check for errors from that.
> >See the comment in front of devm_ioremap_resource() for more details.
> >
> >Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
> Acked-by: Talel Shenhar <talel@amazon.com>
Cool. I will be collecting this. The only change I will do while
applying this is that the subject will look like this:
"thermal: thermal_mmio: remove some dead code"
Just to match the file / driver name.
> >---
> > drivers/thermal/thermal_mmio.c | 7 -------
> > 1 file changed, 7 deletions(-)
> >
> >diff --git a/drivers/thermal/thermal_mmio.c b/drivers/thermal/thermal_mmio.c
> >index de3cceea23bc..40524fa13533 100644
> >--- a/drivers/thermal/thermal_mmio.c
> >+++ b/drivers/thermal/thermal_mmio.c
> >@@ -53,13 +53,6 @@ static int thermal_mmio_probe(struct platform_device *pdev)
> > return -ENOMEM;
> > resource = platform_get_resource(pdev, IORESOURCE_MEM, 0);
> >- if (IS_ERR(resource)) {
> >- dev_err(&pdev->dev,
> >- "fail to get platform memory resource (%ld)\n",
> >- PTR_ERR(resource));
> >- return PTR_ERR(resource);
> >- }
> >-
> > sensor->mmio_base = devm_ioremap_resource(&pdev->dev, resource);
> > if (IS_ERR(sensor->mmio_base)) {
> > dev_err(&pdev->dev, "failed to ioremap memory (%ld)\n",
next prev parent reply other threads:[~2019-06-03 2:09 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-05-15 9:34 [PATCH] thermal: mmio: remove some dead code Dan Carpenter
2019-05-15 9:34 ` Dan Carpenter
2019-05-20 14:26 ` Shenhar, Talel
2019-05-20 14:26 ` Shenhar, Talel
2019-06-03 2:09 ` Eduardo Valentin [this message]
2019-06-03 2:09 ` Eduardo Valentin
2019-06-03 10:51 ` Dan Carpenter
2019-06-03 10:51 ` Dan Carpenter
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=20190603020901.GA7918@localhost.localdomain \
--to=edubezval@gmail.com \
--cc=dan.carpenter@oracle.com \
--cc=daniel.lezcano@linaro.org \
--cc=kernel-janitors@vger.kernel.org \
--cc=linux-pm@vger.kernel.org \
--cc=rui.zhang@intel.com \
--cc=talel@amazon.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.