From patchwork Mon Nov 2 19:03:04 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Javi Merino X-Patchwork-Id: 7537921 Return-Path: X-Original-To: patchwork-linux-pm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id A85079F71A for ; Mon, 2 Nov 2015 19:04:24 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id C57CB204D5 for ; Mon, 2 Nov 2015 19:04:23 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id BD08920462 for ; Mon, 2 Nov 2015 19:04:22 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754146AbbKBTEV (ORCPT ); Mon, 2 Nov 2015 14:04:21 -0500 Received: from foss.arm.com ([217.140.101.70]:52385 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753888AbbKBTEV (ORCPT ); Mon, 2 Nov 2015 14:04:21 -0500 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.72.51.249]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id CE22F4A; Mon, 2 Nov 2015 11:04:11 -0800 (PST) Received: from e104805-lin.cambridge.arm.com (e104805-lin.cambridge.arm.com [10.1.205.32]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPA id 127913F21A; Mon, 2 Nov 2015 11:04:19 -0800 (PST) From: Javi Merino To: linux-pm@vger.kernel.org Cc: linux-kernel@vger.kernel.org, orjan.eide@arm.com, edubezval@gmail.com, Javi Merino , Zhang Rui Subject: [PATCH 2/2] thermal: devfreq_cooling: Make power a u64 Date: Mon, 2 Nov 2015 19:03:04 +0000 Message-Id: <1446490984-18438-3-git-send-email-javi.merino@arm.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1446490984-18438-1-git-send-email-javi.merino@arm.com> References: <1446490984-18438-1-git-send-email-javi.merino@arm.com> Sender: linux-pm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-pm@vger.kernel.org X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, T_RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP The prototype of do_div() is: uint32_t do_div(uint64_t *n, uint32_t base); Make power u64 to avoid the following warning: drivers/thermal/devfreq_cooling.c: In function 'get_dynamic_power': drivers/thermal/devfreq_cooling.c:267:2: warning: comparison of distinct pointer types lacks a cast [enabled by default] drivers/thermal/devfreq_cooling.c:267:2: warning: right shift count >= width of type [enabled by default] drivers/thermal/devfreq_cooling.c:267:2: warning: passing argument 1 of '__div64_32' from incompatible pointer type [enabled by default] include/asm-generic/div64.h:35:17: note: expected 'uint64_t *' but argument is of type 'long unsigned int *' Reported-by: kbuild test robot Cc: Eduardo Valentin Cc: Zhang Rui Signed-off-by: Javi Merino --- drivers/thermal/devfreq_cooling.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/thermal/devfreq_cooling.c b/drivers/thermal/devfreq_cooling.c index 31e40a9a9fd0..d1b7c32e7406 100644 --- a/drivers/thermal/devfreq_cooling.c +++ b/drivers/thermal/devfreq_cooling.c @@ -257,7 +257,7 @@ static unsigned long get_dynamic_power(struct devfreq_cooling_device *dfc, unsigned long freq, unsigned long voltage) { - unsigned long power; + u64 power; u32 freq_mhz; struct devfreq_cooling_power *dfc_power = dfc->power_ops;