Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752509AbbHTRr2 (ORCPT ); Thu, 20 Aug 2015 13:47:28 -0400 Received: from youngberry.canonical.com ([91.189.89.112]:47430 "EHLO youngberry.canonical.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751136AbbHTRr0 (ORCPT ); Thu, 20 Aug 2015 13:47:26 -0400 From: Colin King To: Len Brown , Dasaratharaman Chandramouli Cc: linux-kernel@vger.kernel.org Subject: [PATCH] tools/power: turbostat: fix build warnings Date: Thu, 20 Aug 2015 10:46:51 -0700 Message-Id: <1440092811-28205-1-git-send-email-colin.king@canonical.com> X-Mailer: git-send-email 2.5.0 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Colin Ian King We're getting build warnings because of poorly defined function declarations: turbostat.c: In function ‘dump_cstate_pstate_config_info’: turbostat.c:1877:1: warning: type of ‘family’ defaults to ‘int’ [-Wimplicit-int] dump_cstate_pstate_config_info(family, model) ^ turbostat.c:1877:1: warning: type of ‘model’ defaults to ‘int’ [-Wimplicit-int] turbostat.c: In function ‘get_tdp’: turbostat.c:2046:8: warning: type of ‘model’ defaults to ‘int’ [-Wimplicit-int] double get_tdp(model) ^ turbostat.c: In function ‘perf_limit_reasons_probe’: turbostat.c:2160:6: warning: type of ‘family’ defaults to ‘int’ [-Wimplicit-int] void perf_limit_reasons_probe(family, model) ^ turbostat.c:2160:6: warning: type of ‘model’ defaults to ‘int’ [-Wimplicit-int] Minor changes to correct these build warnings. Signed-off-by: Colin Ian King --- tools/power/x86/turbostat/turbostat.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/tools/power/x86/turbostat/turbostat.c b/tools/power/x86/turbostat/turbostat.c index 323b65e..01673ca 100644 --- a/tools/power/x86/turbostat/turbostat.c +++ b/tools/power/x86/turbostat/turbostat.c @@ -1874,7 +1874,7 @@ int has_knl_turbo_ratio_limit(unsigned int family, unsigned int model) } } static void -dump_cstate_pstate_config_info(family, model) +dump_cstate_pstate_config_info(unsigned int family, unsigned int model) { if (!do_nhm_platform_info) return; @@ -2043,7 +2043,7 @@ int print_perf_limit(struct thread_data *t, struct core_data *c, struct pkg_data #define RAPL_POWER_GRANULARITY 0x7FFF /* 15 bit power granularity */ #define RAPL_TIME_GRANULARITY 0x3F /* 6 bit time granularity */ -double get_tdp(model) +double get_tdp(unsigned int model) { unsigned long long msr; @@ -2157,7 +2157,7 @@ void rapl_probe(unsigned int family, unsigned int model) return; } -void perf_limit_reasons_probe(family, model) +void perf_limit_reasons_probe(unsigned int family, unsigned int model) { if (!genuine_intel) return; @@ -2684,7 +2684,7 @@ void process_cpuid() perf_limit_reasons_probe(family, model); if (debug) - dump_cstate_pstate_config_info(); + dump_cstate_pstate_config_info(family, model); return; } -- 2.5.0