projects/linux·commit b48edb86

microblaze: Remove zalloc_maybe_bootmem()

b48edb86 · Christophe Leroy <[email protected]> · 2023-08-15 20:36:27 +02:00

Last user of zalloc_maybe_bootmem() was removed by
commit 4308e3c9e1ea ("microblaze/PCI: Remove unused allocation & free
of PCI host bridge structure")

Remove it.

Signed-off-by: Christophe Leroy <[email protected]>
Link: https://lore.kernel.org/r/bfb1601cac24d7ef8e741c83f9301e4a5a87a0b5.1692124505.git.christophe.leroy@csgroup.eu
Signed-off-by: Michal Simek <[email protected]>
Commit
b48edb8665fe7b90ff11b23bcc949fee95c035f0
Parents
0e9a2a22

Changes

2 files changed · +0 −18

FileStatusAddDelContent
arch/microblaze/include/asm/setup.hmodified+0−2View file
arch/microblaze/mm/init.cmodified+0−16View file

arch/microblaze/include/asm/setup.h

View file
diff --git a/arch/microblaze/include/asm/setup.h b/arch/microblaze/include/asm/setup.h
index 3657f5e..bf2600f 100644
--- a/arch/microblaze/include/asm/setup.h
+++ b/arch/microblaze/include/asm/setup.h
@@ -25,7 +25,5 @@ void machine_shutdown(void);
void machine_halt(void);
void machine_power_off(void);
-extern void *zalloc_maybe_bootmem(size_t size, gfp_t mask);
-
# endif /* __ASSEMBLY__ */
#endif /* _ASM_MICROBLAZE_SETUP_H */

arch/microblaze/mm/init.c

View file
diff --git a/arch/microblaze/mm/init.c b/arch/microblaze/mm/init.c
index 353fabd..3827dc7 100644
--- a/arch/microblaze/mm/init.c
+++ b/arch/microblaze/mm/init.c
@@ -270,22 +270,6 @@ asmlinkage void __init mmu_init(void)
memblock_dump_all();
}
-void * __ref zalloc_maybe_bootmem(size_t size, gfp_t mask)
-{
- void *p;
-
- if (mem_init_done) {
- p = kzalloc(size, mask);
- } else {
- p = memblock_alloc(size, SMP_CACHE_BYTES);
- if (!p)
- panic("%s: Failed to allocate %zu bytes\n",
- __func__, size);
- }
-
- return p;
-}
-
static const pgprot_t protection_map[16] = {
[VM_NONE] = PAGE_NONE,
[VM_READ] = PAGE_READONLY_X,