Received: by 10.223.164.202 with SMTP id h10csp351724wrb; Mon, 13 Nov 2017 07:29:04 -0800 (PST) X-Google-Smtp-Source: AGs4zMZUFWjtzT5US7baPMY/mjZ4wUUPHjxTYRwXlydI9ybSi9Hquj+/npSTtCF1ANMizQT34XID X-Received: by 10.98.208.67 with SMTP id p64mr1602492pfg.111.1510586944060; Mon, 13 Nov 2017 07:29:04 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1510586944; cv=none; d=google.com; s=arc-20160816; b=RROK/9EB42rapO3adB5TM+gsRz05bKK2As4OiOLO5IJcwKy3Oy8wMxUcAr/AoJAGz3 cEPMCEPnIa13OTs/X/6BD/ecPs3CgNyRs8cuP/gjzt2k5IeOe79mSxcT6H4+Tqf9jaAk NSrMvQm3Zh4+E8vbXcxs+6MpcU7Jmq/j2MjjzFSwMVHaazHq3PpbiQ89l4vRougT++5v 2nCUJYdd57iiiOQGVqJ6paPWeNvBVAgV4ob6l+S14rF6eR7T9vf6bLQbe6k3K5f47Sm7 WPUOO9P5rl5NTP0Z45O8XLqrMrlwsXq2K2/ugZyWYDwH6h4xZ3gi5/AJbPqqVWpUHrjV t22Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:cc:to:from :arc-authentication-results; bh=Iy0Yi7tUBp0PHAXgsqk1DRSrxgYXP/xIJCN3ca6werU=; b=v47IfCbSpNw/b4V/90ErvTh7jciGN2qFc+gSOiphj3cHpxqH2trS8FIQhidMJyqWpd 70JnWsjYNi5hLqR6QEefhecKT6a8/kjB/h+B7QjW7oVXP8ztUFaXC/RqHGNW3dYCT6AU o1hz7ILcarOkE0qI3J9/CTwCS8o/dyefpYMwLVHHFhKiI01Zxkqyh1CUho9APlLxhHV9 9kdPwwJ+yGF7YoXUgwd6prRkZU33jwNucAxrkxCK/iKOyCen7FYYtlJQVyDTDt8/IisP iP22moGOapgWXycb1mVUmZiIf+Ckcga/UmlLNiMcZ1gZu/63ODAO+xvMbypnWAPd6O0y Vbkw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id x4si14044606pln.635.2017.11.13.07.28.51; Mon, 13 Nov 2017 07:29:04 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753273AbdKMP2D (ORCPT + 88 others); Mon, 13 Nov 2017 10:28:03 -0500 Received: from foss.arm.com ([217.140.101.70]:47818 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753121AbdKMP2C (ORCPT ); Mon, 13 Nov 2017 10:28:02 -0500 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.72.51.249]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id CE1C31435; Mon, 13 Nov 2017 07:28:01 -0800 (PST) Received: from e107564-lin.cambridge.arm.com (e107564-lin.cambridge.arm.com [10.2.130.44]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 931663F318; Mon, 13 Nov 2017 07:28:00 -0800 (PST) From: Brian Starkey To: linux-kernel@vger.kernel.org, linux-clk@vger.kernel.org Cc: sboyd@codeaurora.org, mturquette@baylibre.com, sudeep.holla@arm.com Subject: [PATCH] clk: versatile: Remove WARNs in ->round_rate() Date: Mon, 13 Nov 2017 15:27:51 +0000 Message-Id: <1510586871-27478-1-git-send-email-brian.starkey@arm.com> X-Mailer: git-send-email 1.9.1 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org clk_round_rate() is intended to be used to round a given clock rate to the closest one achievable by the actual clock. This implies that the input to clk_round_rate() is expected to be unachievable - and such cases shouldn't be treated as exceptional. To reflect this, remove the WARN_ONs which trigger when an unachievable clock rate is passed to vexpress_osc_round_rate(). Reported-by: Vladimir Murzin Signed-off-by: Brian Starkey Acked-by: Sudeep Holla --- drivers/clk/versatile/clk-vexpress-osc.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/clk/versatile/clk-vexpress-osc.c b/drivers/clk/versatile/clk-vexpress-osc.c index e7a868b83fe5..59703d569d49 100644 --- a/drivers/clk/versatile/clk-vexpress-osc.c +++ b/drivers/clk/versatile/clk-vexpress-osc.c @@ -44,10 +44,10 @@ static long vexpress_osc_round_rate(struct clk_hw *hw, unsigned long rate, { struct vexpress_osc *osc = to_vexpress_osc(hw); - if (WARN_ON(osc->rate_min && rate < osc->rate_min)) + if (osc->rate_min && rate < osc->rate_min) rate = osc->rate_min; - if (WARN_ON(osc->rate_max && rate > osc->rate_max)) + if (osc->rate_max && rate > osc->rate_max) rate = osc->rate_max; return rate; -- 1.9.1 From 1583957531874268311@xxx Mon Nov 13 13:26:56 +0000 2017 X-GM-THRID: 1583957531874268311 X-Gmail-Labels: Inbox,Category Promotions,HistoricalUnread