netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>
To: Florian Fainelli <f.fainelli@gmail.com>
Cc: netdev <netdev@vger.kernel.org>,
	David Miller <davem@davemloft.net>, Joe Perches <joe@perches.com>
Subject: Re: [PATCH net-next v2 4/4] net: phy: remove unneeded parenthesis
Date: Fri, 24 Jan 2014 02:59:02 +0400	[thread overview]
Message-ID: <52E19EB6.5030302@cogentembedded.com> (raw)
In-Reply-To: <CAGVrzcan4pJ7=TxTf26c08ct1q9SpdLNm_DyyHTe_=3EW3pjEw@mail.gmail.com>

Hello.

On 24-01-2014 2:39, Florian Fainelli wrote:

>>> Our if/else statement in phy_print_status() is only comprised of one
>>> line for each, remove the parenthesis.

>>     I protest, the *if* arm is multi-line, though single statement. :-)
>> Could we avoid changing that code to and fro during 3.14-rc1?

> Is it that big of a problem?

    You should be clearer in the changelog, at least. :-)

> Does that make checkpatch.pl unhappy,

    No, it doesn't.

> does that make you unhappy?

    Kind of, as it was me who added {} in net-next, IIRC.

> Since this is intentionally the last patch
> in the series, it would be trivial for David to ignore it I suppose.

    Would be fine...

>>> Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
>>> ---
>>>    drivers/net/phy/phy.c | 5 ++---
>>>    1 file changed, 2 insertions(+), 3 deletions(-)

>>> diff --git a/drivers/net/phy/phy.c b/drivers/net/phy/phy.c
>>> index 36fc6e1..59aa85e 100644
>>> --- a/drivers/net/phy/phy.c
>>> +++ b/drivers/net/phy/phy.c
>>> @@ -64,15 +64,14 @@ static const char *phy_speed_to_str(int speed)
>>>     */
>>>    void phy_print_status(struct phy_device *phydev)
>>>    {
>>> -       if (phydev->link) {
>>> +       if (phydev->link)
>>>                  netdev_info(phydev->attached_dev,
>>>                          "Link is Up - %s/%s - flow control %s\n",
>>>                          phy_speed_to_str(phydev->speed),
>>>                          DUPLEX_FULL == phydev->duplex ? "Full" : "Half",
>>>                          phydev->pause ? "rx/tx" : "off");
>>> -       } else  {
>>> +       else
>>>                  netdev_info(phydev->attached_dev, "Link is Down\n");
>>> -       }
>>>    }
>>>    EXPORT_SYMBOL(phy_print_status);

WBR, Sergei

  reply	other threads:[~2014-01-23 22:59 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-01-23 20:17 [PATCH net-next v2 0/4] net: phy: neaten phy_print_status Florian Fainelli
2014-01-23 20:17 ` [PATCH net-next v2 1/4] net: phy: use network device in phy_print_status Florian Fainelli
2014-01-23 20:17 ` [PATCH net-next v2 2/4] net: phy: update phy_print_status to show pause settings Florian Fainelli
2014-01-23 20:17 ` [PATCH net-next v2 3/4] net: phy: display human readable PHY speed settings Florian Fainelli
2014-01-23 20:17 ` [PATCH net-next v2 4/4] net: phy: remove unneeded parenthesis Florian Fainelli
2014-01-23 22:37   ` Sergei Shtylyov
2014-01-23 22:39     ` Florian Fainelli
2014-01-23 22:59       ` Sergei Shtylyov [this message]
2014-01-23 23:39   ` Fabio Estevam

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=52E19EB6.5030302@cogentembedded.com \
    --to=sergei.shtylyov@cogentembedded.com \
    --cc=davem@davemloft.net \
    --cc=f.fainelli@gmail.com \
    --cc=joe@perches.com \
    --cc=netdev@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;
as well as URLs for NNTP newsgroup(s).