]> git.baikalelectronics.ru Git - kernel.git/commit
icplus: mdio_write(), remove unnecessary for loop
authorPatrick Kelle <patrick.kelle81@gmail.com>
Thu, 1 Dec 2011 17:54:46 +0000 (12:54 -0500)
committerDavid S. Miller <davem@davemloft.net>
Thu, 1 Dec 2011 17:54:46 +0000 (12:54 -0500)
commitf831a6c8a824e537e1f34a2b38551bc816b5fe7a
treef740896af0ebbc67c4fdb4b7aa294823dae86db2
parentfaf28e7a871ede6d4910c2f85085f4ac6143d34c
icplus: mdio_write(), remove unnecessary for loop

At this point the variable j is always set to 7 and the code within
the loop has to run only once anyway.

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."

Signed-off-by: Patrick Kelle <patrick.kelle81@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/icplus/ipg.c