Skip to content

Commit 5394f51

Browse files
akpm00sfrothwell
authored andcommitted
reimplement-idr-and-ida-using-the-radix-tree-support-storing-null-in-the-idr-checkpatch-fixes
WARNING: braces {} are not necessary for single statement blocks torvalds#143: FILE: tools/testing/radix-tree/idr-test.c:88: + for (i = 0; i < 10; i++) { + assert(idr_alloc(&idr, NULL, 0, 0, GFP_KERNEL) == i); + } WARNING: braces {} are not necessary for single statement blocks torvalds#167: FILE: tools/testing/radix-tree/idr-test.c:112: + for (i = 1; i < 10; i++) { + assert(idr_alloc(&idr, NULL, 1, 0, GFP_KERNEL) == i); + } total: 0 errors, 2 warnings, 159 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/reimplement-idr-and-ida-using-the-radix-tree-support-storing-null-in-the-idr.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: Matthew Wilcox <[email protected]> Signed-off-by: Andrew Morton <[email protected]>
1 parent 55a4b88 commit 5394f51

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

tools/testing/radix-tree/idr-test.c

+2-4
Original file line numberDiff line numberDiff line change
@@ -85,9 +85,8 @@ void idr_null_test(void)
8585
int i;
8686
DEFINE_IDR(idr);
8787

88-
for (i = 0; i < 10; i++) {
88+
for (i = 0; i < 10; i++)
8989
assert(idr_alloc(&idr, NULL, 0, 0, GFP_KERNEL) == i);
90-
}
9190

9291
assert(idr_replace(&idr, DUMMY_PTR, 3) == NULL);
9392
assert(idr_replace(&idr, DUMMY_PTR, 4) == NULL);
@@ -109,9 +108,8 @@ void idr_null_test(void)
109108
idr_destroy(&idr);
110109
assert(idr_is_empty(&idr));
111110

112-
for (i = 1; i < 10; i++) {
111+
for (i = 1; i < 10; i++)
113112
assert(idr_alloc(&idr, NULL, 1, 0, GFP_KERNEL) == i);
114-
}
115113

116114
idr_destroy(&idr);
117115
}

0 commit comments

Comments
 (0)