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 _______________________________________________ Linuxppc-dev mailing list Linuxppc-dev@lists.ozlabs.org https://lists.ozlabs.org/listinfo/linuxppc-dev