Re: [PATCH v2 08/10] perf/hv24x7: Whitespace cleanup
Joe Perches [j...@perches.com] wrote: | On Mon, 2015-03-30 at 18:53 -0700, Sukadev Bhattiprolu wrote: | > Fix minor whitespace damages. | | If you are going to do whitespace cleaning, | please verify the patches with scripts/checkpatch.pl --strict. Ok. Will fix up parameter alignment with the open parens in a follow on patch. | | > diff --git a/arch/powerpc/perf/hv-24x7.c b/arch/powerpc/perf/hv-24x7.c | [] | > @@ -1077,7 +1079,6 @@ static unsigned long single_24x7_request(struct perf_event *event, u64 *count) | > } | > | > resb = _buffer->results[0]; | > - | > *count = be64_to_cpu(resb->elements[0].element_data[0]); | > out: | > return ret; | | Does this deletion make the code easier to read? | | It might be better just to use: | | be64 val; | ... | val = result_buffer->results[0].elements[0].element_data[0]; | *count = be64_to_cpu(val); Agree. Will include in a follow on patch. Sukadev -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: [PATCH v2 08/10] perf/hv24x7: Whitespace cleanup
Joe Perches [j...@perches.com] wrote: | On Mon, 2015-03-30 at 18:53 -0700, Sukadev Bhattiprolu wrote: | Fix minor whitespace damages. | | If you are going to do whitespace cleaning, | please verify the patches with scripts/checkpatch.pl --strict. Ok. Will fix up parameter alignment with the open parens in a follow on patch. | | diff --git a/arch/powerpc/perf/hv-24x7.c b/arch/powerpc/perf/hv-24x7.c | [] | @@ -1077,7 +1079,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; | | Does this deletion make the code easier to read? | | It might be better just to use: | | be64 val; | ... | val = result_buffer-results[0].elements[0].element_data[0]; | *count = be64_to_cpu(val); Agree. Will include in a follow on patch. Sukadev -- To unsubscribe from this list: send the line unsubscribe linux-kernel in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: [PATCH v2 08/10] perf/hv24x7: Whitespace cleanup
On Mon, 2015-03-30 at 18:53 -0700, Sukadev Bhattiprolu wrote: > Fix minor whitespace damages. If you are going to do whitespace cleaning, please verify the patches with scripts/checkpatch.pl --strict. > diff --git a/arch/powerpc/perf/hv-24x7.c b/arch/powerpc/perf/hv-24x7.c [] > @@ -1077,7 +1079,6 @@ static unsigned long single_24x7_request(struct > perf_event *event, u64 *count) > } > > resb = _buffer->results[0]; > - > *count = be64_to_cpu(resb->elements[0].element_data[0]); > out: > return ret; Does this deletion make the code easier to read? It might be better just to use: be64 val; ... val = result_buffer->results[0].elements[0].element_data[0]; *count = be64_to_cpu(val); -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: [PATCH v2 08/10] perf/hv24x7: Whitespace cleanup
On Mon, 2015-03-30 at 18:53 -0700, Sukadev Bhattiprolu wrote: Fix minor whitespace damages. If you are going to do whitespace cleaning, please verify the patches with scripts/checkpatch.pl --strict. diff --git a/arch/powerpc/perf/hv-24x7.c b/arch/powerpc/perf/hv-24x7.c [] @@ -1077,7 +1079,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; Does this deletion make the code easier to read? It might be better just to use: be64 val; ... val = result_buffer-results[0].elements[0].element_data[0]; *count = be64_to_cpu(val); -- To unsubscribe from this list: send the line unsubscribe linux-kernel in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/