Skip to content

Commit 756a025

Browse files
JoePerchestorvalds
authored andcommitted
mm: coalesce split strings
Kernel style prefers a single string over split strings when the string is 'user-visible'. Miscellanea: - Add a missing newline - 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>
1 parent 598d809 commit 756a025

20 files changed

Lines changed: 78 additions & 109 deletions

mm/dmapool.c

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -452,13 +452,11 @@ void dma_pool_free(struct dma_pool *pool, void *vaddr, dma_addr_t dma)
452452
}
453453
spin_unlock_irqrestore(&pool->lock, flags);
454454
if (pool->dev)
455-
dev_err(pool->dev, "dma_pool_free %s, dma %Lx "
456-
"already free\n", pool->name,
457-
(unsigned long long)dma);
455+
dev_err(pool->dev, "dma_pool_free %s, dma %Lx already free\n",
456+
pool->name, (unsigned long long)dma);
458457
else
459-
printk(KERN_ERR "dma_pool_free %s, dma %Lx "
460-
"already free\n", pool->name,
461-
(unsigned long long)dma);
458+
printk(KERN_ERR "dma_pool_free %s, dma %Lx already free\n",
459+
pool->name, (unsigned long long)dma);
462460
return;
463461
}
464462
}

mm/huge_memory.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -168,8 +168,7 @@ static void set_recommended_min_free_kbytes(void)
168168

