[<prev] [next>] [day] [month] [year] [list]
Message-Id: <20191102113954.25555-1-colin.king@canonical.com>
Date: Sat, 2 Nov 2019 11:39:54 +0000
From: Colin King <colin.king@...onical.com>
To: Ben Skeggs <bskeggs@...hat.com>, David Airlie <airlied@...ux.ie>,
Daniel Vetter <daniel@...ll.ch>,
dri-devel@...ts.freedesktop.org, nouveau@...ts.freedesktop.org
Cc: kernel-janitors@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: [PATCH] drm/nouveau/bios/init: make const arrays probe_order static, makes object smaller
From: Colin Ian King <colin.king@...onical.com>
Don't populate const arrays on the stack but instead make them
static. Makes the object code smaller by 6 bytes.
Before:
text data bss dec hex filename
103075 9692 0 112767 1b87f nvkm/subdev/bios/init.o
After:
text data bss dec hex filename
102909 9852 0 112761 1b879 nvkm/subdev/bios/init.o
(gcc version 9.2.1, amd64)
Signed-off-by: Colin Ian King <colin.king@...onical.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.20.1
Powered by blists - more mailing lists