mm: convert pr_warning to pr_warn
authorJoe Perches <joe@perches.com>
Thu, 17 Mar 2016 21:19:44 +0000 (14:19 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Thu, 17 Mar 2016 22:09:34 +0000 (15:09 -0700)
There are a mixture of pr_warning and pr_warn uses in mm.  Use pr_warn
consistently.

Miscellanea:

 - Coalesce formats
 - Realign arguments

Signed-off-by: Joe Perches <joe@perches.com>
Acked-by: Tejun Heo <tj@kernel.org> [percpu]
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
mm/hugetlb.c
mm/kmemleak.c
mm/percpu.c

index aefba5a9cc47f74880dbbb3491a8927fcf999b06..06058eaa173bc25b2e3dc0186d0947ae5f1887d8 100644 (file)
@@ -2665,7 +2665,7 @@ void __init hugetlb_add_hstate(unsigned int order)
        unsigned long i;
 
        if (size_to_hstate(PAGE_SIZE << order)) {
-               pr_warning("hugepagesz= specified twice, ignoring\n");
+               pr_warn("hugepagesz= specified twice, ignoring\n");
                return;
        }
        BUG_ON(hugetlb_max_hstate >= HUGE_MAX_HSTATE);
@@ -2701,8 +2701,7 @@ static int __init hugetlb_nrpages_setup(char *s)
                mhp = &parsed_hstate->max_huge_pages;
 
        if (mhp == last_mhp) {
-               pr_warning("hugepages= specified twice without "
-                          "interleaving hugepagesz=, ignoring\n");
+               pr_warn("hugepages= specified twice without interleaving hugepagesz=, ignoring\n");
                return 1;
        }
 
index 25c0ad36fe380d25da8ea450875bf385614ce08a..a81cd76ea2827f9408468b00290e2296ec00852f 100644 (file)
@@ -276,7 +276,7 @@ static void kmemleak_disable(void);
  * Print a warning and dump the stack trace.
  */
 #define kmemleak_warn(x...)    do {            \
-       pr_warning(x);                          \
+       pr_warn(x);                             \
        dump_stack();                           \
        kmemleak_warning = 1;                   \
 } while (0)
@@ -543,7 +543,7 @@ static struct kmemleak_object *create_object(unsigned long ptr, size_t size,
 
        object = kmem_cache_alloc(object_cache, gfp_kmemleak_mask(gfp));
        if (!object) {
-               pr_warning("Cannot allocate a kmemleak_object structure\n");
+               pr_warn("Cannot allocate a kmemleak_object structure\n");
                kmemleak_disable();
                return NULL;
        }
@@ -764,7 +764,7 @@ static void add_scan_area(unsigned long ptr, size_t size, gfp_t gfp)
 
        area = kmem_cache_alloc(scan_area_cache, gfp_kmemleak_mask(gfp));
        if (!area) {
-               pr_warning("Cannot allocate a scan area\n");
+               pr_warn("Cannot allocate a scan area\n");
                goto out;
        }
 
@@ -1515,7 +1515,7 @@ static void start_scan_thread(void)
                return;
        scan_thread = kthread_run(kmemleak_scan_thread, NULL, "kmemleak");
        if (IS_ERR(scan_thread)) {
-               pr_warning("Failed to create the scan thread\n");
+               pr_warn("Failed to create the scan thread\n");
                scan_thread = NULL;
        }
 }
@@ -1874,8 +1874,8 @@ void __init kmemleak_init(void)
        scan_area_cache = KMEM_CACHE(kmemleak_scan_area, SLAB_NOLEAKTRACE);
 
        if (crt_early_log > ARRAY_SIZE(early_log))
-               pr_warning("Early log buffer exceeded (%d), please increase "
-                          "DEBUG_KMEMLEAK_EARLY_LOG_SIZE\n", crt_early_log);
+               pr_warn("Early log buffer exceeded (%d), please increase DEBUG_KMEMLEAK_EARLY_LOG_SIZE\n",
+                       crt_early_log);
 
        /* the kernel is still in UP mode, so disabling the IRQs is enough */
        local_irq_save(flags);
@@ -1960,7 +1960,7 @@ static int __init kmemleak_late_init(void)
        dentry = debugfs_create_file("kmemleak", S_IRUGO, NULL, NULL,
                                     &kmemleak_fops);
        if (!dentry)
-               pr_warning("Failed to create the debugfs kmemleak file\n");
+               pr_warn("Failed to create the debugfs kmemleak file\n");
        mutex_lock(&scan_mutex);
        start_scan_thread();
        mutex_unlock(&scan_mutex);
index 998607adf6eb840a6ae30371484839277eaaab6b..847814b15233bbf16b981b3bdc6cab7447d51b62 100644 (file)
@@ -1033,8 +1033,8 @@ fail_unlock:
        spin_unlock_irqrestore(&pcpu_lock, flags);
 fail:
        if (!is_atomic && warn_limit) {
-               pr_warning("PERCPU: allocation failed, size=%zu align=%zu atomic=%d, %s\n",
-                          size, align, is_atomic, err);
+               pr_warn("PERCPU: allocation failed, size=%zu align=%zu atomic=%d, %s\n",
+                       size, align, is_atomic, err);
                dump_stack();
                if (!--warn_limit)
                        pr_info("PERCPU: limit reached, disable warning\n");
@@ -1723,7 +1723,7 @@ static int __init percpu_alloc_setup(char *str)
                pcpu_chosen_fc = PCPU_FC_PAGE;
 #endif
        else
-               pr_warning("PERCPU: unknown allocator %s specified\n", str);
+               pr_warn("PERCPU: unknown allocator %s specified\n", str);
 
        return 0;
 }
@@ -2016,9 +2016,8 @@ int __init pcpu_embed_first_chunk(size_t reserved_size, size_t dyn_size,
 
        /* warn if maximum distance is further than 75% of vmalloc space */
        if (max_distance > VMALLOC_TOTAL * 3 / 4) {
-               pr_warning("PERCPU: max_distance=0x%zx too large for vmalloc "
-                          "space 0x%lx\n", max_distance,
-                          VMALLOC_TOTAL);
+               pr_warn("PERCPU: max_distance=0x%zx too large for vmalloc space 0x%lx\n",
+                       max_distance, VMALLOC_TOTAL);
 #ifdef CONFIG_NEED_PER_CPU_PAGE_FIRST_CHUNK
                /* and fail if we have fallback */
                rc = -EINVAL;
@@ -2100,8 +2099,8 @@ int __init pcpu_page_first_chunk(size_t reserved_size,
 
                        ptr = alloc_fn(cpu, PAGE_SIZE, PAGE_SIZE);
                        if (!ptr) {
-                               pr_warning("PERCPU: failed to allocate %s page "
-                                          "for cpu%u\n", psize_str, cpu);
+                               pr_warn("PERCPU: failed to allocate %s page for cpu%u\n",
+                                       psize_str, cpu);
                                goto enomem;
                        }
                        /* kmemleak tracks the percpu allocations separately */