From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755185AbdEIRFh (ORCPT ); Tue, 9 May 2017 13:05:37 -0400 Received: from mx1.redhat.com ([209.132.183.28]:34752 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754262AbdEIRFg (ORCPT ); Tue, 9 May 2017 13:05:36 -0400 DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com 2002C80480 Authentication-Results: ext-mx04.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com Authentication-Results: ext-mx04.extmail.prod.ext.phx2.redhat.com; spf=pass smtp.mailfrom=jolsa@redhat.com DKIM-Filter: OpenDKIM Filter v2.11.0 mx1.redhat.com 2002C80480 Date: Tue, 9 May 2017 19:05:34 +0200 From: Jiri Olsa To: Andi Kleen Cc: acme@kernel.org, jolsa@kernel.org, linux-kernel@vger.kernel.org, Andi Kleen Subject: Re: [PATCH] perf, tools, script: Allow adding and removing fields Message-ID: <20170509170534.GA17318@krava> References: <20170509143637.12810-1-andi@firstfloor.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20170509143637.12810-1-andi@firstfloor.org> User-Agent: Mutt/1.8.0 (2017-02-23) X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.28]); Tue, 09 May 2017 17:05:36 +0000 (UTC) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, May 09, 2017 at 07:36:37AM -0700, Andi Kleen wrote: SNIP > + } else { > + if (change == REMOVE) > + output[j].fields &= ~all_output_options[i].field; > + else > + output[j].fields |= all_output_options[i].field; > + } > } > } else { > if (output[type].invalid_fields & all_output_options[i].field) { > @@ -1826,10 +1852,15 @@ static int parse_output_fields(const struct option *opt __maybe_unused, > "Events will not be displayed.\n", event_type(type)); > } > } > + goto out; > > +out_badmix: > + fprintf(stderr, "Cannot mix +-field with overridden fields\n"); > + rc = -EINVAL; > out: > free(str); > return rc; > + > } extra new line, but I guess Arnaldo could remove that ;-) Acked-by: Jiri Olsa thanks, jirka