Skip to content

Commit ab347a1

Browse files
committed
mm-use-stack_depot-for-recording-kmemleaks-backtrace-checkpatch-fixes
WARNING: please, no spaces at the start of a line torvalds#59: FILE: mm/kmemleak.c:362: + for (i = 0; i < nr_entries; i++) {$ WARNING: suspect code indent for conditional statements (7, 15) torvalds#59: FILE: mm/kmemleak.c:362: + for (i = 0; i < nr_entries; i++) { + void *ptr = (void *)entries[i]; ERROR: code indent should use tabs where possible torvalds#60: FILE: mm/kmemleak.c:363: + void *ptr = (void *)entries[i];$ WARNING: please, no spaces at the start of a line torvalds#60: FILE: mm/kmemleak.c:363: + void *ptr = (void *)entries[i];$ ERROR: code indent should use tabs where possible torvalds#61: FILE: mm/kmemleak.c:364: + warn_or_seq_printf(seq, " [<%p>] %pS\n", ptr, ptr);$ WARNING: Missing a blank line after declarations torvalds#61: FILE: mm/kmemleak.c:364: + void *ptr = (void *)entries[i]; + warn_or_seq_printf(seq, " [<%p>] %pS\n", ptr, ptr); WARNING: please, no spaces at the start of a line torvalds#61: FILE: mm/kmemleak.c:364: + warn_or_seq_printf(seq, " [<%p>] %pS\n", ptr, ptr);$ WARNING: please, no spaces at the start of a line torvalds#62: FILE: mm/kmemleak.c:365: + }$ ERROR: space required before the open parenthesis '(' torvalds#71: FILE: mm/kmemleak.c:384: + if(object->trace_handle) total: 3 errors, 6 warnings, 107 lines checked NOTE: For some of the reported defects, checkpatch may be able to mechanically convert to the typical style using --fix or --fix-inplace. NOTE: Whitespace errors detected. You may wish to use scripts/cleanpatch or scripts/cleanfile ./patches/mm-use-stack_depot-for-recording-kmemleaks-backtrace.patch has style problems, please review. NOTE: If any of the errors are false positives, please report them to the maintainer, see CHECKPATCH in MAINTAINERS. Please run checkpatch prior to sending patches Cc: Catalin Marinas <catalin.marinas@arm.com> Cc: ke.wang <ke.wang@unisoc.com> Cc: Matthew Wilcox (Oracle) <willy@infradead.org> Cc: Vlastimil Babka <vbabka@suse.cz> Cc: Zhaoyang Huang <huangzhaoyang@gmail.com> Cc: Zhaoyang Huang <zhaoyang.huang@unisoc.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
1 parent 04e4830 commit ab347a1

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

mm/kmemleak.c

+5-5
Original file line numberDiff line numberDiff line change
@@ -359,10 +359,10 @@ static void print_unreferenced(struct seq_file *seq,
359359
hex_dump_object(seq, object);
360360
warn_or_seq_printf(seq, " backtrace:\n");
361361

362-
for (i = 0; i < nr_entries; i++) {
363-
void *ptr = (void *)entries[i];
364-
warn_or_seq_printf(seq, " [<%p>] %pS\n", ptr, ptr);
365-
}
362+
for (i = 0; i < nr_entries; i++) {
363+
void *ptr = (void *)entries[i];
364+
warn_or_seq_printf(seq, " [<%p>] %pS\n", ptr, ptr);
365+
}
366366
}
367367

368368
/*
@@ -381,7 +381,7 @@ static void dump_object_info(struct kmemleak_object *object)
381381
pr_notice(" flags = 0x%x\n", object->flags);
382382
pr_notice(" checksum = %u\n", object->checksum);
383383
pr_notice(" backtrace:\n");
384-
if(object->trace_handle)
384+
if (object->trace_handle)
385385
stack_depot_print(object->trace_handle);
386386
}
387387

0 commit comments

Comments
 (0)