[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-Id: <20101217.115703.183049944.davem@davemloft.net>
Date: Fri, 17 Dec 2010 11:57:03 -0800 (PST)
From: David Miller <davem@...emloft.net>
To: davidlv.linux@...il.com
Cc: jan.ceuleers@...puter.org, netdev@...r.kernel.org,
romieu@...zoreil.com
Subject: Re: [PATCH] via-velocity: fix the WOL bug on 1000M full duplex
forced mode
From: David Lv <davidlv.linux@...il.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.
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists