Re: [PATCH 13/21] m68k: rename __iounmap and mark it static
From: Geert Uytterhoeven <geert@linux-m68k.org>
Date: 2019-10-18 07:31:12
Also in:
linux-alpha, linux-arch, linux-mips, linux-riscv, linux-s390, linux-sh, lkml, sparclinux
Hi Christoph, On Thu, Oct 17, 2019 at 7:53 PM Christoph Hellwig [off-list ref] wrote:
m68k uses __iounmap as the name for an internal helper that is only used for some CPU types. Mark it static and give it a better name. Signed-off-by: Christoph Hellwig <hch@lst.de>
Thanks for your patch!
quoted hunk ↗ jump to hunk
--- a/arch/m68k/mm/kmap.c +++ b/arch/m68k/mm/kmap.c@@ -52,6 +52,7 @@ static inline void free_io_area(void *addr) #define IO_SIZE (256*1024) +static void __free_io_area(void *addr, unsigned long size); static struct vm_struct *iolist; static struct vm_struct *get_io_area(unsigned long size)@@ -90,7 +91,7 @@ static inline void free_io_area(void *addr) if (tmp->addr == addr) { *p = tmp->next; /* remove gap added in get_io_area() */ - __iounmap(tmp->addr, tmp->size - IO_SIZE); + __free_io_area(tmp->addr, tmp->size - IO_SIZE); kfree(tmp); return; }@@ -249,12 +250,13 @@ void iounmap(void __iomem *addr) } EXPORT_SYMBOL(iounmap); +#ifndef CPU_M68040_OR_M68060_ONLY
Can you please move this block up, instead of adding more #ifdef cluttery? That would also remove the need for a forward declaration.
quoted hunk ↗ jump to hunk
/* - * __iounmap unmaps nearly everything, so be careful + * __free_io_area unmaps nearly everything, so be careful * Currently it doesn't free pointer/page tables anymore but this * wasn't used anyway and might be added later. */ -void __iounmap(void *addr, unsigned long size) +static void __free_io_area(void *addr, unsigned long size) { unsigned long virtaddr = (unsigned long)addr; pgd_t *pgd_dir;@@ -297,6 +299,7 @@ void __iounmap(void *addr, unsigned long size) flush_tlb_all(); } +#endif /* CPU_M68040_OR_M68060_ONLY */ /* * Set new cache mode for some kernel address space.
Gr{oetje,eeting}s,
Geert
--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org
In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel