From patchwork Mon Oct 21 11:49:01 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sanjay Singh Rawat X-Patchwork-Id: 21201 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-qa0-f69.google.com (mail-qa0-f69.google.com [209.85.216.69]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id E055220356 for ; Mon, 21 Oct 2013 11:48:39 +0000 (UTC) Received: by mail-qa0-f69.google.com with SMTP id cm18sf8956735qab.8 for ; Mon, 21 Oct 2013 04:48:39 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=mime-version:x-gm-message-state:delivered-to:from:to:cc:subject :date:message-id:x-original-sender:x-original-authentication-results :precedence:mailing-list:list-id:list-post:list-help:list-archive :list-unsubscribe; bh=G96712kdKK3oLamvHsYbWJsGL+Q7ZavANpR9AqQS95Y=; b=DVvdQk99C+LDe9GbX4Q2GABJETos0ATl7ifTNaqQTYATwGa8m2jLnpWVxvE+wjZhpP jj41+5CSoO471n0umETDD/aniWN9UL1SUKI8uG6ykb8Gy6fgd8VN1d1xUBLDo2tJmNwS 0tOiL9fsnZ/jWYtcCr+/zcXwfRn4FhsWBtap3CE6xRIarnccqjSRfYqEp+sRc/cf3pQE hoJroW0BqFXqrT/IlSyPYEVzGjytEIEFXpO5aQluxVSj8qVtPDM8PE87DiZNF64WSdY1 KCGUOFumiZejn6o4+69R8LvvhUJ0Eh4R3IYYMfU9M3KxfzCBXiS8gm7gaiEUjR03QoNZ Q3vA== X-Received: by 10.236.53.70 with SMTP id f46mr15361426yhc.17.1382356119685; Mon, 21 Oct 2013 04:48:39 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.49.60.68 with SMTP id f4ls2146251qer.72.gmail; Mon, 21 Oct 2013 04:48:39 -0700 (PDT) X-Received: by 10.220.238.84 with SMTP id kr20mr672297vcb.37.1382356119588; Mon, 21 Oct 2013 04:48:39 -0700 (PDT) Received: from mail-ve0-f170.google.com (mail-ve0-f170.google.com [209.85.128.170]) by mx.google.com with ESMTPS id g9si4436393vcu.11.2013.10.21.04.48.39 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Mon, 21 Oct 2013 04:48:39 -0700 (PDT) Received-SPF: neutral (google.com: 209.85.128.170 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) client-ip=209.85.128.170; Received: by mail-ve0-f170.google.com with SMTP id db12so4157493veb.29 for ; Mon, 21 Oct 2013 04:48:39 -0700 (PDT) X-Gm-Message-State: ALoCoQkiyGpBNJRGsuOqAVF2jA9bDkT+zm8f0OJn1mqs1Rx5peDgr+ynmwV/Sfi3nPJx+PvtkJWP X-Received: by 10.220.11.7 with SMTP id r7mr10901445vcr.12.1382356119261; Mon, 21 Oct 2013 04:48:39 -0700 (PDT) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patches@linaro.org Received: by 10.220.174.196 with SMTP id u4csp146068vcz; Mon, 21 Oct 2013 04:48:38 -0700 (PDT) X-Received: by 10.66.119.136 with SMTP id ku8mr2632979pab.121.1382356118419; Mon, 21 Oct 2013 04:48:38 -0700 (PDT) Received: from mail-pd0-f180.google.com (mail-pd0-f180.google.com [209.85.192.180]) by mx.google.com with ESMTPS id ud7si9018564pac.91.2013.10.21.04.48.38 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Mon, 21 Oct 2013 04:48:38 -0700 (PDT) Received-SPF: neutral (google.com: 209.85.192.180 is neither permitted nor denied by best guess record for domain of sanjay.rawat@linaro.org) client-ip=209.85.192.180; Received: by mail-pd0-f180.google.com with SMTP id p10so5230491pdj.11 for ; Mon, 21 Oct 2013 04:48:38 -0700 (PDT) X-Received: by 10.68.98.101 with SMTP id eh5mr17161437pbb.65.1382356117932; Mon, 21 Oct 2013 04:48:37 -0700 (PDT) Received: from srawat-Latitude-E6420.LGE.NET ([203.247.149.152]) by mx.google.com with ESMTPSA id qp10sm25197474pab.13.2013.10.21.04.48.35 for (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Mon, 21 Oct 2013 04:48:37 -0700 (PDT) From: Sanjay Singh Rawat To: powertop@lists.01.org Cc: Sanjay Singh Rawat Subject: [PATCH] resolve error for overloaded function call Date: Mon, 21 Oct 2013 17:19:01 +0530 Message-Id: <1382356141-21415-1-git-send-email-sanjay.rawat@linaro.org> X-Mailer: git-send-email 1.7.9.5 X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: sanjay.rawat@linaro.org X-Original-Authentication-Results: mx.google.com; spf=neutral (google.com: 209.85.128.170 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Precedence: list Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org List-ID: X-Google-Group-Id: 836684582541 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , - for android receiving compilation error rapl_interface.cpp:195:40: error: call of overloaded 'pow(int, uint64_t)' is ambiguous include/math.h:222:8: note: double pow(double, double). stlport/stlport/stl/_cmath.h:453:24: note: float pow(float, float) Signed-off-by: Sanjay Singh Rawat --- src/cpu/rapl/rapl_interface.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/cpu/rapl/rapl_interface.cpp b/src/cpu/rapl/rapl_interface.cpp index 8f236eb..6dd7b26 100644 --- a/src/cpu/rapl/rapl_interface.cpp +++ b/src/cpu/rapl/rapl_interface.cpp @@ -192,7 +192,7 @@ double c_rapl_interface::get_power_unit() return ret; } - return (double) 1/pow(2, value & 0xf); + return (double) 1/pow((double)2, (double)(value & 0xf)); } double c_rapl_interface::get_energy_status_unit() @@ -206,7 +206,7 @@ double c_rapl_interface::get_energy_status_unit() return ret; } - return (double)1/ pow(2, (value & 0x1f00) >> 8); + return (double)1/ pow((double)2, (double)((value & 0x1f00) >> 8)); } double c_rapl_interface::get_time_unit() @@ -220,7 +220,7 @@ double c_rapl_interface::get_time_unit() return ret; } - return (double)1 / pow(2, (value & 0xf0000) >> 16); + return (double)1 / pow((double)2, (double)((value & 0xf0000) >> 16)); } int c_rapl_interface::get_pkg_energy_status(double *status)