[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20191113160237.6b8efe12@gandalf.local.home>
Date: Wed, 13 Nov 2019 16:02:37 -0500
From: Steven Rostedt <rostedt@...dmis.org>
To: Piotr Maziarz <piotrx.maziarz@...ux.intel.com>
Cc: linux-kernel@...r.kernel.org, mingo@...hat.com,
andriy.shevchenko@...el.com, cezary.rojewski@...el.com,
gustaw.lewandowski@...el.com
Subject: Re: [PATCH v2 1/2] seq_buf: Add printing formatted hex dumps
On Thu, 7 Nov 2019 13:45:37 +0100
Piotr Maziarz <piotrx.maziarz@...ux.intel.com> wrote:
> Provided function is an analogue of print_hex_dump().
>
> Implementing this function in seq_buf allows using for multiple
> purposes (e.g. for tracing) and therefore prevents from code duplication
> in every layer that uses seq_buf.
>
> print_hex_dump() is an essential part of logging data to dmesg. Adding
> similar capability for other purposes is beneficial to all users.
>
> Example usage:
> seq_buf_hex_dump(seq, "", DUMP_PREFIX_OFFSET, 16, 4, buf,
> ARRAY_SIZE(buf), true);
> Example output:
> 00000000: 00000000 ffffff10 ffffff32 ffff3210 ........2....2..
> 00000010: ffff3210 83d00437 c0700000 00000000 .2..7.....p.....
> 00000020: 02010004 0000000f 0000000f 00004002 .............@..
> 00000030: 00000fff 00000000 ........
>
> Signed-off-by: Piotr Maziarz <piotrx.maziarz@...ux.intel.com>
> Signed-off-by: Cezary Rojewski <cezary.rojewski@...el.com>
I'm curious about the two signed off bys? Was Cezary a co-author?
> ---
> v2
> Add kernel doc header
> Explain linebuf magic number size
>
> Decided not to change declaration order or remaining -= rowsize to
> remaining -= linelen in order to stay aligned with base print_hex_dump
> function. However I can change it if requested.
I don't care as much to make the change. Perhaps we can clean that up
in the future.
-- Steve
>
> include/linux/seq_buf.h | 3 +++
> lib/seq_buf.c | 62 +++++++++++++++++++++++++++++++++++++++++++++++++
> 2 files changed, 65 insertions(+)
>
>
Powered by blists - more mailing lists