Skip to content

Commit 541eac3

Browse files
akpm00sfrothwell
authored andcommitted
selftest-add-mremap_dontunmap-selftest-v7-checkpatch-fixes
ERROR: Bad function definition - void mremap_dontunmap_partial_mapping_overwrite() should probably be void mremap_dontunmap_partial_mapping_overwrite(void) torvalds#34: FILE: tools/testing/selftests/vm/mremap_dontunmap.c:228: +static void mremap_dontunmap_partial_mapping_overwrite() WARNING: Avoid crashing the kernel - try using WARN_ON & recovery code rather than BUG() or BUG_ON() torvalds#68: FILE: tools/testing/selftests/vm/mremap_dontunmap.c:251: + BUG_ON(source_mapping == MAP_FAILED, "mmap"); WARNING: line over 80 characters torvalds#109: FILE: tools/testing/selftests/vm/mremap_dontunmap.c:264: + MREMAP_DONTUNMAP | MREMAP_MAYMOVE | MREMAP_FIXED, dest_mapping); WARNING: Avoid crashing the kernel - try using WARN_ON & recovery code rather than BUG() or BUG_ON() torvalds#110: FILE: tools/testing/selftests/vm/mremap_dontunmap.c:265: + BUG_ON(dest_mapping == MAP_FAILED, "mremap"); WARNING: line over 80 characters torvalds#111: FILE: tools/testing/selftests/vm/mremap_dontunmap.c:266: + BUG_ON(dest_mapping != remapped_mapping, "expected to remap to dest_mapping"); WARNING: Avoid crashing the kernel - try using WARN_ON & recovery code rather than BUG() or BUG_ON() torvalds#111: FILE: tools/testing/selftests/vm/mremap_dontunmap.c:266: + BUG_ON(dest_mapping != remapped_mapping, "expected to remap to dest_mapping"); WARNING: line over 80 characters torvalds#120: FILE: tools/testing/selftests/vm/mremap_dontunmap.c:272: + BUG_ON(check_region_contains_byte(dest_mapping, 5 * page_size, 'a') != 0, WARNING: Avoid crashing the kernel - try using WARN_ON & recovery code rather than BUG() or BUG_ON() torvalds#120: FILE: tools/testing/selftests/vm/mremap_dontunmap.c:272: + BUG_ON(check_region_contains_byte(dest_mapping, 5 * page_size, 'a') != 0, WARNING: Avoid crashing the kernel - try using WARN_ON & recovery code rather than BUG() or BUG_ON() torvalds#133: FILE: tools/testing/selftests/vm/mremap_dontunmap.c:280: + BUG_ON(munmap(dest_mapping, 10 * page_size) == -1, total: 1 errors, 8 warnings, 126 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. ./patches/selftest-add-mremap_dontunmap-selftest-v7.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: Brian Geffon <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Stephen Rothwell <[email protected]>
1 parent 56fd66f commit 541eac3

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Diff for: tools/testing/selftests/vm/mremap_dontunmap.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -225,7 +225,7 @@ static void mremap_dontunmap_partial_mapping()
225225
}
226226

227227
// This test validates that we can remap over only a portion of a mapping.
228-
static void mremap_dontunmap_partial_mapping_overwrite()
228+
static void mremap_dontunmap_partial_mapping_overwrite(void)
229229
{
230230
/*
231231
* source mapping:

0 commit comments

Comments
 (0)