From patchwork Wed Nov 27 00:56:27 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Paul Walmsley X-Patchwork-Id: 3242791 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 2C8DBC045B for ; Wed, 27 Nov 2013 00:57:04 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 6B8D32017A for ; Wed, 27 Nov 2013 00:57:03 +0000 (UTC) Received: from casper.infradead.org (casper.infradead.org [85.118.1.10]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id E4E442022A for ; Wed, 27 Nov 2013 00:57:01 +0000 (UTC) Received: from merlin.infradead.org ([2001:4978:20e::2]) by casper.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1VlTR3-0000YJ-5Z; Wed, 27 Nov 2013 00:56:57 +0000 Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1VlTR0-0003Tx-IY; Wed, 27 Nov 2013 00:56:54 +0000 Received: from hqemgate14.nvidia.com ([216.228.121.143]) by merlin.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1VlTQw-0003Sa-5V for linux-arm-kernel@lists.infradead.org; Wed, 27 Nov 2013 00:56:51 +0000 Received: from hqnvupgp08.nvidia.com (Not Verified[216.228.121.13]) by hqemgate14.nvidia.com id ; Tue, 26 Nov 2013 16:56:09 -0800 Received: from hqemhub02.nvidia.com ([172.20.12.94]) by hqnvupgp08.nvidia.com (PGP Universal service); Tue, 26 Nov 2013 16:50:10 -0800 X-PGP-Universal: processed; by hqnvupgp08.nvidia.com on Tue, 26 Nov 2013 16:50:10 -0800 Received: from hqnvemgw01.nvidia.com (172.20.150.20) by hqemhub02.nvidia.com (172.20.150.31) with Microsoft SMTP Server id 8.3.327.1; Tue, 26 Nov 2013 16:56:28 -0800 Received: from sc-daphne.nvidia.com (Not Verified[172.20.232.60]) by hqnvemgw01.nvidia.com with MailMarshal (v7,1,2,5326) id ; Tue, 26 Nov 2013 16:56:28 -0800 Received: from tamien.nvidia.com (tamien.nvidia.com [172.17.186.57]) by sc-daphne.nvidia.com (8.13.8+Sun/8.8.8) with ESMTP id rAR0uRxL001055; Tue, 26 Nov 2013 16:56:27 -0800 (PST) Date: Tue, 26 Nov 2013 16:56:27 -0800 From: Paul Walmsley X-X-Sender: pwalmsley@tamien To: Philip Avinash , Sekhar Nori , Kevin Hilman Subject: [PATCH] ARM: davinci: clock: return 0 upon error from clk_round_rate() Message-ID: User-Agent: Alpine 2.02 (DEB 1266 2009-07-14) MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20131126_195650_280774_5705530F X-CRM114-Status: GOOD ( 10.95 ) X-Spam-Score: -1.9 (-) Cc: davinci-linux-open-source@linux.davincidsp.com, linux-arm-kernel@lists.infradead.org X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_MED, 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 clk_round_rate() should return 0 now upon an error, rather than returning a negative error code. This is because clk_round_rate() is being changed to return an unsigned return type rather than a signed type, since some clock sources can generate rates higher than (2^31)-1 Hz. Signed-off-by: Paul Walmsley Cc: Philip Avinash Cc: Sekhar Nori Cc: Kevin Hilman --- Applies on v3.13-rc1. See also: http://marc.info/?l=linux-arm-kernel&m=138542591313620&w=2 arch/arm/mach-davinci/clock.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/arm/mach-davinci/clock.c b/arch/arm/mach-davinci/clock.c index dc9a470ff9c5..985e5fd00fb2 100644 --- a/arch/arm/mach-davinci/clock.c +++ b/arch/arm/mach-davinci/clock.c @@ -133,7 +133,7 @@ EXPORT_SYMBOL(clk_get_rate); long clk_round_rate(struct clk *clk, unsigned long rate) { if (clk == NULL || IS_ERR(clk)) - return -EINVAL; + return 0; if (clk->round_rate) return clk->round_rate(clk, rate);