Skip to content

Commit

Permalink
maple_tree-add-mas_next_range-and-mas_find_range-interfaces-checkpatc…
Browse files Browse the repository at this point in the history
…h-fixes

ERROR: Macros with complex values should be enclosed in parentheses
#58: FILE: include/linux/maple_tree.h:544:
+#define mas_contiguous(__mas, __entry, __max) \
+	while (((__entry) = mas_find_range((__mas), (__max))) != NULL)

WARNING: suspect code indent for conditional statements (8, 12)
torvalds#285: FILE: lib/maple_tree.c:6136:
+	if (mas_find_setup(mas, max, &entry))
+	    return entry;

WARNING: Statements should start on a tabstop
torvalds#286: FILE: lib/maple_tree.c:6137:
+	    return entry;

total: 1 errors, 2 warnings, 284 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/maple_tree-add-mas_next_range-and-mas_find_range-interfaces.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: "Liam R. Howlett" <Liam.Howlett@oracle.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
  • Loading branch information
akpm00 authored and Kaz205 committed May 17, 2023
1 parent 1a8fa40 commit 372679b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/maple_tree.c
Original file line number Diff line number Diff line change
Expand Up @@ -6133,7 +6133,7 @@ void *mas_find(struct ma_state *mas, unsigned long max)
void *entry = NULL;

if (mas_find_setup(mas, max, &entry))
return entry;
return entry;

/* Retries on dead nodes handled by mas_next_slot */
return mas_next_slot(mas, max, false);
Expand Down

0 comments on commit 372679b

Please sign in to comment.