diff options
author | Michel Lespinasse <walken@google.com> | 2013-01-11 14:32:20 -0800 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2013-01-11 14:54:56 -0800 |
commit | 3cb7a56344ca45ee56d71c5f8fe9f922306bff1f (patch) | |
tree | da6fd5aa462e9e7c117063740c15fd95241c72d3 /lib/gcd.c | |
parent | a8906b0b673a8a64ae1446a7847def62388f6e46 (diff) | |
download | op-kernel-dev-3cb7a56344ca45ee56d71c5f8fe9f922306bff1f.zip op-kernel-dev-3cb7a56344ca45ee56d71c5f8fe9f922306bff1f.tar.gz |
lib/rbtree.c: avoid the use of non-static __always_inline
lib/rbtree.c declared __rb_erase_color() as __always_inline void, and
then exported it with EXPORT_SYMBOL.
This was because __rb_erase_color() must be exported for augmented
rbtree users, but it must also be inlined into rb_erase() so that the
dummy callback can get optimized out of that call site.
(Actually with a modern compiler, none of the dummy callback functions
should even be generated as separate text functions).
The above usage is legal C, but it was unusual enough for some compilers
to warn about it. This change makes things more explicit, with a static
__always_inline ____rb_erase_color function for use in rb_erase(), and a
separate non-inline __rb_erase_color function for use in
rb_erase_augmented call sites.
Signed-off-by: Michel Lespinasse <walken@google.com>
Reported-by: Wu Fengguang <fengguang.wu@intel.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'lib/gcd.c')
0 files changed, 0 insertions, 0 deletions