From: Kishon Vijay Abraham I <kishon@ti.com>
To: Axel Lin <axel.lin@ingics.com>
Cc: Gabriel FERNANDEZ <gabriel.fernandez@st.com>,
Lee Jones <lee.jones@linaro.org>,
Alexandre Torgue <alexandre.torgue@st.com>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH 1/2] phy: miphy28lp: Avoid calling of_get_child_count() multiple times
Date: Tue, 24 Feb 2015 19:17:29 +0530 [thread overview]
Message-ID: <54EC80F1.9030403@ti.com> (raw)
In-Reply-To: <1424778767.27320.2.camel@phoenix>
Hi,
On Tuesday 24 February 2015 05:22 PM, Axel Lin wrote:
> Currently, of_get_child_count() is called in each iteration of the for loop in
> miphy28lp_xlate(). This patch stores the return value of of_get_child_count()
> in miphy_dev->nphys and call of_get_child_count() once in miphy28lp_probe().
>
> Signed-off-by: Axel Lin <axel.lin@ingics.com>
> ---
> drivers/phy/phy-miphy28lp.c | 11 ++++++-----
> 1 file changed, 6 insertions(+), 5 deletions(-)
>
> diff --git a/drivers/phy/phy-miphy28lp.c b/drivers/phy/phy-miphy28lp.c
> index 9b2848e..d444932 100644
> --- a/drivers/phy/phy-miphy28lp.c
> +++ b/drivers/phy/phy-miphy28lp.c
> @@ -228,6 +228,7 @@ struct miphy28lp_dev {
> struct regmap *regmap;
> struct mutex miphy_mutex;
> struct miphy28lp_phy **phys;
> + int nphys;
it can just be a local member to miphy28lp_xlate() since it's not used anywhere
else.
Cheers
Kishon
next prev parent reply other threads:[~2015-02-24 13:47 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-02-24 11:52 [PATCH 1/2] phy: miphy28lp: Avoid calling of_get_child_count() multiple times Axel Lin
2015-02-24 11:53 ` [PATCH 2/2] phy: miphy365x: " Axel Lin
2015-02-24 13:47 ` Kishon Vijay Abraham I [this message]
2015-02-24 13:53 ` [PATCH 1/2] phy: miphy28lp: " Axel Lin
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=54EC80F1.9030403@ti.com \
--to=kishon@ti.com \
--cc=alexandre.torgue@st.com \
--cc=axel.lin@ingics.com \
--cc=gabriel.fernandez@st.com \
--cc=lee.jones@linaro.org \
--cc=linux-kernel@vger.kernel.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