From: Artem Bityutskiy Date: Sat, 10 Jan 2009 11:12:09 +0000 (+0000) Subject: rbtree: add const qualifier to some functions X-Git-Tag: v2.6.29-rc1~7 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=f4b477c47332367d35686bd2b808c2156b96d7c7;p=pandora-kernel.git rbtree: add const qualifier to some functions The 'rb_first()', 'rb_last()', 'rb_next()' and 'rb_prev()' calls take a pointer to an RB node or RB root. They do not change the pointed objects, so add a 'const' qualifier in order to make life of the users of these functions easier. Indeed, if I have my own constant pointer &const struct my_type *p, and I call 'rb_next(&p->rb)', I get a GCC warning: warning: passing argument 1 of ‘rb_next’ discards qualifiers from pointer target type Signed-off-by: Artem Bityutskiy Signed-off-by: David Woodhouse Signed-off-by: Linus Torvalds --- Reading git-diff-tree failed