[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20150317021807.A73A314011D@ozlabs.org>
Date: Tue, 17 Mar 2015 13:18:07 +1100 (AEDT)
From: Michael Ellerman <mpe@...erman.id.au>
To: Sukadev Bhattiprolu <sukadev@...ux.vnet.ibm.com>,
Paul Mackerras <paulus@...ba.org>
Cc: peterz@...radead.org, linuxppc-dev@...ts.ozlabs.org,
linux-kernel@...r.kernel.org
Subject: Re: [6/9] powerpc/hv-24x7: Define add_event_to_24x7_request()
On Tue, 2015-17-02 at 22:00:31 UTC, Sukadev Bhattiprolu wrote:
> Move code that maps a perf_event to a 24x7 request buffer into a
> separate function, add_event_to_24x7_request().
>
> diff --git a/arch/powerpc/perf/hv-24x7.c b/arch/powerpc/perf/hv-24x7.c
> index e78b127..76c649a 100644
> --- a/arch/powerpc/perf/hv-24x7.c
> +++ b/arch/powerpc/perf/hv-24x7.c
> @@ -1052,7 +1077,6 @@ static unsigned long single_24x7_request(struct perf_event *event, u64 *count)
> }
>
> resb = &result_buffer->results[0];
> -
> *count = be64_to_cpu(resb->elements[0].element_data[0]);
> out:
> return ret;
> @@ -1150,6 +1174,7 @@ static void h_24x7_event_read(struct perf_event *event)
> {
> s64 prev;
> u64 now;
> +
> now = h_24x7_get_value(event);
> prev = local64_xchg(&event->hw.prev_count, now);
> local64_add(now - prev, &event->count);
I'm a fan of whitespace for readability in cases like this, but do it as a
separate patch.
cheers
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists