From: thomas.petazzoni@free-electrons.com (Thomas Petazzoni)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCHv3] net: mvneta: use devm_ioremap_resource() instead of of_iomap()
Date: Fri, 28 Mar 2014 21:48:23 +0100 [thread overview]
Message-ID: <20140328214823.2d6955e5@skate> (raw)
In-Reply-To: <20140328.161007.1937376826264802047.davem@davemloft.net>
Dear David Miller,
On Fri, 28 Mar 2014 16:10:07 -0400 (EDT), David Miller wrote:
> From: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
> Date: Thu, 27 Mar 2014 11:39:29 +0100
>
> > The mvneta driver currently uses of_iomap(), which has two drawbacks:
> > it doesn't request the resource, and it isn't devm-style so some error
> > handling is needed.
> >
> > This commit switches to use devm_ioremap_resource() instead, which
> > automatically requests the resource (so the I/O registers region shows
> > up properly in /proc/iomem), and also is devm-style, which allows to
> > get rid of some error handling to unmap the I/O registers region.
> >
> > Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
>
> Does this actually fix any bugs? It seems like the unmaps happen in
> all the necessary cases.
>
> If it's just a simplification or cleanup I'm going to apply this to
> net-next.
The patch does not fix any bug, it is simply a cleanup/improvement, and
therefore applying to net-next is perfectly fine for me. Actually, it's
the very reason why I sent it separately from the two other patches
that fix the usage of mvneta as a module, which, them, were really bug
fixes.
Thanks a lot!
Thomas
--
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
WARNING: multiple messages have this Message-ID (diff)
From: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
To: David Miller <davem@davemloft.net>
Cc: netdev@vger.kernel.org, linux-arm-kernel@lists.infradead.org,
alior@marvell.com, gregory.clement@free-electrons.com,
ezequiel.garcia@free-electrons.com
Subject: Re: [PATCHv3] net: mvneta: use devm_ioremap_resource() instead of of_iomap()
Date: Fri, 28 Mar 2014 21:48:23 +0100 [thread overview]
Message-ID: <20140328214823.2d6955e5@skate> (raw)
In-Reply-To: <20140328.161007.1937376826264802047.davem@davemloft.net>
Dear David Miller,
On Fri, 28 Mar 2014 16:10:07 -0400 (EDT), David Miller wrote:
> From: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
> Date: Thu, 27 Mar 2014 11:39:29 +0100
>
> > The mvneta driver currently uses of_iomap(), which has two drawbacks:
> > it doesn't request the resource, and it isn't devm-style so some error
> > handling is needed.
> >
> > This commit switches to use devm_ioremap_resource() instead, which
> > automatically requests the resource (so the I/O registers region shows
> > up properly in /proc/iomem), and also is devm-style, which allows to
> > get rid of some error handling to unmap the I/O registers region.
> >
> > Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
>
> Does this actually fix any bugs? It seems like the unmaps happen in
> all the necessary cases.
>
> If it's just a simplification or cleanup I'm going to apply this to
> net-next.
The patch does not fix any bug, it is simply a cleanup/improvement, and
therefore applying to net-next is perfectly fine for me. Actually, it's
the very reason why I sent it separately from the two other patches
that fix the usage of mvneta as a module, which, them, were really bug
fixes.
Thanks a lot!
Thomas
--
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
next prev parent reply other threads:[~2014-03-28 20:48 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-03-27 10:39 [PATCHv3] net: mvneta: use devm_ioremap_resource() instead of of_iomap() Thomas Petazzoni
2014-03-27 10:39 ` Thomas Petazzoni
2014-03-28 20:10 ` David Miller
2014-03-28 20:10 ` David Miller
2014-03-28 20:48 ` Thomas Petazzoni [this message]
2014-03-28 20:48 ` Thomas Petazzoni
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=20140328214823.2d6955e5@skate \
--to=thomas.petazzoni@free-electrons.com \
--cc=linux-arm-kernel@lists.infradead.org \
/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.