diff options
author | Akinobu Mita <akinobu.mita@gmail.com> | 2007-05-08 00:23:13 -0700 |
---|---|---|
committer | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-05-08 11:14:57 -0700 |
commit | 0e6b9c98be1b517bf99a21d8a7036a8a21e47dd1 (patch) | |
tree | d38264506008361717a737581c26f7d3de28284b /arch | |
parent | 72280ede316911fd5a82ef78d12a6705b1007d36 (diff) | |
download | op-kernel-dev-0e6b9c98be1b517bf99a21d8a7036a8a21e47dd1.zip op-kernel-dev-0e6b9c98be1b517bf99a21d8a7036a8a21e47dd1.tar.gz |
use SLAB_PANIC flag cleanup
Use SLAB_PANIC and delete duplicated panic().
Signed-off-by: Akinobu Mita <akinobu.mita@gmail.com>
Cc: Ian Molton <spyro@f2s.com>
Cc: David Howells <dhowells@redhat.com>
Cc: Andi Kleen <ak@suse.de>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: Paul Mundt <lethal@linux-sh.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'arch')
-rw-r--r-- | arch/arm26/mm/memc.c | 8 | ||||
-rw-r--r-- | arch/frv/mm/pgalloc.c | 4 | ||||
-rw-r--r-- | arch/i386/mm/init.c | 9 | ||||
-rw-r--r-- | arch/ia64/ia32/ia32_support.c | 6 | ||||
-rw-r--r-- | arch/powerpc/mm/init_64.c | 5 | ||||
-rw-r--r-- | arch/sh/mm/pmb.c | 6 |
6 files changed, 11 insertions, 27 deletions
diff --git a/arch/arm26/mm/memc.c b/arch/arm26/mm/memc.c index f290158..4250554 100644 --- a/arch/arm26/mm/memc.c +++ b/arch/arm26/mm/memc.c @@ -176,13 +176,9 @@ void __init pgtable_cache_init(void) { pte_cache = kmem_cache_create("pte-cache", sizeof(pte_t) * PTRS_PER_PTE, - 0, 0, pte_cache_ctor, NULL); - if (!pte_cache) - BUG(); + 0, SLAB_PANIC, pte_cache_ctor, NULL); pgd_cache = kmem_cache_create("pgd-cache", MEMC_TABLE_SIZE + sizeof(pgd_t) * PTRS_PER_PGD, - 0, 0, pgd_cache_ctor, NULL); - if (!pgd_cache) - BUG(); + 0, SLAB_PANIC, pgd_cache_ctor, NULL); } diff --git a/arch/frv/mm/pgalloc.c b/arch/frv/mm/pgalloc.c index 19b13be..598a26a 100644 --- a/arch/frv/mm/pgalloc.c +++ b/arch/frv/mm/pgalloc.c @@ -151,9 +151,7 @@ void __init pgtable_cache_init(void) pgd_cache = kmem_cache_create("pgd", PTRS_PER_PGD * sizeof(pgd_t), PTRS_PER_PGD * sizeof(pgd_t), - 0, + SLAB_PANIC, pgd_ctor, pgd_dtor); - if (!pgd_cache) - panic("pgtable_cache_init(): Cannot create pgd cache"); } diff --git a/arch/i386/mm/init.c b/arch/i386/mm/init.c index 1a7197e..c50782e 100644 --- a/arch/i386/mm/init.c +++ b/arch/i386/mm/init.c @@ -751,12 +751,9 @@ void __init pgtable_cache_init(void) pmd_cache = kmem_cache_create("pmd", PTRS_PER_PMD*sizeof(pmd_t), PTRS_PER_PMD*sizeof(pmd_t), - 0, + SLAB_PANIC, pmd_ctor, NULL); - if (!pmd_cache) - panic("pgtable_cache_init(): cannot create pmd cache"); - if (!SHARED_KERNEL_PMD) { /* If we're in PAE mode and have a non-shared kernel pmd, then the pgd size must be a @@ -770,11 +767,9 @@ void __init pgtable_cache_init(void) pgd_cache = kmem_cache_create("pgd", pgd_size, pgd_size, - 0, + SLAB_PANIC, pgd_ctor, (!SHARED_KERNEL_PMD) ? pgd_dtor : NULL); - if (!pgd_cache) - panic("pgtable_cache_init(): Cannot create pgd cache"); } /* diff --git a/arch/ia64/ia32/ia32_support.c b/arch/ia64/ia32/ia32_support.c index 6af400a..beea7a0 100644 --- a/arch/ia64/ia32/ia32_support.c +++ b/arch/ia64/ia32/ia32_support.c @@ -252,10 +252,8 @@ ia32_init (void) extern struct kmem_cache *partial_page_cachep; partial_page_cachep = kmem_cache_create("partial_page_cache", - sizeof(struct partial_page), 0, 0, - NULL, NULL); - if (!partial_page_cachep) - panic("Cannot create partial page SLAB cache"); + sizeof(struct partial_page), + 0, SLAB_PANIC, NULL, NULL); } #endif return 0; diff --git a/arch/powerpc/mm/init_64.c b/arch/powerpc/mm/init_64.c index 4416d51..fe1fe85 100644 --- a/arch/powerpc/mm/init_64.c +++ b/arch/powerpc/mm/init_64.c @@ -183,11 +183,8 @@ void pgtable_cache_init(void) "for size: %08x...\n", name, i, size); pgtable_cache[i] = kmem_cache_create(name, size, size, - 0, + SLAB_PANIC, zero_ctor, NULL); - if (! pgtable_cache[i]) - panic("pgtable_cache_init(): could not create %s!\n", - name); } } diff --git a/arch/sh/mm/pmb.c b/arch/sh/mm/pmb.c index d0d45e2..02aae06 100644 --- a/arch/sh/mm/pmb.c +++ b/arch/sh/mm/pmb.c @@ -311,9 +311,9 @@ static int __init pmb_init(void) BUG_ON(unlikely(nr_entries >= NR_PMB_ENTRIES)); - pmb_cache = kmem_cache_create("pmb", sizeof(struct pmb_entry), - 0, 0, pmb_cache_ctor, pmb_cache_dtor); - BUG_ON(!pmb_cache); + pmb_cache = kmem_cache_create("pmb", sizeof(struct pmb_entry), 0, + SLAB_PANIC, pmb_cache_ctor, + pmb_cache_dtor); jump_to_P2(); |