[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CALcN6mi5yAy782ykz-yzq9MEFCwH=zDjVWX6MC4GAPSgz6eOYA@mail.gmail.com>
Date: Tue, 13 Jun 2017 18:54:14 -0700
From: David Carrillo-Cisneros <davidcc@...gle.com>
To: Jiri Olsa <jolsa@...hat.com>
Cc: linux-kernel <linux-kernel@...r.kernel.org>,
Peter Zijlstra <peterz@...radead.org>,
Ingo Molnar <mingo@...hat.com>,
Arnaldo Carvalho de Melo <acme@...nel.org>,
Alexander Shishkin <alexander.shishkin@...ux.intel.com>,
Andi Kleen <ak@...ux.intel.com>, Simon Que <sque@...omium.org>,
Wang Nan <wangnan0@...wei.com>, Jiri Olsa <jolsa@...nel.org>,
He Kuang <hekuang@...wei.com>,
Masami Hiramatsu <mhiramat@...nel.org>,
Stephane Eranian <eranian@...gle.com>,
Paul Turner <pjt@...gle.com>
Subject: Re: [PATCH v4 12/16] perf header: add a buffer to struct feat_fd
On Tue, Jun 13, 2017 at 11:54 AM, Jiri Olsa <jolsa@...hat.com> wrote:
> On Mon, Jun 12, 2017 at 09:29:28PM -0700, David Carrillo-Cisneros wrote:
>
> SNIP
>
>> /* Return: 0 if succeded, -ERR if failed. */
>> int write_padded(struct feat_fd *ff, const void *bf,
>> size_t count, size_t count_aligned)
>> @@ -125,13 +151,32 @@ static int do_write_string(struct feat_fd *ff, const char *str)
>> return write_padded(ff, str, olen, len);
>> }
>>
>> -static int __do_read(struct feat_fd *ff, void *addr, ssize_t size)
>> +static int __do_read_fd(struct feat_fd *ff, void *addr, ssize_t size)
>> {
>> - ssize_t ret = readn(ff->fd, addr, size);
>> + ssize_t ret = readn(ff->fd, addr, size);
>> +
>> + if (ret != size)
>> + return ret < 0 ? (int)ret : -1;
>> + return 0;
>
> extra tab in indent
fixed
Powered by blists - more mailing lists