Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S939819AbdD1JUR (ORCPT ); Fri, 28 Apr 2017 05:20:17 -0400 Received: from mail-io0-f193.google.com ([209.85.223.193]:36424 "EHLO mail-io0-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932501AbdD1JTv (ORCPT ); Fri, 28 Apr 2017 05:19:51 -0400 MIME-Version: 1.0 In-Reply-To: <20170428090808.GA84977@localhost> References: <1493355227-31492-1-git-send-email-ganapatrao.kulkarni@cavium.com> <1493355227-31492-2-git-send-email-ganapatrao.kulkarni@cavium.com> <20170428090808.GA84977@localhost> From: Ganapatrao Kulkarni Date: Fri, 28 Apr 2017 14:49:49 +0530 Message-ID: Subject: Re: [PATCH v2 1/4] perf utils: passing pmu as a parameter to function get_cpuid_str To: Jayachandran C Cc: Ganapatrao Kulkarni , "linux-kernel@vger.kernel.org" , "linux-arm-kernel@lists.infradead.org" , Will Deacon , Catalin Marinas , Mark Rutland , acme@kernel.org, alexander.shishkin@linux.intel.com, peterz@infradead.org, Ingo Molnar Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1208 Lines: 38 On Fri, Apr 28, 2017 at 2:38 PM, Jayachandran C wrote: > On Fri, Apr 28, 2017 at 10:23:44AM +0530, Ganapatrao Kulkarni wrote: >> cpuid string will not be same on all CPUs on heterogeneous >> platforms like ARM's big.LITTLE, adding provision(using pmu->cpus) >> to find cpuid string from associated CPUs of PMU CORE device. >> >> Signed-off-by: Ganapatrao Kulkarni >> --- >> tools/perf/arch/powerpc/util/header.c | 3 ++- >> tools/perf/arch/x86/util/header.c | 4 +++- >> tools/perf/util/header.h | 3 ++- >> tools/perf/util/pmu.c | 10 ++++++---- >> 4 files changed, 13 insertions(+), 7 deletions(-) >> >> diff --git a/tools/perf/arch/powerpc/util/header.c b/tools/perf/arch/powerpc/util/header.c >> index 9aaa6f5..9a70cc1 100644 >> --- a/tools/perf/arch/powerpc/util/header.c >> +++ b/tools/perf/arch/powerpc/util/header.c >> @@ -34,10 +34,11 @@ >> } >> >> char * >> -get_cpuid_str(void) >> +get_cpuid_str(struct perf_pmu *pmu) >> { >> char *bufp; >> >> + do { if (pmu) {} } while (0); > > If this is to avoid warnings, can you use __maybe_unused here? thanks, i will do. > > JC. thanks Ganapat