summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorColin Ian King <colin.king@canonical.com>2021-02-04 19:11:56 +0000
committerThomas Zimmermann <tzimmermann@suse.de>2021-02-05 15:38:08 +0100
commit0c9d59c3dbcfb6a5871c03d34f4d22cd3d3de41f (patch)
tree2c54821fda8d9084e5dc410df668ccc7ddc94419 /drivers
parentf2f12eb9c32bc7a714276d8862efac2e7c41bcbe (diff)
drm/mgag200: make a const array static, makes object smaller
Don't populate the const array m_div_val on the stack but instead make it static. Makes the object code smaller by 29 bytes: Before: text data bss dec hex filename 34736 4552 0 39288 9978 drivers/gpu/drm/mgag200/mgag200_mode.o After: text data bss dec hex filename 34625 4616 0 39241 9949 drivers/gpu/drm/mgag200/mgag200_mode.o (gcc version 10.2.0) Signed-off-by: Colin Ian King <colin.king@canonical.com> Reviewed-by: Thomas Zimmermann <tzimmermann@suse.de> Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de> Link: https://patchwork.freedesktop.org/patch/msgid/20210204191156.110778-1-colin.king@canonical.com
Diffstat (limited to 'drivers')
-rw-r--r--drivers/gpu/drm/mgag200/mgag200_mode.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/gpu/drm/mgag200/mgag200_mode.c b/drivers/gpu/drm/mgag200/mgag200_mode.c
index 1dfc42170059..c3dfde8cad25 100644
--- a/drivers/gpu/drm/mgag200/mgag200_mode.c
+++ b/drivers/gpu/drm/mgag200/mgag200_mode.c
@@ -706,13 +706,13 @@ static int mga_g200eh_set_plls(struct mga_device *mdev, long clock)
static int mga_g200er_set_plls(struct mga_device *mdev, long clock)
{
+ static const unsigned int m_div_val[] = { 1, 2, 4, 8 };
unsigned int vcomax, vcomin, pllreffreq;
unsigned int delta, tmpdelta;
int testr, testn, testm, testo;
unsigned int p, m, n;
unsigned int computed, vco;
int tmp;
- const unsigned int m_div_val[] = { 1, 2, 4, 8 };
m = n = p = 0;
vcomax = 1488000;