diff options
author | Colin Ian King <colin.king@canonical.com> | 2021-08-01 18:22:09 +0300 |
---|---|---|
committer | Jakub Kicinski <kuba@kernel.org> | 2021-08-03 01:01:55 +0300 |
commit | d5731f891a0c194fa4231c67a984b75f55c7674f (patch) | |
tree | c2d1d43305ffc698918b32ccb27e83311cdf7ed8 /drivers/net/ethernet/freescale/dpaa2/dpaa2-eth-devlink.c | |
parent | a6afdb041a2d7f514711b3bd27227e83d3cd9cf4 (diff) | |
download | linux-d5731f891a0c194fa4231c67a984b75f55c7674f.tar.xz |
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>
Diffstat (limited to 'drivers/net/ethernet/freescale/dpaa2/dpaa2-eth-devlink.c')
-rw-r--r-- | drivers/net/ethernet/freescale/dpaa2/dpaa2-eth-devlink.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/net/ethernet/freescale/dpaa2/dpaa2-eth-devlink.c b/drivers/net/ethernet/freescale/dpaa2/dpaa2-eth-devlink.c index 833696245565..8e09f65ea295 100644 --- a/drivers/net/ethernet/freescale/dpaa2/dpaa2-eth-devlink.c +++ b/drivers/net/ethernet/freescale/dpaa2/dpaa2-eth-devlink.c @@ -68,7 +68,7 @@ dpaa2_eth_dl_trap_item_lookup(struct dpaa2_eth_priv *priv, u16 trap_id) struct dpaa2_eth_trap_item *dpaa2_eth_dl_get_trap(struct dpaa2_eth_priv *priv, struct dpaa2_fapr *fapr) { - struct dpaa2_faf_error_bit { + static const struct dpaa2_faf_error_bit { int position; enum devlink_trap_generic_id trap_id; } faf_bits[] = { |