Skip to content

Commit aaf027b

Browse files
committed
mm-selftests-add-a-test-to-verify-mmap_changing-race-with-eagain-checkpatch-fixes
WARNING: do not add new typedefs torvalds#86: FILE: tools/testing/selftests/mm/uffd-unit-tests.c:1284: +typedef enum { WARNING: braces {} are not necessary for single statement blocks torvalds#106: FILE: tools/testing/selftests/mm/uffd-unit-tests.c:1304: + if (!fp) { + return THR_STATE_UNKNOWN; + } WARNING: Use of volatile is usually wrong: see Documentation/process/volatile-considered-harmful.rst torvalds#135: FILE: tools/testing/selftests/mm/uffd-unit-tests.c:1333: + volatile pid_t *pid = opaque; ERROR: trailing statements should be on next line torvalds#154: FILE: tools/testing/selftests/mm/uffd-unit-tests.c:1352: + while (uffd_read_msg(fd, &msg)); WARNING: Use of volatile is usually wrong: see Documentation/process/volatile-considered-harmful.rst torvalds#180: FILE: tools/testing/selftests/mm/uffd-unit-tests.c:1378: + while (!(volatile pid_t)pid) total: 1 errors, 4 warnings, 215 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/mm-selftests-add-a-test-to-verify-mmap_changing-race-with-eagain.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: Peter Xu <[email protected]> Signed-off-by: Andrew Morton <[email protected]>
1 parent 874fb0c commit aaf027b

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

tools/testing/selftests/mm/uffd-unit-tests.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1301,9 +1301,8 @@ static thread_state thread_state_get(pid_t tid)
13011301
snprintf(tmp, sizeof(tmp), "/proc/%d/status", tid);
13021302
fp = fopen(tmp, "r");
13031303

1304-
if (!fp) {
1304+
if (!fp)
13051305
return THR_STATE_UNKNOWN;
1306-
}
13071306

13081307
while (fgets(tmp, sizeof(tmp), fp)) {
13091308
p = strstr(tmp, header);

0 commit comments

Comments
 (0)