[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20111201185329.GA23475@electric-eye.fr.zoreil.com>
Date: Thu, 1 Dec 2011 19:53:29 +0100
From: Francois Romieu <romieu@...zoreil.com>
To: Patrick Kelle <patrick.kelle81@...il.com>
Cc: netdev@...r.kernel.org, davem@...emloft.net, sorbica@...lus.com.tw
Subject: Re: [PATCH v2] icplus: mdio_write(), remove unnecessary for loop
Patrick Kelle <patrick.kelle81@...il.com> :
[...]
> As suggested by David Miller:
> "You can simply this even further since p[7] is what is used here,
> and this means len is one, the inner loop therefore executes only
> once, and the p[7].field value is not used (it's zero in the table)
> and the write to it is completely thrown away."
Acked-by: Francois Romieu <romieu@...zoreil.com>
However you can:
- shorten p[] as p[7] is never used
- use read_phy_bit() to avoid the last three lines
- ARRAY_SIZE(p) the first loop (so the first limit - 7 - appears)
--
Ueimor
--
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