Received: by 2002:a25:824b:0:0:0:0:0 with SMTP id d11csp1391472ybn; Wed, 25 Sep 2019 17:38:41 -0700 (PDT) X-Google-Smtp-Source: APXvYqz0ghUe31pGe0cYNC4V5Zcyq0CkJNk5UHiNI++sh/KVwX/7amsVm+GVnmKrgZaPxaf8tjyw X-Received: by 2002:a17:906:1659:: with SMTP id n25mr851461ejd.258.1569458321772; Wed, 25 Sep 2019 17:38:41 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1569458321; cv=none; d=google.com; s=arc-20160816; b=jn6eJiX7JekERkJE1jShwOSkpDp3ROoqXfDtNHaRbmTRXoILgiLpH3TimABgmEz4+9 gjUjw6nzBaMFrzapMDxeMut49+u2e886YwfuxTvxDnf711cHlBZHEwvMXvJ9ZFbV8vUc viOWTHoLf1lCtqo6O6wrnYK4FGc8RgrRnyIJRMjqftiK0gR55n0njYpBcn3hMjlJzEbK Yc9hdVmQec4pRfcXv950x6y/YCr06GqyiexstCjQRA0eCgXElsH0Vdsc27CcB8shXBhz qXBK08Vn1V0QzVe2Tiyr9y/drVdunqh6An1P0K8Pjtzi7vTl9i9QMwIl0Zp/oNbjxIB1 zKkw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from; bh=ftBpniEKsrSqGbstGZhfffKXU2sfLLjtMS4YHl7hQ4c=; b=IkXSntxz8nEA2Uj1Y8IDRz1BvWuJReFcwMjkl3wNf4fp2kEv8e/MxTo1Rvmy9XgU6e 2o5SQA5GmZdBvMMdAyXe9BTBe6tpdgmRVj5kTmAmNExFqr59qFAA/KTiCenipH3BHe6T lPinfx+llOq4eHQwvk4Fr0dpcW7poFFYaTJBH5l4RoNqZj5ySkoksrHlvoIXeWI7s1uo USmBtgVZKdw0iDl0tix0wNXMLPVFQxWjabnwMbSOd8j8Eh67zI/HEmU7SJkGZ8s89EIU 83wkVR4t3VRetLcT1zqkIvWw3q2FAm7pe88GYP5NlV9WT7tQ6g8QOW9WmzrRrOG/jCQF CtHQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id q20si246644ejn.18.2019.09.25.17.38.17; Wed, 25 Sep 2019 17:38:41 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2408334AbfIWXdq (ORCPT + 99 others); Mon, 23 Sep 2019 19:33:46 -0400 Received: from mga18.intel.com ([134.134.136.126]:40710 "EHLO mga18.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2408241AbfIWXdq (ORCPT ); Mon, 23 Sep 2019 19:33:46 -0400 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga007.jf.intel.com ([10.7.209.58]) by orsmga106.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 23 Sep 2019 16:33:45 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.64,542,1559545200"; d="scan'208";a="179295887" Received: from tassilo.jf.intel.com (HELO tassilo.localdomain) ([10.7.201.137]) by orsmga007.jf.intel.com with ESMTP; 23 Sep 2019 16:33:45 -0700 Received: by tassilo.localdomain (Postfix, from userid 1000) id 6E896301AF6; Mon, 23 Sep 2019 16:33:45 -0700 (PDT) From: Andi Kleen To: acme@kernel.org Cc: jolsa@kernel.org, linux-kernel@vger.kernel.org, Andi Kleen Subject: [PATCH 2/3] perf, expr: Remove assert usage Date: Mon, 23 Sep 2019 16:33:38 -0700 Message-Id: <20190923233339.25326-2-andi@firstfloor.org> X-Mailer: git-send-email 2.21.0 In-Reply-To: <20190923233339.25326-1-andi@firstfloor.org> References: <20190923233339.25326-1-andi@firstfloor.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Andi Kleen My "compile perf statically" setup doesn't like this assert for unknown reasons. Replace it with a standard BUG_ON Signed-off-by: Andi Kleen --- tools/perf/util/expr.y | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tools/perf/util/expr.y b/tools/perf/util/expr.y index f9a20a39b64a..5086a941295a 100644 --- a/tools/perf/util/expr.y +++ b/tools/perf/util/expr.y @@ -6,7 +6,6 @@ #define IN_EXPR_Y 1 #include "expr.h" #include "smt.h" -#include #include #define MAXIDLEN 256 @@ -172,7 +171,8 @@ static int expr__lex(YYSTYPE *res, const char **pp) void expr__add_id(struct parse_ctx *ctx, const char *name, double val) { int idx; - assert(ctx->num_ids < MAX_PARSE_ID); + + BUG_ON(ctx->num_ids >= MAX_PARSE_ID); idx = ctx->num_ids++; ctx->ids[idx].name = name; ctx->ids[idx].val = val; -- 2.21.0