mm: convert printk(KERN_<LEVEL> to pr_<level>
[cascardo/linux.git] / mm / percpu.c
index 998607a..c987fd4 100644 (file)
@@ -888,8 +888,8 @@ static void __percpu *pcpu_alloc(size_t size, size_t align, bool reserved,
        size = ALIGN(size, 2);
 
        if (unlikely(!size || size > PCPU_MIN_UNIT_SIZE || align > PAGE_SIZE)) {
-               WARN(true, "illegal size (%zu) or align (%zu) for "
-                    "percpu allocation\n", size, align);
+               WARN(true, "illegal size (%zu) or align (%zu) for percpu allocation\n",
+                    size, align);
                return NULL;
        }
 
@@ -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");
@@ -1449,20 +1449,20 @@ static void pcpu_dump_alloc_info(const char *lvl,
                for (alloc_end += gi->nr_units / upa;
                     alloc < alloc_end; alloc++) {
                        if (!(alloc % apl)) {
-                               printk(KERN_CONT "\n");
+                               pr_cont("\n");
                                printk("%spcpu-alloc: ", lvl);
                        }
-                       printk(KERN_CONT "[%0*d] ", group_width, group);
+                       pr_cont("[%0*d] ", group_width, group);
 
                        for (unit_end += upa; unit < unit_end; unit++)
                                if (gi->cpu_map[unit] != NR_CPUS)
-                                       printk(KERN_CONT "%0*d ", cpu_width,
-                                              gi->cpu_map[unit]);
+                                       pr_cont("%0*d ",
+                                               cpu_width, gi->cpu_map[unit]);
                                else
-                                       printk(KERN_CONT "%s ", empty_str);
+                                       pr_cont("%s ", empty_str);
                }
        }
-       printk(KERN_CONT "\n");
+       pr_cont("\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 */