diff options
author | Colin Ian King <colin.king@canonical.com> | 2017-11-02 14:48:12 -0400 |
---|---|---|
committer | Ben Skeggs <bskeggs@redhat.com> | 2017-11-02 19:12:10 -0400 |
commit | 1a5c8164b335fb841fd9b41cd3d659de2f1c912b (patch) | |
tree | e4cd328ea56305da90de1eac8552002948f6b15e /drivers/gpu | |
parent | 690f43ab1b659a7e072a2a0b33ff5783828c168b (diff) |
drm/nouveau/bios: make const arrays hwsq_signature and edid_sig static
Don't populate arrays hwsq_signature and edid_sig on the stack but
instead make them static. Makes the object code smaller by over 190
bytes:
Before:
text data bss dec hex filename
35676 3312 64 39052 988c nouveau_bios.o
After:
text data bss dec hex filename
35319 3472 64 38855 97c7 nouveau_bios.o
(gcc version 7.2.0 x86_64)
Signed-off-by: Colin Ian King <colin.king@canonical.com>
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Diffstat (limited to 'drivers/gpu')
-rw-r--r-- | drivers/gpu/drm/nouveau/nouveau_bios.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/gpu/drm/nouveau/nouveau_bios.c b/drivers/gpu/drm/nouveau/nouveau_bios.c index c4ef3a0a737e..66bf2aff4a3e 100644 --- a/drivers/gpu/drm/nouveau/nouveau_bios.c +++ b/drivers/gpu/drm/nouveau/nouveau_bios.c | |||
@@ -1968,7 +1968,7 @@ static int load_nv17_hw_sequencer_ucode(struct drm_device *dev, | |||
1968 | * The microcode entries are found by the "HWSQ" signature. | 1968 | * The microcode entries are found by the "HWSQ" signature. |
1969 | */ | 1969 | */ |
1970 | 1970 | ||
1971 | const uint8_t hwsq_signature[] = { 'H', 'W', 'S', 'Q' }; | 1971 | static const uint8_t hwsq_signature[] = { 'H', 'W', 'S', 'Q' }; |
1972 | const int sz = sizeof(hwsq_signature); | 1972 | const int sz = sizeof(hwsq_signature); |
1973 | int hwsq_offset; | 1973 | int hwsq_offset; |
1974 | 1974 | ||
@@ -1984,7 +1984,7 @@ uint8_t *nouveau_bios_embedded_edid(struct drm_device *dev) | |||
1984 | { | 1984 | { |
1985 | struct nouveau_drm *drm = nouveau_drm(dev); | 1985 | struct nouveau_drm *drm = nouveau_drm(dev); |
1986 | struct nvbios *bios = &drm->vbios; | 1986 | struct nvbios *bios = &drm->vbios; |
1987 | const uint8_t edid_sig[] = { | 1987 | static const uint8_t edid_sig[] = { |
1988 | 0x00, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x00 }; | 1988 | 0x00, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x00 }; |
1989 | uint16_t offset = 0; | 1989 | uint16_t offset = 0; |
1990 | uint16_t newoffset; | 1990 | uint16_t newoffset; |