aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/dsa/bcm_sf2.c
diff options
context:
space:
mode:
authorColin Ian King <colin.king@canonical.com>2020-10-20 17:50:29 +0100
committerJakub Kicinski <kuba@kernel.org>2020-10-20 20:57:57 -0700
commitd978d6d008fa7a90a435ba7f101dfcbcc1c816a9 (patch)
tree40556d099582b0dea509f6c0239222331ed8a4e9 /drivers/net/dsa/bcm_sf2.c
parentmptcp: MPTCP_IPV6 should depend on IPV6 instead of selecting it (diff)
downloadlinux-dev-d978d6d008fa7a90a435ba7f101dfcbcc1c816a9.tar.xz
linux-dev-d978d6d008fa7a90a435ba7f101dfcbcc1c816a9.zip
net: dsa: bcm_sf2: make const array static, makes object smaller
Don't populate the const array rate_table on the stack but instead it static. Makes the object code smaller by 46 bytes. Before: text data bss dec hex filename 29812 3824 192 33828 8424 drivers/net/dsa/bcm_sf2.o After: text data bss dec hex filename 29670 3920 192 33782 83f6 drivers/net/dsa/bcm_sf2.o (gcc version 10.2.0) Signed-off-by: Colin Ian King <colin.king@canonical.com> Acked-by: Florian Fainelli <f.fainelli@gmail.com> Link: https://lore.kernel.org/r/20201020165029.56383-1-colin.king@canonical.com Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'drivers/net/dsa/bcm_sf2.c')
-rw-r--r--drivers/net/dsa/bcm_sf2.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/net/dsa/bcm_sf2.c b/drivers/net/dsa/bcm_sf2.c
index 0b5b2b33b3b6..1e9a0adda2d6 100644
--- a/drivers/net/dsa/bcm_sf2.c
+++ b/drivers/net/dsa/bcm_sf2.c
@@ -54,7 +54,7 @@ static void bcm_sf2_recalc_clock(struct dsa_switch *ds)
unsigned long new_rate;
unsigned int ports_active;
/* Frequenty in Mhz */
- const unsigned long rate_table[] = {
+ static const unsigned long rate_table[] = {
59220000,
60820000,
62500000,