Re: [PATCH v1] regmap: introduce value tracing for regmap bulk operations

From: Andy Shevchenko
Date: Tue Aug 23 2022 - 17:40:08 EST


On Tue, Aug 16, 2022 at 9:14 PM Dmitry Rokosov <DDRokosov@xxxxxxxxxxxxxx> wrote:
>
> Currently, only one-register io operations support tracepoints with
> value logging. For the regmap bulk operations developer can view
> hw_start/hw_done tracepoints with starting reg number and registers
> count to be reading or writing. This patch injects tracepoints with
> dumping registers values in the hex format to regmap bulk reading
> and writing.

Since it's applied, below might be considered for follow-ups.

...

> + if (val)
> + memcpy(__get_dynamic_array(buf), val, val_len);

I'm probably missing something, but what this condition prevents from?

...

> + TP_printk("%s reg=%x val=%s", __get_str(name),
> + (unsigned int)__entry->reg,

Why do you need casting?

--
With Best Regards,
Andy Shevchenko