From patchwork Tue Dec 10 03:24:41 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Paul Walmsley X-Patchwork-Id: 3314121 Return-Path: X-Original-To: patchwork-linux-omap@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 AEEF0C0D4A for ; Tue, 10 Dec 2013 03:24:55 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id C41F720268 for ; Tue, 10 Dec 2013 03:24:54 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 17967201B6 for ; Tue, 10 Dec 2013 03:24:53 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751631Ab3LJDYn (ORCPT ); Mon, 9 Dec 2013 22:24:43 -0500 Received: from utopia.booyaka.com ([74.50.51.50]:39301 "EHLO utopia.booyaka.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751382Ab3LJDYm (ORCPT ); Mon, 9 Dec 2013 22:24:42 -0500 Received: (qmail 29870 invoked by uid 1019); 10 Dec 2013 03:24:41 -0000 Date: Tue, 10 Dec 2013 03:24:41 +0000 (UTC) From: Paul Walmsley To: linux-omap@vger.kernel.org cc: linux-arm-kernel@lists.infradead.org Subject: [PATCH] ARM: omap1: 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 Sender: linux-omap-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-omap@vger.kernel.org X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=ham 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 upon an error, rather than returning a negative error code. This is because clk_round_rate() is being changed to return an unsigned return value rather than a signed value, since some clock sources can generate rates higher than (2^31)-1 Hz. Signed-off-by: Paul Walmsley --- Applies on v3.13-rc3. See also: http://marc.info/?l=linux-arm-kernel&m=138542591313620&w=2 arch/arm/mach-omap1/clock.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/arch/arm/mach-omap1/clock.c b/arch/arm/mach-omap1/clock.c index 4f5fd4a084c0..ad9b620a4f30 100644 --- a/arch/arm/mach-omap1/clock.c +++ b/arch/arm/mach-omap1/clock.c @@ -250,7 +250,7 @@ long omap1_clk_round_rate_ckctl_arm(struct clk *clk, unsigned long rate) { int dsor_exp = calc_dsor_exp(clk, rate); if (dsor_exp < 0) - return dsor_exp; + return 0; if (dsor_exp > 3) dsor_exp = 3; return clk->parent->rate / (1 << dsor_exp); @@ -285,7 +285,7 @@ long omap1_round_to_table_rate(struct clk *clk, unsigned long rate) ref_rate = ck_ref_p->rate; - highest_rate = -EINVAL; + highest_rate = 0; for (ptr = omap1_rate_table; ptr->rate; ptr++) { if (!(ptr->flags & cpu_mask))