OSDN Git Service

net: phy: mscc: make some arrays static const, makes object smaller
authorColin Ian King <colin.king@canonical.com>
Sun, 1 Aug 2021 07:01:55 +0000 (08:01 +0100)
committerJakub Kicinski <kuba@kernel.org>
Mon, 2 Aug 2021 16:15:07 +0000 (09:15 -0700)
commit1187c8c4642d109037202b43a5054adaef78b760
tree6dce5f22745e3aba48c959e0cab35197c1882e62
parentf36c82ac1b1bbb648d93ef715f2d2f06f3663561
net: phy: mscc: make some arrays static const, makes object smaller

Don't populate arrays on the stack but instead them static const.
Makes the object code smaller by 280 bytes.

Before:
   text    data     bss     dec     hex filename
  24142    4368     192   28702    701e ./drivers/net/phy/mscc/mscc_ptp.o

After:
   text    data     bss     dec     hex filename
  23830    4400     192   28422    6f06 ./drivers/net/phy/mscc/mscc_ptp.o

(gcc version 10.2.0)

Signed-off-by: Colin Ian King <colin.king@canonical.com>
Link: https://lore.kernel.org/r/20210801070155.139057-1-colin.king@canonical.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
drivers/net/phy/mscc/mscc_ptp.c