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

From: Andy Shevchenko
Date: Thu Sep 01 2022 - 09:20:34 EST


On Wed, Aug 31, 2022 at 03:45:30AM +0300, Dmitry Rokosov wrote:

...

> > > + 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.

If we got a NULL pointer here, we already in a lot of troubles.
I believe the check is not needed.

Otherwise the function prints garbage.

I will send a series to remove that and clean up the file.

--
With Best Regards,
Andy Shevchenko