diff options
Diffstat (limited to 'kernel/tracepoint.c')
-rw-r--r-- | kernel/tracepoint.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/kernel/tracepoint.c b/kernel/tracepoint.c index 42e86ddbd2a0..c7c62a4a75f5 100644 --- a/kernel/tracepoint.c +++ b/kernel/tracepoint.c | |||
@@ -177,7 +177,7 @@ static struct tracepoint_entry *get_tracepoint(const char *name) | |||
177 | struct tracepoint_entry *e; | 177 | struct tracepoint_entry *e; |
178 | u32 hash = jhash(name, strlen(name), 0); | 178 | u32 hash = jhash(name, strlen(name), 0); |
179 | 179 | ||
180 | head = &tracepoint_table[hash & ((1 << TRACEPOINT_HASH_BITS)-1)]; | 180 | head = &tracepoint_table[hash & (TRACEPOINT_TABLE_SIZE - 1)]; |
181 | hlist_for_each_entry(e, node, head, hlist) { | 181 | hlist_for_each_entry(e, node, head, hlist) { |
182 | if (!strcmp(name, e->name)) | 182 | if (!strcmp(name, e->name)) |
183 | return e; | 183 | return e; |
@@ -197,7 +197,7 @@ static struct tracepoint_entry *add_tracepoint(const char *name) | |||
197 | size_t name_len = strlen(name) + 1; | 197 | size_t name_len = strlen(name) + 1; |
198 | u32 hash = jhash(name, name_len-1, 0); | 198 | u32 hash = jhash(name, name_len-1, 0); |
199 | 199 | ||
200 | head = &tracepoint_table[hash & ((1 << TRACEPOINT_HASH_BITS)-1)]; | 200 | head = &tracepoint_table[hash & (TRACEPOINT_TABLE_SIZE - 1)]; |
201 | hlist_for_each_entry(e, node, head, hlist) { | 201 | hlist_for_each_entry(e, node, head, hlist) { |
202 | if (!strcmp(name, e->name)) { | 202 | if (!strcmp(name, e->name)) { |
203 | printk(KERN_NOTICE | 203 | printk(KERN_NOTICE |
@@ -233,7 +233,7 @@ static int remove_tracepoint(const char *name) | |||
233 | size_t len = strlen(name) + 1; | 233 | size_t len = strlen(name) + 1; |
234 | u32 hash = jhash(name, len-1, 0); | 234 | u32 hash = jhash(name, len-1, 0); |
235 | 235 | ||
236 | head = &tracepoint_table[hash & ((1 << TRACEPOINT_HASH_BITS)-1)]; | 236 | head = &tracepoint_table[hash & (TRACEPOINT_TABLE_SIZE - 1)]; |
237 | hlist_for_each_entry(e, node, head, hlist) { | 237 | hlist_for_each_entry(e, node, head, hlist) { |
238 | if (!strcmp(name, e->name)) { | 238 | if (!strcmp(name, e->name)) { |
239 | found = 1; | 239 | found = 1; |