From patchwork Tue Nov 3 10:44:43 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Wang Nan X-Patchwork-Id: 55927 Delivered-To: patch@linaro.org Received: by 10.112.61.134 with SMTP id p6csp1768296lbr; Tue, 3 Nov 2015 03:01:59 -0800 (PST) X-Received: by 10.68.103.161 with SMTP id fx1mr33006200pbb.42.1446548519458; Tue, 03 Nov 2015 03:01:59 -0800 (PST) Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id e7si41415182pas.161.2015.11.03.03.01.59; Tue, 03 Nov 2015 03:01:59 -0800 (PST) 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 S1753754AbbKCLB5 (ORCPT + 28 others); Tue, 3 Nov 2015 06:01:57 -0500 Received: from szxga03-in.huawei.com ([119.145.14.66]:2531 "EHLO szxga03-in.huawei.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753211AbbKCLBE (ORCPT ); Tue, 3 Nov 2015 06:01:04 -0500 Received: from 172.24.1.50 (EHLO szxeml422-hub.china.huawei.com) ([172.24.1.50]) by szxrg03-dlp.huawei.com (MOS 4.4.3-GA FastPath queued) with ESMTP id BQI59265; Tue, 03 Nov 2015 18:45:02 +0800 (CST) Received: from linux-4hy3.site (10.107.193.248) by szxeml422-hub.china.huawei.com (10.82.67.152) with Microsoft SMTP Server id 14.3.235.1; Tue, 3 Nov 2015 18:44:53 +0800 From: Wang Nan To: CC: , , , Wang Nan , Arnaldo Carvalho de Melo Subject: [PATCH 2/5] perf tools: Mute libbpf when '-v' not set Date: Tue, 3 Nov 2015 10:44:43 +0000 Message-ID: <1446547486-229499-3-git-send-email-wangnan0@huawei.com> X-Mailer: git-send-email 1.8.3.4 In-Reply-To: <1446547486-229499-1-git-send-email-wangnan0@huawei.com> References: <1446547486-229499-1-git-send-email-wangnan0@huawei.com> MIME-Version: 1.0 X-Originating-IP: [10.107.193.248] X-CFilter-Loop: Reflected X-Mirapoint-Virus-RAPID-Raw: score=unknown(0), refid=str=0001.0A090204.563893E5.0103, ss=1, re=0.000, recu=0.000, reip=0.000, cl=1, cld=1, fgs=0, ip=0.0.0.0, so=2013-05-26 15:14:31, dmn=2013-03-21 17:37:32 X-Mirapoint-Loop-Id: b0c324f3e556fcaa684aa35fd01bffb1 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org According to [1], libbpf should be muted. This patch reset info and warning message level to ensure libbpf doesn't output anything even if error happened. Signed-off-by: Wang Nan Cc: Arnaldo Carvalho de Melo --- tools/perf/util/bpf-loader.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) -- 1.8.3.4 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/ diff --git a/tools/perf/util/bpf-loader.c b/tools/perf/util/bpf-loader.c index ba6f752..0c5d174 100644 --- a/tools/perf/util/bpf-loader.c +++ b/tools/perf/util/bpf-loader.c @@ -26,8 +26,8 @@ static int libbpf_##name(const char *fmt, ...) \ return ret; \ } -DEFINE_PRINT_FN(warning, 0) -DEFINE_PRINT_FN(info, 0) +DEFINE_PRINT_FN(warning, 1) +DEFINE_PRINT_FN(info, 1) DEFINE_PRINT_FN(debug, 1) struct bpf_prog_priv {