From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753472AbbCAQwn (ORCPT ); Sun, 1 Mar 2015 11:52:43 -0500 Received: from mail-wg0-f42.google.com ([74.125.82.42]:41854 "EHLO mail-wg0-f42.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752927AbbCAQwl (ORCPT ); Sun, 1 Mar 2015 11:52:41 -0500 Date: Sun, 1 Mar 2015 17:52:36 +0100 From: Ingo Molnar To: hpa@zytor.com, adrian.hunter@intel.com, eranian@google.com, linux-kernel@vger.kernel.org, tglx@linutronix.de, jolsa@redhat.com, acme@redhat.com Cc: linux-tip-commits@vger.kernel.org Subject: Re: [tip:perf/urgent] perf tools: Fix pthread_attr_setaffinity_np build error Message-ID: <20150301165235.GA24700@gmail.com> References: <1424774766-24194-1-git-send-email-adrian.hunter@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.23 (2014-03-12) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org * tip-bot for Adrian Hunter wrote: > --- a/tools/perf/config/feature-checks/test-pthread-attr-setaffinity-np.c > +++ b/tools/perf/config/feature-checks/test-pthread-attr-setaffinity-np.c > @@ -5,10 +5,11 @@ int main(void) > { > int ret = 0; > pthread_attr_t thread_attr; > + cpu_set_t cs; > > pthread_attr_init(&thread_attr); > /* don't care abt exact args, just the API itself in libpthread */ > - ret = pthread_attr_setaffinity_np(&thread_attr, 0, NULL); > + ret = pthread_attr_setaffinity_np(&thread_attr, sizeof(cs), &cs); So I'm splitting hairs, as we never run these testcases, but I think a CPU_ZERO(&cs) is needed, as 'cs' might be uninitialized. Thanks, Ingo