169169
if (recommended_min > min_free_kbytes) {
170170
if (user_min_free_kbytes >= 0)
171-
pr_info("raising min_free_kbytes from %d to %lu "
172-
"to help transparent hugepage allocations\n",
171+
pr_info("raising min_free_kbytes from %d to %lu to help transparent hugepage allocations\n",
173172
min_free_kbytes, recommended_min);
174173

175174
min_free_kbytes = recommended_min;

mm/kasan/report.c

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -214,8 +214,7 @@ static void kasan_report_error(struct kasan_access_info *info)
214214
*/
215215
kasan_disable_current();
216216
spin_lock_irqsave(&report_lock, flags);
217-
pr_err("================================="
218-
"=================================\n");
217+
pr_err("==================================================================\n");
219218
if (info->access_addr <
220219
kasan_shadow_to_mem((void *)KASAN_SHADOW_START)) {
221220
if ((unsigned long)info->access_addr < PAGE_SIZE)
@@ -236,8 +235,7 @@ static void kasan_report_error(struct kasan_access_info *info)
236235
print_address_description(info);
237236
print_shadow_for_address(info->first_bad_addr);
238237
}
239-
pr_err("================================="
240-
"=================================\n");
238+
pr_err("==================================================================\n");
241239
add_taint(TAINT_BAD_PAGE, LOCKDEP_NOW_UNRELIABLE);
242240
spin_unlock_irqrestore(&report_lock, flags);
243241
kasan_enable_current();

mm/kmemcheck.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,7 @@ void kmemcheck_alloc_shadow(struct page *page, int order, gfp_t flags, int node)
2020
shadow = alloc_pages_node(node, flags | __GFP_NOTRACK, order);
2121
if (!shadow) {
2222
if (printk_ratelimit())
23-
printk(KERN_ERR "kmemcheck: failed to allocate "
24-
"shadow bitmap\n");
23+
printk(KERN_ERR "kmemcheck: failed to allocate shadow bitmap\n");
2524
return;
2625
}
2726

mm/kmemleak.c

Lines changed: 8 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -596,8 +596,7 @@ static struct kmemleak_object *create_object(unsigned long ptr, size_t size,
596596
else if (parent->pointer + parent->size <= ptr)
597597
link = &parent->rb_node.rb_right;
598598
else {
599-
kmemleak_stop("Cannot insert 0x%lx into the object "
600-
"search tree (overlaps existing)\n",
599+
kmemleak_stop("Cannot insert 0x%lx into the object search tree (overlaps existing)\n",
601600
ptr);
602601
/*
603602
* No need for parent->lock here since "parent" cannot
@@ -670,8 +669,8 @@ static void delete_object_part(unsigned long ptr, size_t size)
670669
object = find_and_remove_object(ptr, 1);
671670
if (!object) {
672671
#ifdef DEBUG
673-
kmemleak_warn("Partially freeing unknown object at 0x%08lx "
674-
"(size %zu)\n", ptr, size);
672+
kmemleak_warn("Partially freeing unknown object at 0x%08lx (size %zu)\n",
673+
ptr, size);
675674
#endif
676675
return;
677676
}
@@ -717,8 +716,8 @@ static void paint_ptr(unsigned long ptr, int color)
717716

718717
object = find_and_get_object(ptr, 0);
719718
if (!object) {
720-
kmemleak_warn("Trying to color unknown object "
721-
"at 0x%08lx as %s\n", ptr,
719+
kmemleak_warn("Trying to color unknown object at 0x%08lx as %s\n",
720+
ptr,
722721
(color == KMEMLEAK_GREY) ? "Grey" :
723722
(color == KMEMLEAK_BLACK) ? "Black" : "Unknown");
724723
return;
@@ -1463,8 +1462,8 @@ static void kmemleak_scan(void)
14631462
if (new_leaks) {
14641463
kmemleak_found_leaks = true;
14651464

1466-
pr_info("%d new suspected memory leaks (see "
1467-
"/sys/kernel/debug/kmemleak)\n", new_leaks);
1465+
pr_info("%d new suspected memory leaks (see /sys/kernel/debug/kmemleak)\n",
1466+
new_leaks);
14681467
}
14691468

14701469
}
@@ -1795,8 +1794,7 @@ static void kmemleak_do_cleanup(struct work_struct *work)
17951794
if (!kmemleak_found_leaks)
17961795
__kmemleak_do_cleanup();
17971796
else
1798-
pr_info("Kmemleak disabled without freeing internal data. "
1799-
"Reclaim the memory with \"echo clear > /sys/kernel/debug/kmemleak\"\n");
1797+
pr_info("Kmemleak disabled without freeing internal data. Reclaim the memory with \"echo clear > /sys/kernel/debug/kmemleak\".\n");
18001798
}
18011799

18021800
static DECLARE_WORK(cleanup_work, kmemleak_do_cleanup);

mm/memblock.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -238,8 +238,7 @@ phys_addr_t __init_memblock memblock_find_in_range_node(phys_addr_t size,
238238
* so we use WARN_ONCE() here to see the stack trace if
239239
* fail happens.
240240
*/
241-
WARN_ONCE(1, "memblock: bottom-up allocation failed, "
242-
"memory hotunplug may be affected\n");
241+
WARN_ONCE(1, "memblock: bottom-up allocation failed, memory hotunplug may be affected\n");
243242
}
244243

245244
return __memblock_find_range_top_down(start, end, size, align, nid,

mm/memory_hotplug.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1970,8 +1970,7 @@ static int check_memblock_offlined_cb(struct memory_block *mem, void *arg)
19701970

19711971
beginpa = PFN_PHYS(section_nr_to_pfn(mem->start_section_nr));
19721972
endpa = PFN_PHYS(section_nr_to_pfn(mem->end_section_nr + 1))-1;
1973-
pr_warn("removing memory fails, because memory "
1974-
"[%pa-%pa] is onlined\n",
1973+
pr_warn("removing memory fails, because memory [%pa-%pa] is onlined\n",
19751974
&beginpa, &endpa);
19761975
}
19771976

mm/mempolicy.c

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2559,9 +2559,7 @@ static void __init check_numabalancing_enable(void)
25592559
set_numabalancing_state(numabalancing_override == 1);
25602560

25612561
if (num_online_nodes() > 1 && !numabalancing_override) {
2562-
pr_info("%s automatic NUMA balancing. "
2563-
"Configure with numa_balancing= or the "
2564-
"kernel.numa_balancing sysctl",
2562+
pr_info("%s automatic NUMA balancing. Configure with numa_balancing= or the kernel.numa_balancing sysctl\n",
25652563
numabalancing_default ? "Enabling" : "Disabling");
25662564
set_numabalancing_state(numabalancing_default);
25672565
}

mm/mmap.c

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2517,9 +2517,8 @@ SYSCALL_DEFINE5(remap_file_pages, unsigned long, start, unsigned long, size,
25172517
unsigned long ret = -EINVAL;
25182518
struct file *file;
25192519

2520-
pr_warn_once("%s (%d) uses deprecated remap_file_pages() syscall. "
2521-
"See Documentation/vm/remap_file_pages.txt.\n",
2522-
current->comm, current->pid);
2520+
pr_warn_once("%s (%d) uses deprecated remap_file_pages() syscall. See Documentation/vm/remap_file_pages.txt.\n",
2521+
current->comm, current->pid);
25232522

25242523
if (prot)
25252524
return ret;
@@ -2885,8 +2884,7 @@ bool may_expand_vm(struct mm_struct *mm, vm_flags_t flags, unsigned long npages)
28852884
if (is_data_mapping(flags) &&
28862885
mm->data_vm + npages > rlimit(RLIMIT_DATA) >> PAGE_SHIFT) {
28872886
if (ignore_rlimit_data)
2888-
pr_warn_once("%s (%d): VmData %lu exceed data ulimit "
2889-
"%lu. Will be forbidden soon.\n",
2887+
pr_warn_once("%s (%d): VmData %lu exceed data ulimit %lu. Will be forbidden soon.\n",
28902888
current->comm, current->pid,
28912889
(mm->data_vm + npages) << PAGE_SHIFT,
28922890
rlimit(RLIMIT_DATA));

mm/oom_kill.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -383,8 +383,7 @@ static void dump_tasks(struct mem_cgroup *memcg, const nodemask_t *nodemask)
383383
static void dump_header(struct oom_control *oc, struct task_struct *p,
384384
struct mem_cgroup *memcg)
385385
{
386-
pr_warn("%s invoked oom-killer: gfp_mask=%#x(%pGg), order=%d, "
387-
"oom_score_adj=%hd\n",
386+
pr_warn("%s invoked oom-killer: gfp_mask=%#x(%pGg), order=%d, oom_score_adj=%hd\n",
388387
current->comm, oc->gfp_mask, &oc->gfp_mask, oc->order,
389388
current->signal->oom_score_adj);
390389

0 commit comments

Comments
 (0)