linux-mips
[Top] [All Lists]

Re: [PATCH 01/33] clk_ops: change round_rate() to return unsigned long

To: Mikko Perttunen <cyndis@kapsi.fi>, mturquette@baylibre.com, sboyd@codeaurora.org, linux-kernel@vger.kernel.org, linux-clk@vger.kernel.org
Subject: Re: [PATCH 01/33] clk_ops: change round_rate() to return unsigned long
From: Bryan O'Donoghue <pure.logic@nexus-software.ie>
Date: Sun, 31 Dec 2017 13:40:07 +0000
Cc: linux-omap@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-mips@linux-mips.org, linux-rpi-kernel@lists.infradead.org, patches@opensource.cirrus.com, uclinux-h8-devel@lists.sourceforge.jp, linux-amlogic@lists.infradead.org, linux-arm-msm@vger.kernel.org, linux-soc@vger.kernel.org, linux-renesas-soc@vger.kernel.org, linux-rockchip@lists.infradead.org, linux-samsung-soc@vger.kernel.org, linux-tegra@vger.kernel.org, dri-devel@lists.freedesktop.org, linux-mediatek@lists.infradead.org, freedreno@lists.freedesktop.org, linux-media@vger.kernel.org, linux-rtc@vger.kernel.org
Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nexus-software-ie.20150623.gappssmtp.com; s=20150623; h=subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=owfd/YVR/EzDiMXyNdt2qlnnnm75UX6BTgVMALTYcGc=; b=jKae8n48cRp4UDuCUX/DPv9YXEEwtkhcYFDJQeAFf7+zUL5/W1N6gS19IzVVIDDF3K GZWKHf96rTHVF5TZ1NZ/lpxoLZaOE599fET1erdywYTlqnSlsXMLf5TDXywGtpAUIrSl w2pJLmtVGAQ+XgFMjXS14c7+Qdqz/7isM9slzVuDO1iHMxYMnzwd4X3FSUYz/xl54pqE VqxYB3b1h0jb+tYL+IGuPXxQxp4vrLvpgHsNUvDr4h7YsSWLjZZv4y62T7hpf+t0a2nJ rSPyiDAHh6pBBN+DFuyLXJqZXnOK0RwDaph9dO7F/Xq/eHhrsrR4R2GgZmIDmU19ACtq 5raA==
In-reply-to: <9f4bef5a-8a71-6f30-5cfb-5e8fe133e3d3@kapsi.fi>
List-archive: <http://www.linux-mips.org/archives/linux-mips/>
List-help: <mailto:ecartis@linux-mips.org?Subject=help>
List-id: linux-mips <linux-mips.eddie.linux-mips.org>
List-owner: <mailto:ralf@linux-mips.org>
List-post: <mailto:linux-mips@linux-mips.org>
List-software: Ecartis version 1.0.0
List-subscribe: <mailto:ecartis@linux-mips.org?subject=subscribe%20linux-mips>
List-unsubscribe: <mailto:ecartis@linux-mips.org?subject=unsubscribe%20linux-mips>
Original-recipient: rfc822;linux-mips@linux-mips.org
References: <1514596392-22270-1-git-send-email-pure.logic@nexus-software.ie> <1514596392-22270-2-git-send-email-pure.logic@nexus-software.ie> <9f4bef5a-8a71-6f30-5cfb-5e8fe133e3d3@kapsi.fi>
Sender: linux-mips-bounce@linux-mips.org
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.1.1
On 30/12/17 16:36, Mikko Perttunen wrote:
FWIW, we had this problem some years ago with the Tegra CPU clock - then it was determined that a simpler solution was to have the determine_rate callback support unsigned long rates - so clock drivers that need to return rates higher than 2^31 can instead implement the determine_rate callback. That is what's currently implemented.

Mikko

Granted we could work around it but, having both zero and less than zero indicate error means you can't support larger than LONG_MAX which is I think worth fixing.

---
bod

<Prev in Thread] Current Thread [Next in Thread>