From: David Miller <davem@davemloft.net>
To: davidlv.linux@gmail.com
Cc: jan.ceuleers@computer.org, netdev@vger.kernel.org, romieu@fr.zoreil.com
Subject: Re: [PATCH] via-velocity: fix the WOL bug on 1000M full duplex forced mode
Date: Fri, 17 Dec 2010 11:57:03 -0800 (PST) [thread overview]
Message-ID: <20101217.115703.183049944.davem@davemloft.net> (raw)
In-Reply-To: <AANLkTimVVV76MRn1H8U6nA4V-A7a6WpR2eWgc+mCHjRv@mail.gmail.com>
From: David Lv <davidlv.linux@gmail.com>
Date: Fri, 17 Dec 2010 16:25:55 +0800
> I am very Sorry to cause you some trouble.
> There are some differences with this version and previous version.
>
> } else if (SPD_DPX_1000_FULL != pInfo->hw.sOpts.spd_dpx) {
> + if (SPD_DPX_AUTO == pInfo->hw.sOpts.spd_dpx) {
>
> changed to
>
> } else if (SPD_DPX_1000_FULL != vptr->options.spd_dpx) {
> + if (SPD_DPX_AUTO == vptr->options.spd_dpx) {
Can you please also fix up the indentation of the code you
are adding? The indentation of MII_REG_BITS_ON() when you split
it up into multiple lines looks terrible.
I know you want to prevent long lines, but the result is worse
than a long line.
The indentation is much deeper now because you're putting already
deeply indented code under a new conditional, the 1000_FULL test.
So to keep this from looking ugly you have two choices:
1) Use goto:
if (SPD_DPX_1000_FULL == pInfo->hw.sOpts.spd_dpx)
goto skip;
existing code...
skip:
2) Put the inner logic into a helper function, and call that when
the new conditional passes.
Thanks.
next prev parent reply other threads:[~2010-12-17 19:56 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-12-16 9:33 [PATCH] via-velocity: fix the WOL bug on 1000M full duplex forced mode David Lv
2010-12-16 18:34 ` Jan Ceuleers
2010-12-17 8:25 ` David Lv
2010-12-17 18:50 ` Jan Ceuleers
2010-12-17 19:57 ` David Miller [this message]
-- strict thread matches above, loose matches on Subject: below --
2011-01-20 14:59 Francois Romieu
2011-01-21 0:56 ` David Miller
2011-03-23 10:07 ` David Lv
2011-03-23 19:25 ` David Miller
2010-12-14 7:36 David Lv
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=20101217.115703.183049944.davem@davemloft.net \
--to=davem@davemloft.net \
--cc=davidlv.linux@gmail.com \
--cc=jan.ceuleers@computer.org \
--cc=netdev@vger.kernel.org \
--cc=romieu@fr.zoreil.com \
/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).