diff options
author | Joe Perches <joe@perches.com> | 2011-10-31 20:08:35 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2011-10-31 20:30:48 -0400 |
commit | 3ee9a4f086716d792219c021e8509f91165a4128 (patch) | |
tree | f85162b8e024624f07909eaba4e85b89df924ebb /mm/vmalloc.c | |
parent | 06d5e032adcbc7d50c606a1396f00e2474e4213e (diff) |
mm: neaten warn_alloc_failed
Add __attribute__((format (printf...) to the function to validate format
and arguments. Use vsprintf extension %pV to avoid any possible message
interleaving. Coalesce format string. Convert printks/pr_warning to
pr_warn.
[akpm@linux-foundation.org: use the __printf() macro]
Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'mm/vmalloc.c')
-rw-r--r-- | mm/vmalloc.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/mm/vmalloc.c b/mm/vmalloc.c index 56faf3163ee2..08ab0aa1406c 100644 --- a/mm/vmalloc.c +++ b/mm/vmalloc.c | |||
@@ -1593,8 +1593,8 @@ static void *__vmalloc_area_node(struct vm_struct *area, gfp_t gfp_mask, | |||
1593 | return area->addr; | 1593 | return area->addr; |
1594 | 1594 | ||
1595 | fail: | 1595 | fail: |
1596 | warn_alloc_failed(gfp_mask, order, "vmalloc: allocation failure, " | 1596 | warn_alloc_failed(gfp_mask, order, |
1597 | "allocated %ld of %ld bytes\n", | 1597 | "vmalloc: allocation failure, allocated %ld of %ld bytes\n", |
1598 | (area->nr_pages*PAGE_SIZE), area->size); | 1598 | (area->nr_pages*PAGE_SIZE), area->size); |
1599 | vfree(area->addr); | 1599 | vfree(area->addr); |
1600 | return NULL; | 1600 | return NULL; |