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

From: Dmitry Rokosov
Date: Tue Aug 30 2022 - 20:47:00 EST


Hello Andy,

Sorry for late response. I didn't have the ability to reach my laptop during
last week.

[...]

>
> > + if (val)
> > + memcpy(__get_dynamic_array(buf), val, val_len);
>
> I'm probably missing something, but what this condition prevents from?

In general, this condition prevents memcpy from being executed when
tracepoint is called with a null pointed buffer.

[...]

> > + TP_printk("%s reg=%x val=%s", __get_str(name),
> > + (unsigned int)__entry->reg,
>
> Why do you need casting?
>

To be honest, I've made it based on the already existing regmap
tracepoints style. All of them make a cast to unsigned int type when
printout reg number.

--
Thank you,
Dmitry