]> git.baikalelectronics.ru Git - kernel.git/commit
phy: convert swphy register generation to tabular form
authorRussell King <rmk+kernel@arm.linux.org.uk>
Thu, 23 Jun 2016 13:50:10 +0000 (14:50 +0100)
committerDavid S. Miller <davem@davemloft.net>
Mon, 27 Jun 2016 14:40:57 +0000 (10:40 -0400)
commit123a002f8f459f7453e3454c574a9bcb4e41835b
tree014542deacd2013dd7322d803a4ea121b72a8de4
parent113e16dc70abf2e5bf63b1bb2dd4e81a96e73e5e
phy: convert swphy register generation to tabular form

Convert the swphy register generation to tabular form which allows us
to eliminate multiple switch() statements.  This results in a smaller
object code size, more efficient, and easier to add support for faster
speeds.

Before:

Idx Name          Size      VMA       LMA       File off  Algn
  0 .text         00000164  00000000  00000000  00000034  2**2

   text    data     bss     dec     hex filename
    388       0       0     388     184 swphy.o

After:

Idx Name          Size      VMA       LMA       File off  Algn
  0 .text         000000fc  00000000  00000000  00000034  2**2
  5 .rodata       00000028  00000000  00000000  00000138  2**2

   text    data     bss     dec     hex filename
    324       0       0     324     144 swphy.o

Reviewed-by: Florian Fainelli <f.fainelli@gmail.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/phy/swphy.c