Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

drm/nouveau/bios: Rename prom_init() and friends functions

While working at fixing powerpc headers, I ended up with the
following error.

drivers/gpu/drm/nouveau/nvkm/subdev/bios/shadowrom.c:48:1: error: conflicting types for 'prom_init'; have 'void *(struct nvkm_bios *, const char *)'
make[5]: *** [scripts/Makefile.build:288: drivers/gpu/drm/nouveau/nvkm/subdev/bios/shadowrom.o] Error 1

powerpc and a few other architectures have a prom_init() global function.
One day or another it will conflict with the one in shadowrom.c

Those being static, they can easily be renamed. Do it.

While at it, also rename the ops structure as 'nvbios_prom' instead of
'nvbios_rom' in order to make it clear that it refers to the
NV_PROM device.

Signed-off-by: Christophe Leroy <christophe.leroy@csgroup.eu>
Reviewed-by: Lyude Paul <lyude@redhat.com>
Signed-off-by: Lyude Paul <lyude@redhat.com>
Link: https://patchwork.freedesktop.org/patch/msgid/7e0612b61511ec8030e3b2dcbfaa7751781c8b91.1647684507.git.christophe.leroy@csgroup.eu

authored by

Christophe Leroy and committed by
Lyude Paul
6aed665f 2292639b

+9 -9
+1 -1
drivers/gpu/drm/nouveau/nvkm/subdev/bios/priv.h
··· 19 19 int nvbios_extend(struct nvkm_bios *, u32 length); 20 20 int nvbios_shadow(struct nvkm_bios *); 21 21 22 - extern const struct nvbios_source nvbios_rom; 22 + extern const struct nvbios_source nvbios_prom; 23 23 extern const struct nvbios_source nvbios_ramin; 24 24 extern const struct nvbios_source nvbios_acpi_fast; 25 25 extern const struct nvbios_source nvbios_acpi_slow;
+1 -1
drivers/gpu/drm/nouveau/nvkm/subdev/bios/shadow.c
··· 171 171 struct shadow mthds[] = { 172 172 { 0, &nvbios_of }, 173 173 { 0, &nvbios_ramin }, 174 - { 0, &nvbios_rom }, 174 + { 0, &nvbios_prom }, 175 175 { 0, &nvbios_acpi_fast }, 176 176 { 4, &nvbios_acpi_slow }, 177 177 { 1, &nvbios_pcirom },
+7 -7
drivers/gpu/drm/nouveau/nvkm/subdev/bios/shadowrom.c
··· 25 25 #include <subdev/pci.h> 26 26 27 27 static u32 28 - prom_read(void *data, u32 offset, u32 length, struct nvkm_bios *bios) 28 + nvbios_prom_read(void *data, u32 offset, u32 length, struct nvkm_bios *bios) 29 29 { 30 30 struct nvkm_device *device = data; 31 31 u32 i; ··· 38 38 } 39 39 40 40 static void 41 - prom_fini(void *data) 41 + nvbios_prom_fini(void *data) 42 42 { 43 43 struct nvkm_device *device = data; 44 44 nvkm_pci_rom_shadow(device->pci, true); 45 45 } 46 46 47 47 static void * 48 - prom_init(struct nvkm_bios *bios, const char *name) 48 + nvbios_prom_init(struct nvkm_bios *bios, const char *name) 49 49 { 50 50 struct nvkm_device *device = bios->subdev.device; 51 51 if (device->card_type == NV_40 && device->chipset >= 0x4c) ··· 55 55 } 56 56 57 57 const struct nvbios_source 58 - nvbios_rom = { 58 + nvbios_prom = { 59 59 .name = "PROM", 60 - .init = prom_init, 61 - .fini = prom_fini, 62 - .read = prom_read, 60 + .init = nvbios_prom_init, 61 + .fini = nvbios_prom_fini, 62 + .read = nvbios_prom_read, 63 63 .rw = false, 64 64 };