Skip to content

Commit

Permalink
MIPS: Remove empty prom_free_prom_memory functions
Browse files Browse the repository at this point in the history
Most of the prom_free_prom_memory functions are empty. With
a new weak prom_free_prom_memory() we can remove all of them.

Signed-off-by: Thomas Bogendoerfer <tsbogend@alpha.franken.de>
Acked-by: Florian Fainelli <f.fainelli@gmail.com>
  • Loading branch information
tsbogend committed Jan 7, 2021
1 parent c58734e commit a6e83ac
Show file tree
Hide file tree
Showing 28 changed files with 6 additions and 114 deletions.
4 changes: 0 additions & 4 deletions arch/mips/alchemy/common/prom.c
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,3 @@ int __init prom_get_ethernet_addr(char *ethernet_addr)

return 0;
}

void __init prom_free_prom_memory(void)
{
}
5 changes: 0 additions & 5 deletions arch/mips/ar7/memory.c
Original file line number Diff line number Diff line change
Expand Up @@ -49,8 +49,3 @@ void __init prom_meminit(void)
pages = memsize() >> PAGE_SHIFT;
memblock_add(PHYS_OFFSET, pages << PAGE_SHIFT);
}

void __init prom_free_prom_memory(void)
{
/* Nothing to free */
}
4 changes: 0 additions & 4 deletions arch/mips/ath25/prom.c
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,3 @@
void __init prom_init(void)
{
}

void __init prom_free_prom_memory(void)
{
}
5 changes: 0 additions & 5 deletions arch/mips/ath79/prom.c
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,3 @@ void __init prom_init(void)
}
#endif
}

void __init prom_free_prom_memory(void)
{
/* We do not have to prom memory to free */
}
4 changes: 0 additions & 4 deletions arch/mips/bcm47xx/prom.c
Original file line number Diff line number Diff line change
Expand Up @@ -113,10 +113,6 @@ void __init prom_init(void)
setup_8250_early_printk_port(CKSEG1ADDR(BCM47XX_SERIAL_ADDR), 0, 0);
}

void __init prom_free_prom_memory(void)
{
}

#if defined(CONFIG_BCM47XX_BCMA) && defined(CONFIG_HIGHMEM)

#define EXTVBASE 0xc0000000
Expand Down
4 changes: 0 additions & 4 deletions arch/mips/bcm63xx/prom.c
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,3 @@ void __init prom_init(void)
*/
}
}

void __init prom_free_prom_memory(void)
{
}
4 changes: 0 additions & 4 deletions arch/mips/bmips/setup.c
Original file line number Diff line number Diff line change
Expand Up @@ -129,10 +129,6 @@ void __init prom_init(void)
register_bmips_smp_ops();
}

void __init prom_free_prom_memory(void)
{
}

const char *get_system_type(void)
{
return "Generic BMIPS kernel";
Expand Down
5 changes: 0 additions & 5 deletions arch/mips/cobalt/setup.c
Original file line number Diff line number Diff line change
Expand Up @@ -117,8 +117,3 @@ void __init prom_init(void)

setup_8250_early_printk_port(CKSEG1ADDR(0x1c800000), 0, 0);
}

void __init prom_free_prom_memory(void)
{
/* Nothing to do! */
}
2 changes: 1 addition & 1 deletion arch/mips/fw/arc/memory.c
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,7 @@ void __weak __init prom_cleanup(void)
{
}

void __weak __init prom_free_prom_memory(void)
void __init prom_free_prom_memory(void)
{
int i;

Expand Down
4 changes: 0 additions & 4 deletions arch/mips/fw/sni/sniprom.c
Original file line number Diff line number Diff line change
Expand Up @@ -87,10 +87,6 @@ void *prom_get_hwconf(void)
return (void *)CKSEG1ADDR(hwconf);
}

void __init prom_free_prom_memory(void)
{
}

/*
* /proc/cpuinfo system type
*
Expand Down
4 changes: 0 additions & 4 deletions arch/mips/generic/init.c
Original file line number Diff line number Diff line change
Expand Up @@ -202,7 +202,3 @@ void __init arch_init_irq(void)

irqchip_init();
}

void __init prom_free_prom_memory(void)
{
}
4 changes: 0 additions & 4 deletions arch/mips/lantiq/prom.c
Original file line number Diff line number Diff line change
Expand Up @@ -44,10 +44,6 @@ int ltq_soc_type(void)
return soc_info.type;
}

void __init prom_free_prom_memory(void)
{
}

static void __init prom_init_cmdline(void)
{
int argc = fw_arg0;
Expand Down
4 changes: 0 additions & 4 deletions arch/mips/loongson2ef/common/init.c
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,3 @@ void __init prom_init(void)
prom_init_uart_base();
board_nmi_handler_setup = mips_nmi_setup;
}

void __init prom_free_prom_memory(void)
{
}
4 changes: 0 additions & 4 deletions arch/mips/loongson32/common/prom.c
Original file line number Diff line number Diff line change
Expand Up @@ -36,10 +36,6 @@ void __init prom_init(void)
setup_8250_early_printk_port((unsigned long)uart_base, 0, 0);
}

void __init prom_free_prom_memory(void)
{
}

void __init plat_mem_setup(void)
{
memblock_add(0x0, (memsize << 20));
Expand Down
4 changes: 0 additions & 4 deletions arch/mips/loongson64/init.c
Original file line number Diff line number Diff line change
Expand Up @@ -115,10 +115,6 @@ void __init prom_init(void)
board_nmi_handler_setup = mips_nmi_setup;
}

void __init prom_free_prom_memory(void)
{
}

static int __init add_legacy_isa_io(struct fwnode_handle *fwnode, resource_size_t hw_start,
resource_size_t size)
{
Expand Down
5 changes: 5 additions & 0 deletions arch/mips/mm/init.c
Original file line number Diff line number Diff line change
Expand Up @@ -495,6 +495,11 @@ void free_init_pages(const char *what, unsigned long begin, unsigned long end)

void (*free_init_pages_eva)(void *begin, void *end) = NULL;

void __weak __init prom_free_prom_memory(void)
{
/* nothing to do */
}

