lkml.org 
[lkml]   [2018]   [May]   [23]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: [PATCH 01/12] perf/breakpoint: Split attribute parse and commit
Date
Frederic Weisbecker <frederic@kernel.org> writes:

> diff --git a/kernel/events/hw_breakpoint.c b/kernel/events/hw_breakpoint.c
> index 6e28d28..51320c2 100644
> --- a/kernel/events/hw_breakpoint.c
> +++ b/kernel/events/hw_breakpoint.c
> @@ -424,19 +443,22 @@ static int validate_hw_breakpoint(struct perf_event *bp)
>
> int register_perf_hw_breakpoint(struct perf_event *bp)
> {
> - int ret;
> + struct arch_hw_breakpoint hw;
> + int err;
>
> - ret = reserve_bp_slot(bp);
> - if (ret)
> - return ret;
> + err = reserve_bp_slot(bp);
> + if (err)
> + return err;
>
> - ret = validate_hw_breakpoint(bp);
> -
> - /* if arch_validate_hwbkpt_settings() fails then release bp slot */
> - if (ret)
> + err = hw_breakpoint_parse(bp, &bp->attr, &hw);

Is there a good reason we pass bp and bp->attr? (I assume so)

That added to the confusion in the existing code I think.

cheers

\
 
 \ /
  Last update: 2018-05-24 03:56    [W:0.158 / U:1.492 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site