On Tue, 2013-07-23 at 22:59 +0200, Oleg Nesterov wrote:

>  static void remove_event_from_tracers(struct ftrace_event_call *call)
>  {
>       struct ftrace_event_file *file;
>       struct trace_array *tr;
>  
>       do_for_each_event_file_safe(tr, file) {
> -
> -             if (file->event_call != call)
> -                     continue;
> -
> -             list_del(&file->list);
> -             debugfs_remove_recursive(file->dir);
> -             remove_subsystem(file->system);
> -             kmem_cache_free(file_cachep, file);
> -
> -             /*
> -              * The do_for_each_event_file_safe() is
> -              * a double loop. After finding the call for this
> -              * trace_array, we use break to jump to the next
> -              * trace_array.
> -              */
> -             break;
> +             if (file->event_call == call) {

I don't care if you do it this way because it's just two lines, but the
reason I do the:

        if (file->event_call != call)
                continue;

is to keep the indentation down.

-- Steve

> +                     remove_event_file_dir(file);
> +                     /*
> +                      * The do_for_each_event_file_safe() is
> +                      * a double loop. After finding the call for this
> +                      * trace_array, we use break to jump to the next
> +                      * trace_array.
> +                      */
> +                     break;
> +             }
>       } while_for_each_event_file();
>  }
>  
> @@ -2298,12 +2300,8 @@ __trace_remove_event_dirs(struct trace_array *tr)
>  {
>       struct ftrace_event_file *file, *next;
>  
> -     list_for_each_entry_safe(file, next, &tr->events, list) {
> -             list_del(&file->list);
> -             debugfs_remove_recursive(file->dir);
> -             remove_subsystem(file->system);
> -             kmem_cache_free(file_cachep, file);
> -     }
> +     list_for_each_entry_safe(file, next, &tr->events, list)
> +             remove_event_file_dir(file);
>  }
>  
>  static void


--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Reply via email to