From patchwork Mon Nov 25 23:55:33 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Paul Walmsley X-Patchwork-Id: 3235241 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 B816EC045B for ; Mon, 25 Nov 2013 23:58:01 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id F1F312013A for ; Mon, 25 Nov 2013 23:58:00 +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 145D920119 for ; Mon, 25 Nov 2013 23:58:00 +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 1Vl62C-0006Pg-Si; Mon, 25 Nov 2013 23:57:45 +0000 Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1Vl62A-0003RX-Jf; Mon, 25 Nov 2013 23:57:42 +0000 Received: from hqemgate15.nvidia.com ([216.228.121.64]) by merlin.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1Vl628-0003Qj-OZ for linux-arm-kernel@lists.infradead.org; Mon, 25 Nov 2013 23:57:41 +0000 Received: from hqnvupgp07.nvidia.com (Not Verified[216.228.121.13]) by hqemgate15.nvidia.com id ; Mon, 25 Nov 2013 15:56:11 -0800 Received: from hqemhub01.nvidia.com ([172.20.12.94]) by hqnvupgp07.nvidia.com (PGP Universal service); Mon, 25 Nov 2013 15:53:58 -0800 X-PGP-Universal: processed; by hqnvupgp07.nvidia.com on Mon, 25 Nov 2013 15:53:58 -0800 Received: from hqnvemgw01.nvidia.com (172.20.150.20) by hqemhub01.nvidia.com (172.20.150.30) with Microsoft SMTP Server id 8.3.327.1; Mon, 25 Nov 2013 15:55:35 -0800 Received: from sc-daphne.nvidia.com (Not Verified[172.20.232.60]) by hqnvemgw01.nvidia.com with MailMarshal (v7,1,2,5326) id ; Mon, 25 Nov 2013 15:55:35 -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 rAPNtXdt007908; Mon, 25 Nov 2013 15:55:33 -0800 (PST) Date: Mon, 25 Nov 2013 15:55:33 -0800 From: Paul Walmsley X-X-Sender: pwalmsley@tamien To: , Subject: clk: clk_round_rate() should return 0, not negative numbers, upon error 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-20131125_185740_871195_E6924B79 X-CRM114-Status: GOOD ( 11.74 ) X-Spam-Score: -1.9 (-) Cc: Russell King , Mike Turquette 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 Update the documentation for clk_round_rate() to state that it should return 0 rather than a negative error code when it encounters an error. This describes how the common clock framework currently works; howeever, some clock code does not yet align to this. This change is to prepare for returning unsigned values from clk_round_rate(). Signed-off-by: Paul Walmsley Cc: Mike Turquette Cc: Russell King --- Applies on v3.13-rc1. include/linux/clk.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/linux/clk.h b/include/linux/clk.h index 9a6d04524b1a..ffbbb7b2de43 100644 --- a/include/linux/clk.h +++ b/include/linux/clk.h @@ -228,7 +228,7 @@ void devm_clk_put(struct device *dev, struct clk *clk); * @clk: clock source * @rate: desired clock rate in Hz * - * Returns rounded clock rate in Hz, or negative errno. + * Returns rounded clock rate in Hz, or 0 upon error. */ long clk_round_rate(struct clk *clk, unsigned long rate);