lkml.org 
[lkml]   [2023]   [Jul]   [10]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v3 4/4] tracing/probes: Fix to record 0-length data_loc in fetch_store_string*() if fails
On Tue, 11 Jul 2023 09:05:15 +0900
Masami Hiramatsu (Google) <mhiramat@kernel.org> wrote:

> > And this patch could have been:
> >
> > static nokprobe_inline void set_data_loc(int ret, void *dest, void *__dest, void *base)
> > {
> > *(u32 *)dest = make_data_loc(ret, __dest - base);
> > }
>
> and introduce it. I also want to put the ternary operator into set_data_loc() too
> for simplicity.
>
> static nokprobe_inline void set_data_loc(int ret, void *dest, void *__dest, void *base)
> {
> if (ret < 0)
> ret = 0;
> *(u32 *)dest = make_data_loc(ret, __dest - base);
> }
>

Sounds good.

-- Steve

\
 
 \ /
  Last update: 2023-07-11 02:17    [W:0.040 / U:0.668 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site