lkml.org 
[lkml]   [2017]   [Jun]   [8]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v3 11/15] perf header: add a buffer to struct feat_fd
On Tue, Jun 06, 2017 at 12:07:18AM -0700, David Carrillo-Cisneros wrote:

SNIP

> static int do_read_u32(struct feat_fd *ff, u32 *addr)
> @@ -188,6 +233,10 @@ static char *do_read_string(struct feat_fd *ff)
> static int write_tracing_data(struct feat_fd *ff,
> struct perf_evlist *evlist)
> {
> + if (ff->buf) {
> + WARN_ON("Pipe-mode doesn't supported write_tracing_data.\n");
> + return -1;
> + }

I think you need to use WARN or WARN_ONCE here, like:

if (WARN_ONCE(ff->buf, "Pipe....."))
return -1;

WARN_ON takes condition as an argument not string

jirka

\
 
 \ /
  Last update: 2017-06-12 01:26    [W:0.421 / U:0.124 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site