projects
/
platform
/
kernel
/
linux-rpi.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
690f43a
)
drm/nouveau/bios: make const arrays hwsq_signature and edid_sig static
author
Colin Ian King
<colin.king@canonical.com>
Thu, 2 Nov 2017 18:48:12 +0000
(18:48 +0000)
committer
Ben Skeggs
<bskeggs@redhat.com>
Thu, 2 Nov 2017 23:12:10 +0000
(09:12 +1000)
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>
drivers/gpu/drm/nouveau/nouveau_bios.c
patch
|
blob
|
history
diff --git
a/drivers/gpu/drm/nouveau/nouveau_bios.c
b/drivers/gpu/drm/nouveau/nouveau_bios.c
index c4ef3a0a737ed0cb8553eb8a8c5e111987ac9f4c..66bf2aff4a3ed17b46e7d9cbb3dab34f6f66745b 100644
(file)
--- 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,
* The microcode entries are found by the "HWSQ" signature.
*/
- const uint8_t hwsq_signature[] = { 'H', 'W', 'S', 'Q' };
+
static
const uint8_t hwsq_signature[] = { 'H', 'W', 'S', 'Q' };
const int sz = sizeof(hwsq_signature);
int hwsq_offset;
@@
-1984,7
+1984,7
@@
uint8_t *nouveau_bios_embedded_edid(struct drm_device *dev)
{
struct nouveau_drm *drm = nouveau_drm(dev);
struct nvbios *bios = &drm->vbios;
- const uint8_t edid_sig[] = {
+
static
const uint8_t edid_sig[] = {
0x00, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x00 };
uint16_t offset = 0;
uint16_t newoffset;