From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752054AbbGMXCX (ORCPT ); Mon, 13 Jul 2015 19:02:23 -0400 Received: from smtp.codeaurora.org ([198.145.29.96]:40905 "EHLO smtp.codeaurora.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751093AbbGMXCU (ORCPT ); Mon, 13 Jul 2015 19:02:20 -0400 Date: Mon, 13 Jul 2015 16:02:18 -0700 From: Stephen Boyd To: Boris Brezillon Cc: Mike Turquette , linux-clk@vger.kernel.org, Jonathan Corbet , Tony Lindgren , Ralf Baechle , Emilio =?iso-8859-1?Q?L=F3pez?= , Maxime Ripard , Tero Kristo , Peter De Schrijver , Prashant Gaikwad , Stephen Warren , Thierry Reding , Alexandre Courbot , linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-omap@vger.kernel.org, linux-mips@linux-mips.org, linux-tegra@vger.kernel.org Subject: Re: [PATCH v5] clk: change clk_ops' ->determine_rate() prototype Message-ID: <20150713230217.GI30412@codeaurora.org> References: <1436294888-25752-1-git-send-email-boris.brezillon@free-electrons.com> <20150708005748.GG30412@codeaurora.org> <20150708110005.704c49ff@bbrezillon> <559D66EE.4060707@codeaurora.org> <20150709223938.19450e75@bbrezillon> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20150709223938.19450e75@bbrezillon> User-Agent: Mutt/1.5.21 (2010-09-15) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 07/09, Boris Brezillon wrote: > Hi Stephen, > > On Wed, 08 Jul 2015 11:07:42 -0700 > Stephen Boyd wrote: > > > On 07/08/2015 02:00 AM, Boris Brezillon wrote: > > > Hi Stephen, > > > > > > On Tue, 7 Jul 2015 17:57:48 -0700 > > > Stephen Boyd wrote: > > > > > >> On 07/07, Boris Brezillon wrote: > > >>> > > >>> } else { > > >>> pr_err("clk: clk_composite_determine_rate function called, but no mux or rate callback set!\n"); > > >>> + req->rate = 0; > > >>> return 0; > > >> Shouldn't this return an error now? And then assigning req->rate > > >> wouldn't be necessary. Sorry I must have missed this last round. > > >> > > > Actually I wanted to keep the existing behavior: return a 0 rate (not > > > an error) when there is no mux or rate ops. > > > > > > That's something we can change afterwards, but it might reveals > > > new bugs if some users are checking for a 0 rate to detect errors. > > > > > > > Ok. Care to send the patch now to do that while we're thinking about it? > > We can test it out for a month or two. > > > > Here is a patch modifying a few drivers to return errors instead of a 0 > rate. Feel free to squash it in the previous one if you think this is > better. > > Best Regards, > > Boris > > --- >8 --- > > From dca9c28301042cf19dad4b1e4555cdb7c1063745 Mon Sep 17 00:00:00 2001 > From: Boris Brezillon > Date: Thu, 9 Jul 2015 12:20:21 +0200 > Subject: [PATCH] clk: fix some determine_rate implementations > > Some determine_rate implementations are not returning an error when then > failed to adapt the rate according to the rate request. > Fix them so that they return an error instead of silently returning 0. > > Signed-off-by: Boris Brezillon The linewrap is seriously messed up here. Please fix your mailer next time. I had to hand edit the patch to get it to apply. I've applied this in top of the original patch as a different commit, in case we need to revert it later. -- Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum, a Linux Foundation Collaborative Project