Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S965557AbbLRVBq (ORCPT ); Fri, 18 Dec 2015 16:01:46 -0500 Received: from mail-ig0-f170.google.com ([209.85.213.170]:33395 "EHLO mail-ig0-f170.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S965441AbbLRVAP (ORCPT ); Fri, 18 Dec 2015 16:00:15 -0500 From: Mathieu Poirier To: gregkh@linuxfoundation.org, alexander.shishkin@linux.intel.com Cc: zhang.chunyan@linaro.org, mike.leach@arm.com, tor@ti.com, al.grant@arm.com, fainelli@broadcom.com, linux-arm-kernel@lists.infradead.org, linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org, Mathieu Poirier , Peter Zijlstra , Ingo Molnar , Arnaldo Carvalho de Melo Subject: [PATCH V7 21/24] perf tools: making function set_max_cpu_num() non static Date: Fri, 18 Dec 2015 13:59:17 -0700 Message-Id: <1450472361-426-22-git-send-email-mathieu.poirier@linaro.org> X-Mailer: git-send-email 2.1.4 In-Reply-To: <1450472361-426-1-git-send-email-mathieu.poirier@linaro.org> References: <1450472361-426-1-git-send-email-mathieu.poirier@linaro.org> Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1644 Lines: 49 For memory allocation purposes, code located in other places then util/cpumap.c may want to know how many CPUs the system has. This patch is making function set_max_cpu_num() available to other parts of the perf tool so that global variable 'max_cpu_num' gets the right value when referenced by cpu__max_cpu(). Cc: Peter Zijlstra Cc: Ingo Molnar Cc: Arnaldo Carvalho de Melo Signed-off-by: Mathieu Poirier --- tools/perf/util/cpumap.c | 2 +- tools/perf/util/cpumap.h | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/tools/perf/util/cpumap.c b/tools/perf/util/cpumap.c index 10af1e7524fb..ae179320c0c0 100644 --- a/tools/perf/util/cpumap.c +++ b/tools/perf/util/cpumap.c @@ -380,7 +380,7 @@ out: } /* Determine highest possible cpu in the system for sparse allocation */ -static void set_max_cpu_num(void) +void set_max_cpu_num(void) { const char *mnt; char path[PATH_MAX]; diff --git a/tools/perf/util/cpumap.h b/tools/perf/util/cpumap.h index 85f7772457fa..45fa963345eb 100644 --- a/tools/perf/util/cpumap.h +++ b/tools/perf/util/cpumap.h @@ -14,6 +14,7 @@ struct cpu_map { int map[]; }; +void set_max_cpu_num(void); struct cpu_map *cpu_map__new(const char *cpu_list); struct cpu_map *cpu_map__empty_new(int nr); struct cpu_map *cpu_map__dummy_new(void); -- 2.1.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/