Received: by 2002:a4a:301c:0:0:0:0:0 with SMTP id q28-v6csp632327oof; Tue, 25 Sep 2018 02:32:41 -0700 (PDT) X-Google-Smtp-Source: ACcGV61bf+MAVzPpA0H/JoQz0E7xx1X6rqBMEJw4yQ5jzFtSLXUzm5Sx72AAc/tXSzkQuJA6wNH+ X-Received: by 2002:a62:5245:: with SMTP id g66-v6mr113348pfb.259.1537867961773; Tue, 25 Sep 2018 02:32:41 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1537867961; cv=none; d=google.com; s=arc-20160816; b=zkMsq9EXS74bGXUs5GoL9uGOfriMSqhfaOlmf3rUibLzNVJC3vcCMmSOuUclHDTb/G nUj4svmSYffbiT2WXliwmtbA+doAvVMp2fpgMFSrkN6l3dkfYSfvLOogXPnbuGi22Ix/ JnXw3r6msEM3DUwS+Xo7vG/qzD+twtxvL8ISkQRS6wc7fGErbOIbE5wMRq5FoEOlywRV sYYQuSXVPJjJmfq1x3HJ5zJEpKl1p4Q9ahC1smPxxyibG2v41hdxAsWVUd2Nv9YczhYc a0Sx1hhvSaCvhJQcoV1wDZlueguCnhUL+UE4dvu1mj1HZrR38gCCoeWy329EhzoSapAo OW/A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-disposition :content-transfer-encoding:mime-version:robot-unsubscribe:robot-id :git-commit-id:subject:to:references:in-reply-to:reply-to:cc :message-id:from:date; bh=PD3G4Xc67igSHY/c+t2kvYqPylJPfYdF9X3DsenAMu4=; b=qUvWN1uQsPPE4km2Dn/sJD/AfCejaOEnU88RhOseDeN0HfkqqCEgCie2OZo+1oFpgB qXXzNuhvDSA0GCXpCi1p6LM+/m0Vn0AAleNb9PkB7xZrRpdh3clNaSEg5yfSZiC2fDN6 e/1R0U/YPKe9MlHKnKjTNnZRRyKnWHfybui+2EGACYZUm0WX19OGuLURgZdnsyhdaCko xzDdl1lAEmy1XOoZ7d0mDNVK0843xKhlV9SyZMkBzid9huXlWis3si91aLx1NNYAYZTZ 0Gf5JkXCk5bW4FeRDGrMq1f0rLG+nQdmCLi30TnBQQiw8H5VpEVFSxXws5NBNjR6lHII kneQ== 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 e39-v6si2007113plg.386.2018.09.25.02.32.26; Tue, 25 Sep 2018 02:32: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 S1728823AbeIYPiy (ORCPT + 99 others); Tue, 25 Sep 2018 11:38:54 -0400 Received: from terminus.zytor.com ([198.137.202.136]:52537 "EHLO terminus.zytor.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726201AbeIYPix (ORCPT ); Tue, 25 Sep 2018 11:38:53 -0400 Received: from terminus.zytor.com (localhost [127.0.0.1]) by terminus.zytor.com (8.15.2/8.15.2) with ESMTPS id w8P9UcPK3386070 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Tue, 25 Sep 2018 02:30:38 -0700 Received: (from tipbot@localhost) by terminus.zytor.com (8.15.2/8.15.2/Submit) id w8P9UcHA3386067; Tue, 25 Sep 2018 02:30:38 -0700 Date: Tue, 25 Sep 2018 02:30:38 -0700 X-Authentication-Warning: terminus.zytor.com: tipbot set sender to tipbot@zytor.com using -f From: tip-bot for Ding Xiang Message-ID: Cc: hpa@zytor.com, acme@redhat.com, mingo@kernel.org, linux-kernel@vger.kernel.org, dingxiang@cmss.chinamobile.com, jolsa@redhat.com, namhyung@kernel.org, alexander.shishkin@linux.intel.com, peterz@infradead.org, tglx@linutronix.de Reply-To: tglx@linutronix.de, peterz@infradead.org, alexander.shishkin@linux.intel.com, namhyung@kernel.org, dingxiang@cmss.chinamobile.com, jolsa@redhat.com, linux-kernel@vger.kernel.org, mingo@kernel.org, acme@redhat.com, hpa@zytor.com In-Reply-To: <1536284082-23466-2-git-send-email-dingxiang@cmss.chinamobile.com> References: <1536284082-23466-2-git-send-email-dingxiang@cmss.chinamobile.com> To: linux-tip-commits@vger.kernel.org Subject: [tip:perf/core] perf bpf-loader: use PTR_ERR_OR_ZERO inetead of return code Git-Commit-ID: e381d1c21eea186daed6834af444575e06841355 X-Mailer: tip-git-log-daemon Robot-ID: Robot-Unsubscribe: Contact to get blacklisted from these emails MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset=UTF-8 Content-Disposition: inline X-Spam-Status: No, score=-2.9 required=5.0 tests=ALL_TRUSTED,BAYES_00, DATE_IN_FUTURE_96_Q autolearn=ham autolearn_force=no version=3.4.1 X-Spam-Checker-Version: SpamAssassin 3.4.1 (2015-04-28) on terminus.zytor.com Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Commit-ID: e381d1c21eea186daed6834af444575e06841355 Gitweb: https://git.kernel.org/tip/e381d1c21eea186daed6834af444575e06841355 Author: Ding Xiang AuthorDate: Fri, 7 Sep 2018 09:34:42 +0800 Committer: Arnaldo Carvalho de Melo CommitDate: Wed, 19 Sep 2018 10:25:09 -0300 perf bpf-loader: use PTR_ERR_OR_ZERO inetead of return code Use PTR_ERR_OR_ZERO() in bpf__setup_stdout() return code instead of open coded equivalent. Signed-off-by: Ding Xiang Cc: Alexander Shishkin Cc: Jiri Olsa Cc: Namhyung Kim Cc: Peter Zijlstra Link: http://lkml.kernel.org/r/1536284082-23466-2-git-send-email-dingxiang@cmss.chinamobile.com Signed-off-by: Arnaldo Carvalho de Melo --- tools/perf/util/bpf-loader.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/perf/util/bpf-loader.c b/tools/perf/util/bpf-loader.c index 47aac41349a2..f9ae1a993806 100644 --- a/tools/perf/util/bpf-loader.c +++ b/tools/perf/util/bpf-loader.c @@ -1615,7 +1615,7 @@ struct perf_evsel *bpf__setup_output_event(struct perf_evlist *evlist, const cha int bpf__setup_stdout(struct perf_evlist *evlist) { struct perf_evsel *evsel = bpf__setup_output_event(evlist, "__bpf_stdout__"); - return IS_ERR(evsel) ? PTR_ERR(evsel) : 0; + return PTR_ERR_OR_ZERO(evsel); } #define ERRNO_OFFSET(e) ((e) - __BPF_LOADER_ERRNO__START)