From patchwork Wed Nov 4 04:17:11 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nicolas Pitre X-Patchwork-Id: 55963 Delivered-To: patch@linaro.org Received: by 10.112.61.134 with SMTP id p6csp2198714lbr; Tue, 3 Nov 2015 20:17:16 -0800 (PST) X-Received: by 10.107.7.218 with SMTP id g87mr911264ioi.7.1446610636436; Tue, 03 Nov 2015 20:17:16 -0800 (PST) Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id t18si18076596igd.1.2015.11.03.20.17.16; Tue, 03 Nov 2015 20:17:16 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-omap-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-omap-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-omap-owner@vger.kernel.org; dkim=neutral (body hash did not verify) header.i=@linaro_org.20150623.gappssmtp.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755186AbbKDERP (ORCPT + 3 others); Tue, 3 Nov 2015 23:17:15 -0500 Received: from mail-qg0-f44.google.com ([209.85.192.44]:33320 "EHLO mail-qg0-f44.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755183AbbKDERO (ORCPT ); Tue, 3 Nov 2015 23:17:14 -0500 Received: by qgeo38 with SMTP id o38so31981556qge.0 for ; Tue, 03 Nov 2015 20:17:13 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro_org.20150623.gappssmtp.com; s=20150623; h=date:from:to:cc:subject:message-id:user-agent:mime-version :content-type; bh=tVYIm17VeQl2IR134QzAJbs/2hV3rF9jlYwEcEBPCNk=; b=AQT2Bwsmqbb+7OaOoNAKFiSxnUZV1K0a0+aa3TMJlESAdJJ/4CaF2n3qwNxZuyozq/ Q5nshsAjo2qApGPvqHyJLrr02MwfCp4kOAGiMfPGm9ZNR/04Ky0CHoSTKQln9wuSBDO8 ds/Gch00UzkBcVvIM5O/xk8GD5QUcePe47DHRsmpHvg3TBK5yRw2utttQkOnjwj1cLdA qTKsB6dlEwWz7Yqo/f6S/ap51Wc5gE4/6w7m0BUcUS0NYk6Irhi9Z7neiVkYkcsLK0Re WJnAV6o65iTQa6sfPNx4nEtW7cJzrCx9+qbNh5c2MT1RCIV65klVSoX7MjLAaXYhv5/K ZQvQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:date:from:to:cc:subject:message-id:user-agent :mime-version:content-type; bh=tVYIm17VeQl2IR134QzAJbs/2hV3rF9jlYwEcEBPCNk=; b=jFNqcnTzLV2qG3vSq9Or5MOuSRjl/hBE2Xf2Zx+OgvjJzNPEJrDrK/wj7tz3tDSeCg iwTepW6Vbm1nktNj4t8He0vgy3KPdgc6xo5UBG1lA+oTzUwL/RfHsdNBIQMePM6E6ZBS 068q6UTiCAaXwx2qvq5g9WuRv8+GicAN0vJ1FLqL9wZQiSjD16TdwJCZ/Z0lVHdikV8m ykXA5LtnpI3oEdiMwIareBAJlcRW+Zsh4erv0dfGXAIAIeMWxIbeejT4GPtH760dDCNx 22TBaPMYA0yYpVrxmp3fRwnSDDhR0aw72fC2k3J0frTQbf48Ar0cimVgcDR25PZaaSPa n0Ow== X-Gm-Message-State: ALoCoQn8DbRWik2M9z9fSEoPT5GaPfbp5G1DnM2UkVlqFOaWUIV5biky5FxQOmh8DbNg/wAqnBFP X-Received: by 10.140.98.206 with SMTP id o72mr41441729qge.2.1446610633845; Tue, 03 Nov 2015 20:17:13 -0800 (PST) Received: from xanadu.home (modemcable065.157-23-96.mc.videotron.ca. [96.23.157.65]) by smtp.gmail.com with ESMTPSA id 138sm4709640qhp.26.2015.11.03.20.17.12 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 03 Nov 2015 20:17:12 -0800 (PST) Date: Tue, 3 Nov 2015 23:17:11 -0500 (EST) From: Nicolas Pitre To: Tero Kristo , Michael Turquette cc: linux-omap@vger.kernel.org, linux-clk@vger.kernel.org Subject: [PATCH] ti/fapll: fix wrong do_div() usage Message-ID: User-Agent: Alpine 2.20 (LFD 67 2015-01-07) MIME-Version: 1.0 Sender: linux-omap-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-omap@vger.kernel.org do_div() is meant to be used with an unsigned dividend. Signed-off-by: Nicolas Pitre -- To unsubscribe from this list: send the line "unsubscribe linux-omap" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html diff --git a/drivers/clk/ti/fapll.c b/drivers/clk/ti/fapll.c index f4b2e9888b..66a0d0ed8b 100644 --- a/drivers/clk/ti/fapll.c +++ b/drivers/clk/ti/fapll.c @@ -168,7 +168,7 @@ static unsigned long ti_fapll_recalc_rate(struct clk_hw *hw, { struct fapll_data *fd = to_fapll(hw); u32 fapll_n, fapll_p, v; - long long rate; + u64 rate; if (ti_fapll_clock_is_bypass(fd)) return parent_rate; @@ -314,7 +314,7 @@ static unsigned long ti_fapll_synth_recalc_rate(struct clk_hw *hw, { struct fapll_synth *synth = to_synth(hw); u32 synth_div_m; - long long rate; + u64 rate; /* The audio_pll_clk1 is hardwired to produce 32.768KiHz clock */ if (!synth->div)