From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1033318AbdAJBKJ (ORCPT ); Mon, 9 Jan 2017 20:10:09 -0500 Received: from one.firstfloor.org ([193.170.194.197]:35902 "EHLO one.firstfloor.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751969AbdAJBKI (ORCPT ); Mon, 9 Jan 2017 20:10:08 -0500 Date: Mon, 9 Jan 2017 17:10:05 -0800 From: Andi Kleen To: Jiri Olsa Cc: Andi Kleen , acme@kernel.org, jolsa@kernel.org, linux-kernel@vger.kernel.org, mingo@kernel.org, Andi Kleen Subject: Re: [PATCH 02/11] perf, tools: Parse eventcode as number in jevents Message-ID: <20170110011005.GC26852@two.firstfloor.org> References: <20170103150833.6694-1-andi@firstfloor.org> <20170103150833.6694-3-andi@firstfloor.org> <20170108185741.GA14072@krava> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20170108185741.GA14072@krava> User-Agent: Mutt/1.5.21 (2010-09-15) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org > > for (f = fields; f->field; f++) > > if (json_streq(map, field, f->field) && nz) { > > + /* Handle all variations of 0 encounted in JSON */ > > + if (json_streq(map, val, "0x00") || > > + json_streq(map, val, "0x0")) > > + return 1; > > how is this related to the patch? also shouldn't it return 0 ? I removed it now. It avoids some extra umask=0x0 entries, but these don't hurt. -Andi