lkml.org 
[lkml]   [2022]   [Sep]   [1]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v1] regmap: introduce value tracing for regmap bulk operations
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


\
 
 \ /
  Last update: 2022-09-01 15:21    [W:0.062 / U:0.276 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site