* [PATCH] drm/nouveau/bios/init: make two const arrays static, makes object smaller
@ 2020-10-16 22:05 Colin King
0 siblings, 0 replies; only message in thread
From: Colin King @ 2020-10-16 22:05 UTC (permalink / raw)
To: Ben Skeggs, David Airlie, Daniel Vetter, dri-devel, nouveau
Cc: kernel-janitors, linux-kernel
From: Colin Ian King <colin.king@canonical.com>
Don't populate const arrays on the stack but instead make them
static. Makes the object code smaller by 7 bytes.
Before:
text data bss dec hex filename
104041 8284 0 112325 1b6c5 drm/nouveau/nvkm/subdev/bios/init.o
After:
text data bss dec hex filename
103874 8444 0 112318 1b6be drm/nouveau/nvkm/subdev/bios/init.o
(gcc version 10.2.0)
Signed-off-by: Colin Ian King <colin.king@canonical.com>
---
drivers/gpu/drm/nouveau/nvkm/subdev/bios/init.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/gpu/drm/nouveau/nvkm/subdev/bios/init.c b/drivers/gpu/drm/nouveau/nvkm/subdev/bios/init.c
index 9de74f41dcd2..dc8625eff20a 100644
--- a/drivers/gpu/drm/nouveau/nvkm/subdev/bios/init.c
+++ b/drivers/gpu/drm/nouveau/nvkm/subdev/bios/init.c
@@ -546,9 +546,9 @@ init_tmds_reg(struct nvbios_init *init, u8 tmds)
* CR58 for CR57 = 0 to index a table of offsets to the basic
* 0x6808b0 address, and then flip the offset by 8.
*/
- const int pramdac_offset[13] = {
+ static const int pramdac_offset[13] = {
0, 0, 0x8, 0, 0x2000, 0, 0, 0, 0x2008, 0, 0, 0, 0x2000 };
- const u32 pramdac_table[4] = {
+ static const u32 pramdac_table[4] = {
0x6808b0, 0x6808b8, 0x6828b0, 0x6828b8 };
if (tmds >= 0x80) {
--
2.27.0
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2020-10-16 22:06 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-10-16 22:05 [PATCH] drm/nouveau/bios/init: make two const arrays static, makes object smaller Colin King
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).