From: Grygorii Strashko <grygorii.strashko-l0cyMroinI0@public.gmane.org>
To: Florian Fainelli <f.fainelli-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
Cc: dlos
<davinci-linux-open-source-VycZQUHpC/PFrsHnngEfi1aTQe2KTcn/@public.gmane.org>,
"linux-doc-u79uwXL29TY76Z2rM5mHXA@public.gmane.org"
<linux-doc-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>,
netdev <netdev-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>,
Randy Dunlap <rdunlap-wEGCiKHe2LqWVfeAwA7xHQ@public.gmane.org>,
"linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org"
<linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>,
<santosh.shilimkar-l0cyMroinI0@public.gmane.org>,
"David S. Miller" <davem-fT/PcQaiUtIeIZ0/mPfg9Q@public.gmane.org>,
Jonathan Cameron <jic23-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
Subject: Re: [PATCH 0/2] introduce devm_mdiobus_alloc/devm_mdiobus_free
Date: Fri, 11 Apr 2014 14:05:25 +0300 [thread overview]
Message-ID: <5347CC75.8040300@ti.com> (raw)
In-Reply-To: <CAGVrzcZ8vXBn4omyR7+ejihhcrspt-Rz_BBh55esxNFO06gHgQ-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
Hi Florian,
On 04/11/2014 07:55 AM, Florian Fainelli wrote:
> Hi Grygorii,
>
> 2014-04-04 6:40 GMT-07:00 Grygorii Strashko <grygorii.strashko-l0cyMroinI0@public.gmane.org>:
>> Introduce a resource managed devm_mdiobus_alloc()/devm_mdiobus_free()
>> to automatically clean up MDIO bus alocations made by MDIO drivers,
>> thus leading to simplified MDIO drivers code.
>>
>> Update Davinci MDIO driver ss example of new devm APIs usage.
>
> This does look good at first glance. net-next is currently closed at
> the moment, so this will have to be merged later.
Thanks. It can wait for 3.16, so I'll update & resend after rc1.
I have few more patches for davinci_mdio.c, so
my intention here was to check if I can base them on top of new API or not :)
>
> At some point, we might also want to handle the mdio_bus irq array, as
> that one is also usually dynamically allocated. Maybe we could just do
> a static irq[PHY_MAX_ADDR] allocation, 32 times the size of an integer
> might not be worth a potential leak.
It sounds good, but first of all irq field of mii_bus structure has to be made private.
And drivers have to use getter/setters to access it - then its type can be changes
simply and safely.
By the way, mdiobus_register() can be handled using DEVM approach too, but it
will a bit more complex.
[...]
>
Regards,
- grygorii
prev parent reply other threads:[~2014-04-11 11:05 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-04-04 13:40 [PATCH 0/2] introduce devm_mdiobus_alloc/devm_mdiobus_free Grygorii Strashko
[not found] ` <1396618825-4241-1-git-send-email-grygorii.strashko-l0cyMroinI0@public.gmane.org>
2014-04-04 13:40 ` [PATCH 1/2] mdio_bus: implement devm_mdiobus_alloc/devm_mdiobus_free Grygorii Strashko
2014-04-04 13:15 ` Sergei Shtylyov
[not found] ` <533EB077.6000005-M4DtvfQ/ZS1MRgGoP+s0PdBPR1lH4CV8@public.gmane.org>
2014-04-08 9:52 ` Grygorii Strashko
2014-04-04 13:40 ` [PATCH 2/2] net: davinci_mdio: use devm_* api Grygorii Strashko
2014-04-04 13:18 ` Sergei Shtylyov
2014-04-11 4:55 ` [PATCH 0/2] introduce devm_mdiobus_alloc/devm_mdiobus_free Florian Fainelli
[not found] ` <CAGVrzcZ8vXBn4omyR7+ejihhcrspt-Rz_BBh55esxNFO06gHgQ-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2014-04-11 11:05 ` Grygorii Strashko [this message]
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=5347CC75.8040300@ti.com \
--to=grygorii.strashko-l0cymroini0@public.gmane.org \
--cc=davem-fT/PcQaiUtIeIZ0/mPfg9Q@public.gmane.org \
--cc=davinci-linux-open-source-VycZQUHpC/PFrsHnngEfi1aTQe2KTcn/@public.gmane.org \
--cc=f.fainelli-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org \
--cc=jic23-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org \
--cc=linux-doc-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=netdev-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=rdunlap-wEGCiKHe2LqWVfeAwA7xHQ@public.gmane.org \
--cc=santosh.shilimkar-l0cyMroinI0@public.gmane.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).