netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: David Miller <davem@davemloft.net>
To: lznuaa@gmail.com
Cc: Frank.Li@freescale.com, shawn.guo@linaro.org,
	B38611@freescale.com, linux-arm-kernel@lists.infradead.org,
	netdev@vger.kernel.org, bhutchings@solarflare.com,
	s.hauer@pengutronix.de
Subject: Re: [PATCH v2 1/1 net-next] net: fec: enable pause frame to improve rx prefomance for 1G network
Date: Wed, 16 Jan 2013 22:10:21 -0500 (EST)	[thread overview]
Message-ID: <20130116.221021.1688403542986325196.davem@davemloft.net> (raw)
In-Reply-To: <CAHrpEqRV7PonDpqAvGkDf7QqSeUj+mVbnF2rA-Zjb9xfWh-_2g@mail.gmail.com>

From: Frank Li <lznuaa@gmail.com>
Date: Thu, 17 Jan 2013 10:50:36 +0800

> Any feedback about this patch?

Well it's full of stylistic problems.

>> +       /* enable pause frame*/
>> +       if ((fep->pause_flag & FEC_PAUSE_FLAG_ENABLE) ||
>> +               ((fep->pause_flag & FEC_PAUSE_FLAG_AUTONEG) &&
>> +                       fep->phy_dev && fep->phy_dev->pause)) {

This is mis-idented.

>> +
>> +               rcntl |= FEC_ENET_FCE;

That empty line before this assignment is spurious.

>> +       pause->rx_pause = pause->tx_pause;
>> +
>> +}

That empty line is unnecessary, remove it.

>> +       /* default enable pause frame auto negotiation */
>> +       if (pdev->id_entry &&
>> +                       (pdev->id_entry->driver_data & FEC_QUIRK_HAS_GBIT))

You can't possibly tell me that this indentation looks right
to you.

You must style things like this:

	if (condition1 &&
	    condition2)

That is, you must line up the first character on the second and
subsequent lines at the first column after the openning parenthesis of
the first line.

      reply	other threads:[~2013-01-17  3:10 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-01-14  8:49 [PATCH v2 1/1 net-next] net: fec: enable pause frame to improve rx prefomance for 1G network Frank Li
2013-01-17  2:50 ` Frank Li
2013-01-17  3:10   ` David Miller [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=20130116.221021.1688403542986325196.davem@davemloft.net \
    --to=davem@davemloft.net \
    --cc=B38611@freescale.com \
    --cc=Frank.Li@freescale.com \
    --cc=bhutchings@solarflare.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=lznuaa@gmail.com \
    --cc=netdev@vger.kernel.org \
    --cc=s.hauer@pengutronix.de \
    --cc=shawn.guo@linaro.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).