From: Stephen Warren <swarren-3lzwWm7+Weoh9ZMKESR00Q@public.gmane.org>
To: Venu Byravarasu <vbyravarasu-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
Cc: "balbi-l0cyMroinI0@public.gmane.org"
<balbi-l0cyMroinI0@public.gmane.org>,
"linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org"
<linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>,
"linux-usb-u79uwXL29TY76Z2rM5mHXA@public.gmane.org"
<linux-usb-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>,
"linux-tegra-u79uwXL29TY76Z2rM5mHXA@public.gmane.org"
<linux-tegra-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>
Subject: Re: [PATCH] USB: phy: re-organize tegra phy driver
Date: Wed, 12 Sep 2012 22:34:44 -0600 [thread overview]
Message-ID: <50516264.5050303@wwwdotorg.org> (raw)
In-Reply-To: <D958900912E20642BCBC71664EFECE3E6DDEFB8D8F-QZ+emBqkIFBDw2glCA4ptUEOCMrvLtNR@public.gmane.org>
On 09/12/2012 10:16 PM, Venu Byravarasu wrote:
> Forgot to address some of the comments made by stephen, in my previous update.
> Hence addressing them now.
> Thanks a lot Stephen, for detailed review.
OK, so since this patch is basically just splitting the file into
multiple parts, you can ignore most of my review comments for this patch
and consider them as input for things in future cleanup patches.
One comment below:
> Stephen Warren wrote at Thursday, September 13, 2012 12:06 AM:
>> On 09/12/2012 04:58 AM, Venu Byravarasu wrote:
...
>>> +static int tegra2_usb_phy_open(struct tegra_usb_phy *phy)
>>> +{
>>> + struct tegra_ulpi_config *ulpi_config;
>>> + int err;
>>> +
>>> + if (phy_is_ulpi(phy)) {
>>
>> Similarly, this seems like it'd be better as two separate functions,
>> since there's already an op defined for open.
>
> tegra2_usb_phy_open is called via open of ops only.
> Plz let me know if you still have any concern here.
What I meant was the body of this function is:
tegra2_usb_phy_open:
if (ulpi)
do a bunch of ULPI stuff
else
do a bunch of UTMI stuff
It's seems it'd be simpler to split this into two functions:
tegra2_usb_ulpi_phy_open:
do a bunch of ULPI stuff
tegra2_usb_utmi_phy_open:
do a bunch of UTMI stuff
... and have the code that initializes the ops assign the appropriate
one of those two functions into the open op, just like it does for
all/most other ops.
Still, this may come under the same argument as above; fuel for future
cleanup since the existing code already works this way?
prev parent reply other threads:[~2012-09-13 4:34 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <1347447481-25574-1-git-send-email-vbyravarasu@nvidia.com>
2012-09-12 18:36 ` [PATCH] USB: phy: re-organize tegra phy driver Stephen Warren
[not found] ` <5050D622.7080704-3lzwWm7+Weoh9ZMKESR00Q@public.gmane.org>
2012-09-13 3:49 ` Venu Byravarasu
[not found] ` <D958900912E20642BCBC71664EFECE3E6DDEFB8D80-QZ+emBqkIFBDw2glCA4ptUEOCMrvLtNR@public.gmane.org>
2012-09-13 4:36 ` Stephen Warren
2012-09-13 4:16 ` Venu Byravarasu
[not found] ` <D958900912E20642BCBC71664EFECE3E6DDEFB8D8F-QZ+emBqkIFBDw2glCA4ptUEOCMrvLtNR@public.gmane.org>
2012-09-13 4:34 ` Stephen Warren [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=50516264.5050303@wwwdotorg.org \
--to=swarren-3lzwwm7+weoh9zmkesr00q@public.gmane.org \
--cc=balbi-l0cyMroinI0@public.gmane.org \
--cc=linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=linux-tegra-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=linux-usb-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=vbyravarasu-DDmLM1+adcrQT0dZR+AlfA@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).