Skip to content

Commit c5df64f

Browse files
akpm00sfrothwell
authored andcommitted
rbtree-avoid-generating-code-twice-for-the-cached-versions-checkpatch-fixes
WARNING: 'implemntation' may be misspelled - perhaps 'implementation'? torvalds#8: rb_leftmost was wired deeper into the implemntation, but there were some ERROR: Macros with complex values should be enclosed in parentheses torvalds#180: FILE: include/linux/rbtree.h:130: +#define RB_ROOT_CACHED (struct rb_root_cached) { {NULL, }, NULL } ERROR: Macros with complex values should be enclosed in parentheses torvalds#183: FILE: include/linux/rbtree.h:133: +#define rb_first_cached(root) (root)->rb_leftmost ERROR: code indent should use tabs where possible torvalds#197: FILE: include/linux/rbtree.h:147: + if (root->rb_leftmost == node)$ WARNING: please, no spaces at the start of a line torvalds#197: FILE: include/linux/rbtree.h:147: + if (root->rb_leftmost == node)$ ERROR: code indent should use tabs where possible torvalds#198: FILE: include/linux/rbtree.h:148: + root->rb_leftmost = rb_next(node);$ WARNING: please, no spaces at the start of a line torvalds#198: FILE: include/linux/rbtree.h:148: + root->rb_leftmost = rb_next(node);$ total: 4 errors, 3 warnings, 246 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. NOTE: Whitespace errors detected. You may wish to use scripts/cleanpatch or scripts/cleanfile ./patches/rbtree-avoid-generating-code-twice-for-the-cached-versions.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: Michel Lespinasse <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Stephen Rothwell <[email protected]>
1 parent b6d01b6 commit c5df64f

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

include/linux/rbtree.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -144,8 +144,8 @@ static inline void rb_insert_color_cached(struct rb_node *node,
144144
static inline void rb_erase_cached(struct rb_node *node,
145145
struct rb_root_cached *root)
146146
{
147-
if (root->rb_leftmost == node)
148-
root->rb_leftmost = rb_next(node);
147+
if (root->rb_leftmost == node)
148+
root->rb_leftmost = rb_next(node);
149149
rb_erase(node, &root->rb_root);
150150
}
151151

0 commit comments

Comments
 (0)