void __ref free_initmem(void)
{
prom_free_prom_memory();
Expand Down
4 changes: 0 additions & 4 deletions arch/mips/mti-malta/malta-memory.c
Original file line number Diff line number Diff line change
Expand Up @@ -37,10 +37,6 @@ void __init fw_meminit(void)
free_init_pages_eva = eva ? free_init_pages_eva_malta : NULL;
}

void __init prom_free_prom_memory(void)
{
}

phys_addr_t mips_cdmm_phys_base(void)
{
/* This address is "typically unused" */
Expand Down
5 changes: 0 additions & 5 deletions arch/mips/netlogic/xlp/setup.c
Original file line number Diff line number Diff line change
Expand Up @@ -130,11 +130,6 @@ const char *get_system_type(void)
}
}

void __init prom_free_prom_memory(void)
{
/* Nothing yet */
}

void xlp_mmu_init(void)
{
u32 conf4;
Expand Down
5 changes: 0 additions & 5 deletions arch/mips/netlogic/xlr/setup.c
Original file line number Diff line number Diff line change
Expand Up @@ -89,11 +89,6 @@ unsigned int nlm_get_cpu_frequency(void)
return (unsigned int)nlm_prom_info.cpu_frequency;
}

void __init prom_free_prom_memory(void)
{
/* Nothing yet */
}

void nlm_percpu_init(int hwcpuid)
{
if (hwcpuid % 4 == 0)
Expand Down
4 changes: 0 additions & 4 deletions arch/mips/pic32/pic32mzda/init.c
Original file line number Diff line number Diff line change
Expand Up @@ -91,10 +91,6 @@ void __init prom_init(void)
pic32_init_cmdline((int)fw_arg0, (char **)fw_arg1);
}

void __init prom_free_prom_memory(void)
{
}

void __init device_tree_init(void)
{
if (!initial_boot_params)
Expand Down
4 changes: 0 additions & 4 deletions arch/mips/pistachio/init.c
Original file line number Diff line number Diff line change
Expand Up @@ -118,10 +118,6 @@ void __init prom_init(void)
pr_info("SoC Type: %s\n", get_system_type());
}

void __init prom_free_prom_memory(void)
{
}

void __init device_tree_init(void)
{
if (!initial_boot_params)
Expand Down
4 changes: 0 additions & 4 deletions arch/mips/ralink/prom.c
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,3 @@ void __init prom_init(void)

prom_init_cmdline();
}

void __init prom_free_prom_memory(void)
{
}
5 changes: 0 additions & 5 deletions arch/mips/rb532/prom.c
Original file line number Diff line number Diff line change
Expand Up @@ -34,11 +34,6 @@ static struct resource ddr_reg[] = {
}
};

void __init prom_free_prom_memory(void)
{
/* No prom memory to free */
}

static inline int match_tag(char *arg, const char *tag)
{
return strncmp(arg, tag, strlen(tag)) == 0;
Expand Down
5 changes: 0 additions & 5 deletions arch/mips/sgi-ip27/ip27-memory.c
Original file line number Diff line number Diff line change
Expand Up @@ -404,11 +404,6 @@ void __init prom_meminit(void)
}
}

void __init prom_free_prom_memory(void)
{
/* We got nothing to free here ... */
}

extern void setup_zero_pages(void);

void __init paging_init(void)
Expand Down
5 changes: 0 additions & 5 deletions arch/mips/sgi-ip32/ip32-memory.c
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,3 @@ void __init prom_meminit(void)
memblock_add(base, size);
}
}


void __init prom_free_prom_memory(void)
{
}
5 changes: 0 additions & 5 deletions arch/mips/sibyte/common/cfe.c
Original file line number Diff line number Diff line change
Expand Up @@ -316,11 +316,6 @@ void __init prom_init(void)
#endif
}

void __init prom_free_prom_memory(void)
{
/* Not sure what I'm supposed to do here. Nothing, I think */
}

void prom_putchar(char c)
{
int ret;
Expand Down
4 changes: 0 additions & 4 deletions arch/mips/txx9/generic/setup.c
Original file line number Diff line number Diff line change
Expand Up @@ -340,10 +340,6 @@ void __init prom_init(void)
txx9_board_vec->prom_init();
}

void __init prom_free_prom_memory(void)
{
}

const char *get_system_type(void)
{
return txx9_system_type;
Expand Down
4 changes: 0 additions & 4 deletions arch/mips/vr41xx/common/init.c
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,3 @@ void __init prom_init(void)
strlcat(arcs_cmdline, " ", COMMAND_LINE_SIZE);
}
}

void __init prom_free_prom_memory(void)
{
}

0 comments on commit a6e83ac

Please sign in to comment.