From: Athira-Selvan <thisisathi@gmail.com>
To: akpm@linux-foundation.org
Cc: jthumshirn@suse.de, tglx@linutronix.de,
kent.overstreet@gmail.com, linux-mm@kvack.org,
thisisathi@gmail.com
Subject: [PATCH] mm:mempool:fixed coding style errors and warnings.
Date: Mon, 25 Jun 2018 22:42:17 +0530 [thread overview]
Message-ID: <1529946737-7693-1-git-send-email-thisisathi@gmail.com> (raw)
This patch fixes checkpatch.pl:
WARNING: Missing a blank line after declarations
ERROR: missing space brfore ','
Signed-off-by: Athira Selvam <thisisathi@gmail.com>
---
mm/mempool.c | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)
diff --git a/mm/mempool.c b/mm/mempool.c
index b54f2c2..c3a7b7b 100644
--- a/mm/mempool.c
+++ b/mm/mempool.c
@@ -152,6 +152,7 @@ void mempool_exit(mempool_t *pool)
{
while (pool->curr_nr) {
void *element = remove_element(pool, GFP_KERNEL);
+
pool->free(element, pool->pool_data);
}
kfree(pool->elements);
@@ -248,7 +249,7 @@ EXPORT_SYMBOL(mempool_init);
mempool_t *mempool_create(int min_nr, mempool_alloc_t *alloc_fn,
mempool_free_t *free_fn, void *pool_data)
{
- return mempool_create_node(min_nr,alloc_fn,free_fn, pool_data,
+ return mempool_create_node(min_nr, alloc_fn, free_fn, pool_data,
GFP_KERNEL, NUMA_NO_NODE);
}
EXPORT_SYMBOL(mempool_create);
@@ -500,6 +501,7 @@ EXPORT_SYMBOL(mempool_free);
void *mempool_alloc_slab(gfp_t gfp_mask, void *pool_data)
{
struct kmem_cache *mem = pool_data;
+
VM_BUG_ON(mem->ctor);
return kmem_cache_alloc(mem, gfp_mask);
}
@@ -508,6 +510,7 @@ EXPORT_SYMBOL(mempool_alloc_slab);
void mempool_free_slab(void *element, void *pool_data)
{
struct kmem_cache *mem = pool_data;
+
kmem_cache_free(mem, element);
}
EXPORT_SYMBOL(mempool_free_slab);
@@ -519,6 +522,7 @@ EXPORT_SYMBOL(mempool_free_slab);
void *mempool_kmalloc(gfp_t gfp_mask, void *pool_data)
{
size_t size = (size_t)pool_data;
+
return kmalloc(size, gfp_mask);
}
EXPORT_SYMBOL(mempool_kmalloc);
@@ -536,6 +540,7 @@ EXPORT_SYMBOL(mempool_kfree);
void *mempool_alloc_pages(gfp_t gfp_mask, void *pool_data)
{
int order = (int)(long)pool_data;
+
return alloc_pages(gfp_mask, order);
}
EXPORT_SYMBOL(mempool_alloc_pages);
@@ -543,6 +548,7 @@ EXPORT_SYMBOL(mempool_alloc_pages);
void mempool_free_pages(void *element, void *pool_data)
{
int order = (int)(long)pool_data;
+
__free_pages(element, order);
}
EXPORT_SYMBOL(mempool_free_pages);
--
2.7.4
next reply other threads:[~2018-06-25 17:12 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-06-25 17:12 Athira-Selvan [this message]
2018-06-26 11:03 ` [PATCH] mm:mempool:fixed coding style errors and warnings Michal Hocko
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1529946737-7693-1-git-send-email-thisisathi@gmail.com \
--to=thisisathi@gmail.com \
--cc=akpm@linux-foundation.org \
--cc=jthumshirn@suse.de \
--cc=kent.overstreet@gmail.com \
--cc=linux-mm@kvack.org \
--cc=tglx@linutronix.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).