Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752144AbcKIHbo (ORCPT ); Wed, 9 Nov 2016 02:31:44 -0500 Received: from smtp10.smtpout.orange.fr ([80.12.242.132]:26407 "EHLO smtp.smtpout.orange.fr" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751520AbcKIHbm (ORCPT ); Wed, 9 Nov 2016 02:31:42 -0500 X-ME-Helo: belgarion X-ME-Auth: amFyem1pay5yb2JlcnRAb3JhbmdlLmZy X-ME-Date: Wed, 09 Nov 2016 08:31:39 +0100 X-ME-IP: 109.222.248.68 From: Robert Jarzmik To: Arnd Bergmann Cc: Stephen Boyd , Michael Turquette , linux-clk@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH 2/2] clk: pxa: fix pxa2xx_determine_rate return References: <20161108144950.3472058-1-arnd@arndb.de> <20161108144950.3472058-2-arnd@arndb.de> <87k2cdyhnu.fsf@belgarion.home> <2012366.hMim84DLbv@wuerfel> X-URL: http://belgarath.falguerolles.org/ Date: Wed, 09 Nov 2016 08:31:37 +0100 In-Reply-To: <2012366.hMim84DLbv@wuerfel> (Arnd Bergmann's message of "Tue, 08 Nov 2016 23:22:40 +0100") Message-ID: <871sylw1ly.fsf@belgarion.home> User-Agent: Gnus/5.130008 (Ma Gnus v0.8) Emacs/24.4 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 881 Lines: 23 Arnd Bergmann writes: > On Tuesday, November 8, 2016 7:01:57 PM CET Robert Jarzmik wrote: >> Arnd Bergmann writes: >> If a non-exact match is found, either by closest_below or closest_above, rate is >> set (rate = freqs[closest_xxx].cpll). And a couple of lines later after the >> if/else, req->rate = rate is set as well, so I don't think this part of the >> commit message is accurate. > > It is only set if rate is zero, and that normally is not the case here: > > if (!rate) > req->rate = rate; Ah ok, that's where the bug was lurking, if should have been "if (rate)". But anyway, after comparing the end result of your code and mine, I find yours more maintainable, especially the replacement of 'ret = 0'. So let's proceed, thanks for finding this one out. Acked-by: Robert Jarzmik -- Robert