The patch titled Subject: mm-mempool-add-else-to-split-mutually-exclusive-case-fix has been added to the -mm tree. Its filename is mm-mempool-add-else-to-split-mutually-exclusive-case-fix.patch This patch should soon appear at https://ozlabs.org/~akpm/mmots/broken-out/mm-mempool-add-else-to-split-mutually-exclusive-case-fix.patch and later at https://ozlabs.org/~akpm/mmotm/broken-out/mm-mempool-add-else-to-split-mutually-exclusive-case-fix.patch Before you just go and hit "reply", please: a) Consider who else should be cc'ed b) Prefer to cc a suitable mailing list as well c) Ideally: find the original patch on the mailing list and do a reply-to-all to that, adding suitable additional cc's *** Remember to use Documentation/process/submit-checklist.rst when testing your code *** The -mm tree is included into linux-next and is updated there every 3-4 working days ------------------------------------------------------ From: Joe Perches <joe@xxxxxxxxxxx> Subject: mm-mempool-add-else-to-split-mutually-exclusive-case-fix style: braces should be added to the first test. Link: https://lkml.kernel.org/r/37bbda0e0d94d3324210fa807f4061a9e9bd66bc.camel@xxxxxxxxxxx Cc: Miaohe Lin <linmiaohe@xxxxxxxxxx> Cc: Matthew Wilcox <willy@xxxxxxxxxxxxx> Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx> --- mm/mempool.c | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) --- a/mm/mempool.c~mm-mempool-add-else-to-split-mutually-exclusive-case-fix +++ a/mm/mempool.c @@ -57,11 +57,12 @@ static void __check_element(mempool_t *p static void check_element(mempool_t *pool, void *element) { - /* Mempools backed by slab allocator */ - if (pool->free == mempool_free_slab || pool->free == mempool_kfree) + if (pool->free == mempool_free_slab || + pool->free == mempool_kfree) { + /* Mempools backed by slab allocator */ __check_element(pool, element, ksize(element)); - /* Mempools backed by page allocator */ - else if (pool->free == mempool_free_pages) { + } else if (pool->free == mempool_free_pages) { + /* Mempools backed by page allocator */ int order = (int)(long)pool->pool_data; void *addr = kmap_atomic((struct page *)element); @@ -83,8 +84,9 @@ static void poison_element(mempool_t *po /* Mempools backed by slab allocator */ if (pool->alloc == mempool_alloc_slab || pool->alloc == mempool_kmalloc) __poison_element(element, ksize(element)); + /* Mempools backed by page allocator */ - else if (pool->alloc == mempool_alloc_pages) { + if (pool->alloc == mempool_alloc_pages) { int order = (int)(long)pool->pool_data; void *addr = kmap_atomic((struct page *)element); @@ -105,7 +107,7 @@ static __always_inline void kasan_poison { if (pool->alloc == mempool_alloc_slab || pool->alloc == mempool_kmalloc) kasan_poison_kfree(element, _RET_IP_); - else if (pool->alloc == mempool_alloc_pages) + if (pool->alloc == mempool_alloc_pages) kasan_free_pages(element, (unsigned long)pool->pool_data); } @@ -113,7 +115,7 @@ static void kasan_unpoison_element(mempo { if (pool->alloc == mempool_alloc_slab || pool->alloc == mempool_kmalloc) kasan_unpoison_slab(element); - else if (pool->alloc == mempool_alloc_pages) + if (pool->alloc == mempool_alloc_pages) kasan_alloc_pages(element, (unsigned long)pool->pool_data); } _ Patches currently in -mm which might be from joe@xxxxxxxxxxx are checkpatch-test-git_dir-changes.patch mm-mempool-add-else-to-split-mutually-exclusive-case-fix.patch get_maintainer-exclude-maintainers-files-from-git-fallback.patch checkpatch-move-repeated-word-test.patch checkpatch-add-test-for-comma-use-that-should-be-semicolon.patch