lkml.org 
[lkml]   [2010]   [Oct]   [16]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 3/9] jump label: Fix module __init section race

* Steven Rostedt <rostedt@goodmis.org> wrote:

> On Fri, 2010-10-15 at 16:09 -0400, Steven Rostedt wrote:
>
> > --- a/kernel/jump_label.c
> > +++ b/kernel/jump_label.c
> > @@ -168,7 +168,8 @@ void jump_label_update(unsigned long key, enum jump_label_type type)
> > count = e_module->nr_entries;
> > iter = e_module->table;
> > while (count--) {
> > - if (kernel_text_address(iter->code))
> > + if (iter->key &&
> > + kernel_text_address(iter->code))
>
> Peter, I know you hated this, but the alternative is either:
>
> if (iter->key &&
> kernel_text_address(iter->code))
>
> or break 80 chars. All three seem bad (although I don't mind breaking
> 80 chars for this). But I'll leave it for now.

No, the proper alternative is to move the body of the iteration into a
jump_label_update_entry() inline function ...

Nobody is forcing you to start yet another iteration 4 indentations
deep. We have functions for a reason.

Thanks,

Ingo


\
 
 \ /
  Last update: 2010-10-16 08:25    [from the cache]
©2003-2011 Jasper Spaans