lkml.org 
[lkml]   [2011]   [Jan]   [5]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH 1/2] jump label: make enable/disable o(1)
From
Date
On Wed, 2011-01-05 at 10:43 -0500, Jason Baron wrote:
>
> +struct jump_label_key {
> + int state;
> +};
> +
> #define JUMP_LABEL(key, label) \
> do { \
> - if (unlikely(*key)) \
> + if (unlikely(((struct jump_label_key *)key)->state)) \
> goto label; \
> } while (0)

Anything that uses JUMP_LABEL() should pass in a pointer to a struct
jump_label_key. Hence, remove the typecast. That can only lead to hard
to find bugs.

-- Steve




\
 
 \ /
  Last update: 2011-01-05 18:33    [W:0.300 / U:0.068 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site