Skip to content

Commit

Permalink
jump_label: Use more consistent naming
Browse files Browse the repository at this point in the history
Now that there's still only a few users around, rename things to make
them more consistent.

Signed-off-by: Peter Zijlstra <[email protected]>
LKML-Reference: <[email protected]>
Signed-off-by: Ingo Molnar <[email protected]>
  • Loading branch information
Peter Zijlstra authored and Ingo Molnar committed Oct 18, 2010
1 parent d580ff8 commit 3b6e901
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 9 deletions.
8 changes: 4 additions & 4 deletions include/linux/jump_label.h
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,10 @@ extern void jump_label_update(unsigned long key, enum jump_label_type type);
extern void jump_label_apply_nops(struct module *mod);
extern int jump_label_text_reserved(void *start, void *end);

#define enable_jump_label(key) \
#define jump_label_enable(key) \
jump_label_update((unsigned long)key, JUMP_LABEL_ENABLE);

#define disable_jump_label(key) \
#define jump_label_disable(key) \
jump_label_update((unsigned long)key, JUMP_LABEL_DISABLE);

#else
Expand All @@ -39,12 +39,12 @@ do { \
goto label; \
} while (0)

#define enable_jump_label(cond_var) \
#define jump_label_enable(cond_var) \
do { \
*(cond_var) = 1; \
} while (0)

#define disable_jump_label(cond_var) \
#define jump_label_disable(cond_var) \
do { \
*(cond_var) = 0; \
} while (0)
Expand Down
6 changes: 3 additions & 3 deletions kernel/tracepoint.c
Original file line number Diff line number Diff line change
Expand Up @@ -265,10 +265,10 @@ static void set_tracepoint(struct tracepoint_entry **entry,
*/
rcu_assign_pointer(elem->funcs, (*entry)->funcs);
if (!elem->state && active) {
enable_jump_label(&elem->state);
jump_label_enable(&elem->state);
elem->state = active;
} else if (elem->state && !active) {
disable_jump_label(&elem->state);
jump_label_disable(&elem->state);
elem->state = active;
}
}
Expand All @@ -285,7 +285,7 @@ static void disable_tracepoint(struct tracepoint *elem)
elem->unregfunc();

if (elem->state) {
disable_jump_label(&elem->state);
jump_label_disable(&elem->state);
elem->state = 0;
}
rcu_assign_pointer(elem->funcs, NULL);
Expand Down
4 changes: 2 additions & 2 deletions lib/dynamic_debug.c
Original file line number Diff line number Diff line change
Expand Up @@ -142,9 +142,9 @@ static void ddebug_change(const struct ddebug_query *query,
dt->num_enabled++;
dp->flags = newflags;
if (newflags) {
enable_jump_label(&dp->enabled);
jump_label_enable(&dp->enabled);
} else {
disable_jump_label(&dp->enabled);
jump_label_disable(&dp->enabled);
}
if (verbose)
printk(KERN_INFO
Expand Down

0 comments on commit 3b6e901

Please sign in to comment.