From: Guenter Roeck <linux@roeck-us.net>
To: Timur Tabi <timur@codeaurora.org>
Cc: linux-watchdog@vger.kernel.org,
Ashwin Chaugule <ashwin.chaugule@linaro.org>,
Vipul Gandhi <vgandhi@codeaurora.org>, Fu Wei <fu.wei@linaro.org>,
Al Stone <al.stone@linaro.org>, Wim Van Sebroeck <wim@iguana.be>,
Hanjun Guo <hanjun.guo@linaro.org>,
linaro-acpi@lists.linaro.org
Subject: Re: [PATCH] watchdog: introduce the ARM64 SBSA watchdog driver
Date: Fri, 1 May 2015 10:32:09 -0700 [thread overview]
Message-ID: <20150501173209.GA7712@roeck-us.net> (raw)
In-Reply-To: <5543B7D0.706@codeaurora.org>
On Fri, May 01, 2015 at 12:28:48PM -0500, Timur Tabi wrote:
> On 05/01/2015 11:16 AM, Timur Tabi wrote:
> >>>+ res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
> >>>+ if (!res || !res->start) {
> >>>+ dev_err(&pdev->dev, "could not get control address\n");
> >>>+ return -ENOMEM;
> >>>+ }
> >>>+
> >>devm_ioremap_resource already prints an error message if res is NULL.
> >>And res->start can not be 0 unless there is a severe infrastructure
> >>problem.
> >
> >Will fix.
> >
> >>>+ data->control = devm_ioremap_resource(&pdev->dev, res);
> >>>+ if (!data->control)
> >>>+ return -ENOMEM;
> >>>+
> >>>+ res = platform_get_resource(pdev, IORESOURCE_MEM, 1);
> >>>+ if (!res || !res->start) {
> >>>+ dev_err(&pdev->dev, "could not get refresh address\n");
> >>>+ return -ENOMEM;
> >>>+ }
> >>Same here.
>
> So I must be missing something here. I'm only printing an error message if
> platform_get_resource() fails. I'm not printing a message if
> devm_ioremap_resource() fails. Are you saying that I should not print an
> error message if platform_get_resource() fails? What's wrong with that?
>
devm_ioremap_resource already prints a message. For this reason, elsewhere in the
kernel the check for !res before calling devm_ioremap_resource is being removed,
leaving the error handling to devm_ioremap_resource. I would suggest to do the
same here.
Guenter
next prev parent reply other threads:[~2015-05-01 17:32 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-04-29 19:33 [PATCH] watchdog: introduce the ARM64 SBSA watchdog driver Timur Tabi
2015-05-01 3:30 ` Guenter Roeck
2015-05-01 16:16 ` Timur Tabi
2015-05-01 17:28 ` Timur Tabi
2015-05-01 17:32 ` Guenter Roeck [this message]
2015-05-01 17:41 ` Timur Tabi
2015-05-01 17:59 ` Guenter Roeck
2015-05-01 18:46 ` Timur Tabi
2015-05-01 17:49 ` Guenter Roeck
2015-05-01 18:42 ` Timur Tabi
2015-05-01 19:24 ` [Linaro-acpi] " Arnd Bergmann
2015-05-01 19:56 ` Timur Tabi
2015-05-01 23:31 ` Guenter Roeck
2015-05-02 13:16 ` Timur Tabi
2015-05-01 19:26 ` Guenter Roeck
2015-05-01 19:49 ` Timur Tabi
2015-05-01 19:19 ` [Linaro-acpi] " Arnd Bergmann
2015-05-01 20:15 ` Timur Tabi
2015-05-01 23:16 ` Guenter Roeck
2015-05-01 23:22 ` Timur Tabi
2015-05-01 23:33 ` Guenter Roeck
2015-05-01 13:09 ` Ashwin Chaugule
2015-05-02 13:55 ` Hanjun Guo
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=20150501173209.GA7712@roeck-us.net \
--to=linux@roeck-us.net \
--cc=al.stone@linaro.org \
--cc=ashwin.chaugule@linaro.org \
--cc=fu.wei@linaro.org \
--cc=hanjun.guo@linaro.org \
--cc=linaro-acpi@lists.linaro.org \
--cc=linux-watchdog@vger.kernel.org \
--cc=timur@codeaurora.org \
--cc=vgandhi@codeaurora.org \
--cc=wim@iguana.be \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox