Message ID | 1514596392-22270-5-git-send-email-pure.logic@nexus-software.ie (mailing list archive) |
---|---|
State | New, archived |
Headers | show
Return-Path: <linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org> Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 7E4636037D for <patchwork-linux-arm@patchwork.kernel.org>; Sat, 30 Dec 2017 01:19:03 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 706062B551 for <patchwork-linux-arm@patchwork.kernel.org>; Sat, 30 Dec 2017 01:19:03 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 657862B55D; Sat, 30 Dec 2017 01:19:03 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-4.2 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [65.50.211.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 6840E2B55A for <patchwork-linux-arm@patchwork.kernel.org>; Sat, 30 Dec 2017 01:19:02 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:MIME-Version:Cc:List-Subscribe: List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id:References: In-Reply-To:Message-Id:Date:Subject:To:From:Reply-To:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Owner; bh=fbEHFKUqOT730Z0Y3TgSpuj6pE62XR8by2Es8lDoeB8=; b=gN+ugrgWtbFhj2feu98dmbqLTP Ja3fjdcgKVEw1F8pf3+jlM5lBAnCr3wClTmGA8QvfY+GPpOls7c5RN6dnTsa6P1D1LZ5v1HWESSXk WgpGIeV/Mxh/W771+2UTPSAFlId0u+LgYutvt5fZmXzxhpUlrjgr11gL7Gr+ihBRvZa6JOW9IJsEX Wln0Q+CSePhNvdyOUvMf1DesdH8Zvfz5dunqkwhAD3Gy9NST5IPTW67Z6aLbwaBdZlZRxewdW9g8V BS7mwXi3WHw9QhbbkP0AsMBcAcjMXzsJtU0n4QTK5f9zlgIiSVinJXixXBQWIpW9tgLZYEvBmvneO qaESOImQ==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.89 #1 (Red Hat Linux)) id 1eV5nf-0006Ip-7R; Sat, 30 Dec 2017 01:18:59 +0000 Received: from mail-wm0-x241.google.com ([2a00:1450:400c:c09::241]) by bombadil.infradead.org with esmtps (Exim 4.89 #1 (Red Hat Linux)) id 1eV5iK-0001Jk-QZ for linux-arm-kernel@lists.infradead.org; Sat, 30 Dec 2017 01:14:21 +0000 Received: by mail-wm0-x241.google.com with SMTP id b141so3833687wme.1 for <linux-arm-kernel@lists.infradead.org>; Fri, 29 Dec 2017 17:13:18 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nexus-software-ie.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=D2Jb+Ht6+M8pSg9fZx2c8bkCrTeLjA758N+NDr22qY4=; b=tgl5HJ+2NCvcmcAMpo8CiiO+sRPB5cnd3WsEM8s7bek/VgJFe/JdUvXuKsw3CBe3CC o2OFM+toQZVvmeuGaJKlrJSZfnQP1r8XKkuHwXELZsUSiYqTAVI/jjyHcHZI9wfmr8o0 sPLC89AZ454FSIcui6eRfJO+t9U1H6QG/USRg0q5RpZaa9cnC24djvFYHljHo7bfnAE3 vvr9moxbS7qQudDwFjdOUi2E0EFdLCkoOEP5g0HmKeAhBQT0gv2C1RHDdv6HMsYonVaj VZLEvNqCcLwi6tkQs7aYhbbTmhmMFsSm8Y1aKlAL+DHCNqkbqShs1mPzilcZVjqj2lmG iRAQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=D2Jb+Ht6+M8pSg9fZx2c8bkCrTeLjA758N+NDr22qY4=; b=fjlyWUrzG3ayhrr5/RQ7/fy610U3/BtAAefAphs4bTO1nxeQH5B2Rc2Rttu+HADrgx 3Olxs/lX8TQSU3LLFy8hnU9PYLWlcTdYFVGsJCJGbBKSsla62hYMJuOh9QKISx7jynoa fIgjIQ17tSk8r3wswqO/XLH58ds8F2wCddprgtyV4AMht7WhecGFkEG7odW1S0Iw87sW OhPF586QeBapIsCh8hHxtgy3JR5rQOpCIjUiytZLjua6FGhwpwdyZtUOx8uRxHQmDgV1 RzWYEuL6NJtm1mT1ca3OG5RYqCXQXsnRSE+1vJi7YbX51eG83OlXp8/iekUaTt2Yq6rF wl+Q== X-Gm-Message-State: AKGB3mIC0JdmiPezLxEDh3O1NtwB1fR3G7SO/qExcErIuh/iUdgufmYy 9m70J3aB4McbS9ymCp32iOfM8A== X-Google-Smtp-Source: ACJfBotDE2wu2pCnSX7nZdnoxHFk8PCR/Tl+VsQNMLSA5xjIkE3YXvCQMcD/idKXUCaGWq84CgwaQg== X-Received: by 10.80.194.194 with SMTP id u2mr46653767edf.260.1514596396992; Fri, 29 Dec 2017 17:13:16 -0800 (PST) Received: from localhost.localdomain ([109.255.42.2]) by smtp.gmail.com with ESMTPSA id h4sm29818268edb.16.2017.12.29.17.13.16 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 29 Dec 2017 17:13:16 -0800 (PST) From: Bryan O'Donoghue <pure.logic@nexus-software.ie> To: mturquette@baylibre.com, sboyd@codeaurora.org, linux-kernel@vger.kernel.org, linux-clk@vger.kernel.org Subject: [PATCH 04/33] clk: omap2: change omap2_round_to_table_rate return logic Date: Sat, 30 Dec 2017 01:12:43 +0000 Message-Id: <1514596392-22270-5-git-send-email-pure.logic@nexus-software.ie> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1514596392-22270-1-git-send-email-pure.logic@nexus-software.ie> References: <1514596392-22270-1-git-send-email-pure.logic@nexus-software.ie> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20171229_171328_987291_F699B530 X-CRM114-Status: GOOD ( 12.09 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: <linux-arm-kernel.lists.infradead.org> List-Unsubscribe: <http://lists.infradead.org/mailman/options/linux-arm-kernel>, <mailto:linux-arm-kernel-request@lists.infradead.org?subject=unsubscribe> List-Archive: <http://lists.infradead.org/pipermail/linux-arm-kernel/> List-Post: <mailto:linux-arm-kernel@lists.infradead.org> List-Help: <mailto:linux-arm-kernel-request@lists.infradead.org?subject=help> List-Subscribe: <http://lists.infradead.org/mailman/listinfo/linux-arm-kernel>, <mailto:linux-arm-kernel-request@lists.infradead.org?subject=subscribe> Cc: Tony Lindgren <tony@atomide.com>, pure.logic@nexus-software.ie, linux-omap@vger.kernel.org, Russell King <linux@armlinux.org.uk>, linux-arm-kernel@lists.infradead.org MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" <linux-arm-kernel-bounces@lists.infradead.org> Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP |
diff --git a/arch/arm/mach-omap2/clkt2xxx_virt_prcm_set.c b/arch/arm/mach-omap2/clkt2xxx_virt_prcm_set.c index e024600..ce3a33f 100644 --- a/arch/arm/mach-omap2/clkt2xxx_virt_prcm_set.c +++ b/arch/arm/mach-omap2/clkt2xxx_virt_prcm_set.c @@ -75,9 +75,9 @@ unsigned long omap2_round_to_table_rate(struct clk_hw *hw, unsigned long rate, unsigned long *parent_rate) { const struct prcm_config *ptr; - long highest_rate; + unsigned long highest_rate; - highest_rate = -EINVAL; + highest_rate = 0; for (ptr = rate_table; ptr->mpu_speed; ptr++) { if (!(ptr->flags & cpu_mask))
This patch updates the round_rate() logic here to return zero instead of a negative number on error. In conjunction with higher-level changes associated with acting on the return value of clk_ops->round_rate() it is then possible to have clk_ops->round_rate() return values from 1 Hz to ULONG_MAX Hz instead of the current limitation of 1 Hz to LONG_MAX Hz. Signed-off-by: Bryan O'Donoghue <pure.logic@nexus-software.ie> Cc: Tony Lindgren <tony@atomide.com> Cc: Russell King <linux@armlinux.org.uk> Cc: Michael Turquette <mturquette@baylibre.com> Cc: Stephen Boyd <sboyd@codeaurora.org> Cc: linux-clk@vger.kernel.org Cc: linux-omap@vger.kernel.org Cc: linux-arm-kernel@lists.infradead.org Cc: linux-kernel@vger.kernel.org --- arch/arm/mach-omap2/clkt2xxx_virt_prcm_set.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)