lkml.org 
[lkml]   [2019]   [Oct]   [28]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH RFC 3/6] perf dso: Add dso__data_write_cache_addr()
On Fri, Oct 25, 2019 at 03:59:57PM +0300, Adrian Hunter wrote:
SNIP

>
> -static ssize_t data_read_offset(struct dso *dso, struct machine *machine,
> - u64 offset, u8 *data, ssize_t size)
> +static ssize_t data_read_write_offset(struct dso *dso, struct machine *machine,
> + u64 offset, u8 *data, ssize_t size,
> + bool out)
> {
> if (dso__data_file_size(dso, machine))
> return -1;
> @@ -1034,7 +1037,7 @@ static ssize_t data_read_offset(struct dso *dso, struct machine *machine,
> if (offset + size < offset)
> return -1;
>
> - return cached_read(dso, machine, offset, data, size);
> + return cached_io(dso, machine, offset, data, size, out);

you renamed the function as _read_write_ so the bool choosing
the opration should be named either read or write.. I had to
go all the way down to find out what 'out' means ;-)

jirka

\
 
 \ /
  Last update: 2019-10-28 16:45    [W:0.345 / U:0.732 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site