Commit fc4768f4 authored by Andrey Vagin's avatar Andrey Vagin Committed by Pavel Emelyanov

headers: mark functions as inline

to fix warning "error: ‘XXXXXX’ defined but not used"
Signed-off-by: 's avatarAndrey Vagin <avagin@openvz.org>
Signed-off-by: 's avatarPavel Emelyanov <xemul@parallels.com>
parent 066ec066
......@@ -19,17 +19,17 @@
#define ADDR BITOP_ADDR(addr)
static void set_bit(int nr, volatile unsigned long *addr)
static inline void set_bit(int nr, volatile unsigned long *addr)
{
asm volatile("bts %1,%0" : ADDR : "Ir" (nr) : "memory");
}
static void change_bit(int nr, volatile unsigned long *addr)
static inline void change_bit(int nr, volatile unsigned long *addr)
{
asm volatile("btc %1,%0" : ADDR : "Ir" (nr));
}
static int test_bit(int nr, volatile const unsigned long *addr)
static inline int test_bit(int nr, volatile const unsigned long *addr)
{
int oldbit;
......@@ -41,7 +41,7 @@ static int test_bit(int nr, volatile const unsigned long *addr)
return oldbit;
}
static void clear_bit(int nr, volatile unsigned long *addr)
static inline void clear_bit(int nr, volatile unsigned long *addr)
{
asm volatile("btr %1,%0" : ADDR : "Ir" (nr));
}
......
......@@ -31,12 +31,12 @@ struct rb_root {
#define rb_set_red(r) do { (r)->rb_parent_color &= ~RB_BLACK; } while (0)
#define rb_set_black(r) do { (r)->rb_parent_color |= RB_BLACK; } while (0)
static void rb_set_parent(struct rb_node *rb, struct rb_node *p)
static inline void rb_set_parent(struct rb_node *rb, struct rb_node *p)
{
rb->rb_parent_color = (rb->rb_parent_color & RB_MASK) | (unsigned long)p;
}
static void rb_set_color(struct rb_node *rb, int color)
static inline void rb_set_color(struct rb_node *rb, int color)
{
rb->rb_parent_color = (rb->rb_parent_color & ~RB_BLACK) | color;
}
......@@ -48,7 +48,7 @@ static void rb_set_color(struct rb_node *rb, int color)
#define RB_EMPTY_NODE(node) (rb_parent(node) == node)
#define RB_CLEAR_NODE(node) (rb_set_parent(node, node))
static void rb_init_node(struct rb_node *node)
static inline void rb_init_node(struct rb_node *node)
{
*node = (struct rb_node){ };
......@@ -68,7 +68,7 @@ extern struct rb_node *rb_prev(const struct rb_node *node);
extern void rb_replace_node(struct rb_node *victim, struct rb_node *new,
struct rb_root *root);
static void rb_link_node(struct rb_node *node, struct rb_node *parent,
static inline void rb_link_node(struct rb_node *node, struct rb_node *parent,
struct rb_node **rb_link)
{
node->rb_parent_color = (unsigned long)parent;
......@@ -77,7 +77,7 @@ static void rb_link_node(struct rb_node *node, struct rb_node *parent,
*rb_link = node;
}
static void rb_link_and_balance(struct rb_root *root,
static inline void rb_link_and_balance(struct rb_root *root,
struct rb_node *node,
struct rb_node *parent,
struct rb_node **rb_link)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment