[Skiboot] [PATCH 11/15] external/trace: Use correct width integer byte swapping
Oliver
oohall at gmail.com
Mon Mar 25 12:41:31 AEDT 2019
On Mon, Mar 25, 2019 at 11:18 AM Jordan Niethe <jniethe5 at gmail.com> wrote:
>
> The trace_repeat struct uses be16 for storing the number of repeats.
> Currently be32_to_cpu conversion is used to display this member. This
> produces an incorrect value. Use be16_to_cpu instead.
> ---
> external/trace/dump_trace.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/external/trace/dump_trace.c b/external/trace/dump_trace.c
> index db53d785be57..4779dc42ec6d 100644
> --- a/external/trace/dump_trace.c
> +++ b/external/trace/dump_trace.c
> @@ -170,7 +170,7 @@ int main(int argc, char *argv[])
> switch (t.hdr.type) {
> case TRACE_REPEAT:
> printf("REPEATS: %u times\n",
> - be32_to_cpu(t.repeat.num));
> + be16_to_cpu(t.repeat.num));
> break;
> case TRACE_OVERFLOW:
> printf("**OVERFLOW**: %"PRIu64" bytes missed\n",
> --
> 2.20.1
Reviewed-by: Oliver O'Halloran <oohall at gmail.com>
>
> _______________________________________________
> Skiboot mailing list
> Skiboot at lists.ozlabs.org
> https://lists.ozlabs.org/listinfo/skiboot
More information about the Skiboot
mailing list