m68k: mm: Remove superfluous memblock_alloc*() casts
authorGeert Uytterhoeven <geert@linux-m68k.org>
Wed, 26 Aug 2020 13:04:44 +0000 (15:04 +0200)
committerGeert Uytterhoeven <geert@linux-m68k.org>
Mon, 7 Sep 2020 08:56:08 +0000 (10:56 +0200)
The return type of memblock_alloc*() is a void pointer, so there is no
need to cast it to "void *" or some other pointer type, before assigning
it to a pointer variable.

Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
Reviewed-by: Mike Rapoport <rppt@linux.ibm.com>
Acked-by: Greg Ungerer <gerg@linux-m68k.org>
Link: https://lore.kernel.org/r/20200826130444.25618-1-geert@linux-m68k.org
arch/m68k/mm/mcfmmu.c
arch/m68k/mm/motorola.c

index 2b9cb4a622811390dbf0bb6e993b9b5b3b7bdad9..eac9dde65193443efe6298d170b21dcfb8905682 100644 (file)
@@ -42,7 +42,7 @@ void __init paging_init(void)
        unsigned long max_zone_pfn[MAX_NR_ZONES] = { 0 };
        int i;
 
-       empty_zero_page = (void *) memblock_alloc(PAGE_SIZE, PAGE_SIZE);
+       empty_zero_page = memblock_alloc(PAGE_SIZE, PAGE_SIZE);
        if (!empty_zero_page)
                panic("%s: Failed to allocate %lu bytes align=0x%lx\n",
                      __func__, PAGE_SIZE, PAGE_SIZE);
index a9bdde54ca35019757e904ee8445c9228b0f5ae3..3a653f0a4188d4af82046e8ff4283ff916c43c41 100644 (file)
@@ -227,7 +227,7 @@ static pte_t * __init kernel_page_table(void)
        pte_t *pte_table = last_pte_table;
 
        if (PAGE_ALIGNED(last_pte_table)) {
-               pte_table = (pte_t *)memblock_alloc_low(PAGE_SIZE, PAGE_SIZE);
+               pte_table = memblock_alloc_low(PAGE_SIZE, PAGE_SIZE);
                if (!pte_table) {
                        panic("%s: Failed to allocate %lu bytes align=%lx\n",
                                        __func__, PAGE_SIZE, PAGE_SIZE);
@@ -275,8 +275,7 @@ static pmd_t * __init kernel_ptr_table(void)
 
        last_pmd_table += PTRS_PER_PMD;
        if (PAGE_ALIGNED(last_pmd_table)) {
-               last_pmd_table = (pmd_t *)memblock_alloc_low(PAGE_SIZE,
-                                                          PAGE_SIZE);
+               last_pmd_table = memblock_alloc_low(PAGE_SIZE, PAGE_SIZE);
                if (!last_pmd_table)
                        panic("%s: Failed to allocate %lu bytes align=%lx\n",
                              __func__, PAGE_SIZE, PAGE_SIZE);