Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

dpaa2-eth: make the array faf_bits static const, makes object smaller

Don't populate the array faf_bits on the stack but instead it
static const. Makes the object code smaller by 175 bytes.

Before:
text data bss dec hex filename
9645 4552 0 14197 3775 ../freescale/dpaa2/dpaa2-eth-devlink.o

After:
text data bss dec hex filename
9406 4616 0 14022 36c6 ../freescale/dpaa2/dpaa2-eth-devlink.o

(gcc version 10.2.0)

Signed-off-by: Colin Ian King <colin.king@canonical.com>
Link: https://lore.kernel.org/r/20210801152209.146359-1-colin.king@canonical.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>

authored by

Colin Ian King and committed by
Jakub Kicinski
d5731f89 a6afdb04

+1 -1
+1 -1
drivers/net/ethernet/freescale/dpaa2/dpaa2-eth-devlink.c
··· 68 68 struct dpaa2_eth_trap_item *dpaa2_eth_dl_get_trap(struct dpaa2_eth_priv *priv, 69 69 struct dpaa2_fapr *fapr) 70 70 { 71 - struct dpaa2_faf_error_bit { 71 + static const struct dpaa2_faf_error_bit { 72 72 int position; 73 73 enum devlink_trap_generic_id trap_id; 74 74 } faf_bits[] = {