diff options
author | Andrew Morton <akpm@linux-foundation.org> | 2016-12-20 11:19:56 +0100 |
---|---|---|
committer | Michal Hocko <mhocko@suse.com> | 2016-12-20 11:19:56 +0100 |
commit | 726c7c65d5bfd694610cbfb4ec26d4d2de9b9ac9 (patch) | |
tree | 985a9305195dcf5ef6f15af732515d6b6406b611 | |
parent | d24a988c7c30a2289f38215a0349d04b44360391 (diff) |
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
#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
#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 <mawilcox@microsoft.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
-rw-r--r-- | tools/testing/radix-tree/idr-test.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/tools/testing/radix-tree/idr-test.c b/tools/testing/radix-tree/idr-test.c index b3a3d9e76fb7..010127d392af 100644 --- a/tools/testing/radix-tree/idr-test.c +++ b/tools/testing/radix-tree/idr-test.c @@ -85,9 +85,8 @@ void idr_null_test(void) int i; DEFINE_IDR(idr); - for (i = 0; i < 10; i++) { + for (i = 0; i < 10; i++) assert(idr_alloc(&idr, NULL, 0, 0, GFP_KERNEL) == i); - } assert(idr_replace(&idr, DUMMY_PTR, 3) == NULL); assert(idr_replace(&idr, DUMMY_PTR, 4) == NULL); @@ -109,9 +108,8 @@ void idr_null_test(void) idr_destroy(&idr); assert(idr_is_empty(&idr)); - for (i = 1; i < 10; i++) { + for (i = 1; i < 10; i++) assert(idr_alloc(&idr, NULL, 1, 0, GFP_KERNEL) == i); - } idr_destroy(&idr); } |