mirror of
https://github.com/edk2-porting/linux-next.git
synced 2025-01-10 14:43:54 +08:00
drm/nouveau/bios/dp: make array vsoff static, shrinks object size
Don't populate the array vsoff on the stack but instead make it static. Makes the object code smaller by 67 bytes: Before: text data bss dec hex filename 5753 112 0 5865 16e9 .../nouveau/nvkm/subdev/bios/dp.o After: text data bss dec hex filename 5622 176 0 5798 16a6 .../nouveau/nvkm/subdev/bios/dp.o (gcc version 8.2.0 x86_64) Signed-off-by: Colin Ian King <colin.king@canonical.com> Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
This commit is contained in:
parent
b6c8285476
commit
d83d345338
@ -212,7 +212,7 @@ nvbios_dpcfg_match(struct nvkm_bios *bios, u16 outp, u8 pc, u8 vs, u8 pe,
|
|||||||
u16 data;
|
u16 data;
|
||||||
|
|
||||||
if (*ver >= 0x30) {
|
if (*ver >= 0x30) {
|
||||||
const u8 vsoff[] = { 0, 4, 7, 9 };
|
static const u8 vsoff[] = { 0, 4, 7, 9 };
|
||||||
idx = (pc * 10) + vsoff[vs] + pe;
|
idx = (pc * 10) + vsoff[vs] + pe;
|
||||||
if (*ver >= 0x40 && *ver <= 0x41 && *hdr >= 0x12)
|
if (*ver >= 0x40 && *ver <= 0x41 && *hdr >= 0x12)
|
||||||
idx += nvbios_rd08(bios, outp + 0x11) * 40;
|
idx += nvbios_rd08(bios, outp + 0x11) * 40;
|
||||||
|
Loading…
Reference in New Issue
Block a user