diff --git a/include/bitops.h b/include/bitops.h index bd1f4e7f6..42f57b3b8 100644 --- a/include/bitops.h +++ b/include/bitops.h @@ -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)); } diff --git a/include/rbtree.h b/include/rbtree.h index ed41af9e6..ff220c042 100644 --- a/include/rbtree.h +++ b/include/rbtree.h @@ -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)