From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755306AbbCCG0p (ORCPT ); Tue, 3 Mar 2015 01:26:45 -0500 Received: from terminus.zytor.com ([198.137.202.10]:49346 "EHLO terminus.zytor.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752912AbbCCG0o (ORCPT ); Tue, 3 Mar 2015 01:26:44 -0500 Date: Mon, 2 Mar 2015 22:26:28 -0800 From: tip-bot for Adrian Hunter Message-ID: Cc: adrian.hunter@intel.com, mingo@kernel.org, tglx@linutronix.de, acme@redhat.com, linux-kernel@vger.kernel.org, eranian@google.com, hpa@zytor.com Reply-To: acme@redhat.com, eranian@google.com, linux-kernel@vger.kernel.org, hpa@zytor.com, adrian.hunter@intel.com, tglx@linutronix.de, mingo@kernel.org In-Reply-To: <54F41849.1010906@intel.com> References: <54F41849.1010906@intel.com> To: linux-tip-commits@vger.kernel.org Subject: [tip:perf/core] perf tools: Initialize cpu set in pthread_attr_setaffinity_np feature test Git-Commit-ID: 543d976fa2ebf5543bd07b5d487bf3a6144c0886 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 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Commit-ID: 543d976fa2ebf5543bd07b5d487bf3a6144c0886 Gitweb: http://git.kernel.org/tip/543d976fa2ebf5543bd07b5d487bf3a6144c0886 Author: Adrian Hunter AuthorDate: Mon, 2 Mar 2015 09:59:05 +0200 Committer: Arnaldo Carvalho de Melo CommitDate: Mon, 2 Mar 2015 12:48:16 -0300 perf tools: Initialize cpu set in pthread_attr_setaffinity_np feature test Feature tests are compiled but not executed, however it might avoid a future uninitialized variable warning, so initialize the cpu set. Reported-by: Ingo Molnar Signed-off-by: Adrian Hunter Cc: H. Peter Anvin Cc: Ingo Molnar Cc: Stephane Eranian Cc: Thomas Gleixner Cc: linux-tip-commits@vger.kernel.org Link: http://lkml.kernel.org/r/54F41849.1010906@intel.com Signed-off-by: Arnaldo Carvalho de Melo --- tools/perf/config/feature-checks/test-pthread-attr-setaffinity-np.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/tools/perf/config/feature-checks/test-pthread-attr-setaffinity-np.c b/tools/perf/config/feature-checks/test-pthread-attr-setaffinity-np.c index 2b81b72..fdada5e 100644 --- a/tools/perf/config/feature-checks/test-pthread-attr-setaffinity-np.c +++ b/tools/perf/config/feature-checks/test-pthread-attr-setaffinity-np.c @@ -1,5 +1,6 @@ #include #include +#include int main(void) { @@ -8,7 +9,8 @@ int main(void) cpu_set_t cs; pthread_attr_init(&thread_attr); - /* don't care abt exact args, just the API itself in libpthread */ + CPU_ZERO(&cs); + ret = pthread_attr_setaffinity_np(&thread_attr, sizeof(cs), &cs); return ret;