* [PATCH] drivers: usb: chipidea: convert to devm_ioremap_resource()
@ 2013-04-10 21:05 Silviu-Mihai Popescu
2013-04-11 7:12 ` Alexander Shishkin
0 siblings, 1 reply; 3+ messages in thread
From: Silviu-Mihai Popescu @ 2013-04-10 21:05 UTC (permalink / raw)
To: linux-usb
Cc: Alexander Shishkin, Greg Kroah-Hartman, linux-kernel,
Silviu-Mihai Popescu
Convert use of devm_request_and_ioremap() to the newly introduced
devm_ioremap_resource() which provides more consistent error handling.
devm_ioremap_resource() provides its own error messages so all explicit
error messages can be removed from the failure code paths.
Signed-off-by: Silviu-Mihai Popescu <silviupopescu1990@gmail.com>
---
drivers/usb/chipidea/core.c | 8 +++-----
1 file changed, 3 insertions(+), 5 deletions(-)
diff --git a/drivers/usb/chipidea/core.c b/drivers/usb/chipidea/core.c
index 57cae1f..7f3a9e1 100644
--- a/drivers/usb/chipidea/core.c
+++ b/drivers/usb/chipidea/core.c
@@ -410,11 +410,9 @@ static int ci_hdrc_probe(struct platform_device *pdev)
return -ENODEV;
}
- base = devm_request_and_ioremap(dev, res);
- if (!base) {
- dev_err(dev, "can't request and ioremap resource\n");
- return -ENOMEM;
- }
+ base = devm_ioremap_resource(dev, res);
+ if (IS_ERR(base))
+ return PTR_ERR(base);
ci = devm_kzalloc(dev, sizeof(*ci), GFP_KERNEL);
if (!ci) {
--
1.7.9.5
^ permalink raw reply [flat|nested] 3+ messages in thread* Re: [PATCH] drivers: usb: chipidea: convert to devm_ioremap_resource()
2013-04-10 21:05 [PATCH] drivers: usb: chipidea: convert to devm_ioremap_resource() Silviu-Mihai Popescu
@ 2013-04-11 7:12 ` Alexander Shishkin
2013-04-11 7:21 ` Silviu Popescu
0 siblings, 1 reply; 3+ messages in thread
From: Alexander Shishkin @ 2013-04-11 7:12 UTC (permalink / raw)
To: Silviu-Mihai Popescu, linux-usb
Cc: Greg Kroah-Hartman, linux-kernel, Silviu-Mihai Popescu
Silviu-Mihai Popescu <silviupopescu1990@gmail.com> writes:
> Convert use of devm_request_and_ioremap() to the newly introduced
> devm_ioremap_resource() which provides more consistent error handling.
You mean, you've run coccinelle? Remember to mention it, then.
> devm_ioremap_resource() provides its own error messages so all explicit
> error messages can be removed from the failure code paths.
>
> Signed-off-by: Silviu-Mihai Popescu <silviupopescu1990@gmail.com>
That's cool, but your chipidea patches have to be based off of
ci-for-greg branch of the chipidea tree [1] or at least usb-next branch
of Greg's usb.git [2].
[1] git://github.com/virtuoso/linux-ci.git
[2] git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb.git
Regards,
--
Alex
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] drivers: usb: chipidea: convert to devm_ioremap_resource()
2013-04-11 7:12 ` Alexander Shishkin
@ 2013-04-11 7:21 ` Silviu Popescu
0 siblings, 0 replies; 3+ messages in thread
From: Silviu Popescu @ 2013-04-11 7:21 UTC (permalink / raw)
To: Alexander Shishkin; +Cc: linux-usb, Greg Kroah-Hartman, linux-kernel
On Thu, Apr 11, 2013 at 10:12 AM, Alexander Shishkin
<alexander.shishkin@linux.intel.com> wrote:
> That's cool, but your chipidea patches have to be based off of
> ci-for-greg branch of the chipidea tree [1] or at least usb-next branch
> of Greg's usb.git [2].
>
> [1] git://github.com/virtuoso/linux-ci.git
> [2] git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb.git
Thanks for the tip. I see that both trees use devm_ioremap_resource().
I'll remember to check them next time I have a patch.
--
Silviu
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2013-04-11 7:21 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-04-10 21:05 [PATCH] drivers: usb: chipidea: convert to devm_ioremap_resource() Silviu-Mihai Popescu
2013-04-11 7:12 ` Alexander Shishkin
2013-04-11 7:21 ` Silviu Popescu
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®