From patchwork Mon Jul 22 07:43:45 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Vinod Koul X-Patchwork-Id: 169349 Delivered-To: patch@linaro.org Received: by 2002:a92:4782:0:0:0:0:0 with SMTP id e2csp7186242ilk; Mon, 22 Jul 2019 00:45:26 -0700 (PDT) X-Google-Smtp-Source: APXvYqyWNEV6rdsE3AnDx1nznl4mvXYLxCd0VpT+syJH3gf0yrDk+bEmgjyIsYn1b9Q3cD4unvMv X-Received: by 2002:a17:902:a60d:: with SMTP id u13mr74552153plq.144.1563781526812; Mon, 22 Jul 2019 00:45:26 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1563781526; cv=none; d=google.com; s=arc-20160816; b=Dxq1+Kn2dnGGnbZJQmO6k4jKRkOrt6X5lrnK3GmjyNzsuFz1yT98/Mwj8ECAMFhGI4 Vs6Qjy6i3Mm0THoL32rPUrFG4amwD1q4ZIIkll2yK7K4iXRIUuwTe09N3VNws2zBB1bx dBbg9ZIR/C3Gd5St6L4RbTrfR8SjgrY1wk7/uOJPR1CV7LKxt+x4NBtKnaNXgZgeBjhw n1RaGyFEit8FGbmQ6rAYvB1+WSrEYJvodb3Y2sCxmftQOjLdmWiHM8HU/QELgXC7pR7W tVPc1lBoYdrbJAJdv6UOvHIB2Q1biZUmG3wLdvhr3grsb5zd7gIQ7Cc5hhtR8nbDj3uq mnYg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=Fld0HXNvhQbAPciqS+YD8zkP9VbvpEQJZYAt4KPLkTA=; b=NHqPU/D1Q4kbeOAoG2OeAcBdJlGdxbiVof6lRc90WD/2FjhF6kM5b5ImEY3CLTuxrM /B+J7jnay5vOC6u2mpbF2NTcKFab6DlNE4kr4mIwuDoYeMVVaV3I6VJyITccCfKd4RTd U66oge3x6aY2d3KVfUQUzkLNSS9tG71qMTyIplvv48mrICtL9J0SVyEOW8mLj6G9e60z KpeUTjx9k3B2JO0ztpX9qzDawlBku62fa33NE2fZtuw9Yl55gP5Qi7RwuBB5tN/jZlDE 83f6/rXAkKtKEnbbTc6yslMQZYN8wGQU+p38vVG5COwodpmxahjPYT09sm2axa8XlaDH OHvQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=wtPz2Kmq; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id z3si7232053pju.48.2019.07.22.00.45.26; Mon, 22 Jul 2019 00:45:26 -0700 (PDT) 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; dkim=pass header.i=@kernel.org header.s=default header.b=wtPz2Kmq; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728214AbfGVHpZ (ORCPT + 29 others); Mon, 22 Jul 2019 03:45:25 -0400 Received: from mail.kernel.org ([198.145.29.99]:59890 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725773AbfGVHpX (ORCPT ); Mon, 22 Jul 2019 03:45:23 -0400 Received: from localhost.localdomain (unknown [223.226.98.106]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 3595B206DD; Mon, 22 Jul 2019 07:45:18 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1563781522; bh=ThDUQGLkiZFV8s3UVa/+fp6cv15nSVozJaEPWJMXkoY=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=wtPz2KmqJvU/00CEKi/a4YS9fiaWcViqBxFcIpD0N7q6aoDzdpijCr+x7KsVoNqVE 5GXeYWXDAEnbGXoiF+9Ri9TuM3hELC+HQRFBnTPl0jxEHWvU+s9mLomIexsDvOkWhy suRPuOdIFZTiNwoIxOPH2wh7F4o2L6u0d5s9UwpQ= From: Vinod Koul To: Stephen Boyd Cc: linux-arm-msm@vger.kernel.org, Bjorn Andersson , Vinod Koul , Deepak Katragadda , Andy Gross , David Brown , Michael Turquette , linux-clk@vger.kernel.org, Taniya Das , linux-kernel@vger.kernel.org Subject: [PATCH v4 2/5] clk: qcom: clk-alpha-pll: Remove post_div_table checks Date: Mon, 22 Jul 2019 13:13:45 +0530 Message-Id: <20190722074348.29582-3-vkoul@kernel.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190722074348.29582-1-vkoul@kernel.org> References: <20190722074348.29582-1-vkoul@kernel.org> MIME-Version: 1.0 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org We want users to code properly and fix the post_div_table missing and not rely on core to check. So remove the post_div_table check. Signed-off-by: Vinod Koul Reviewed-by: Bjorn Andersson --- drivers/clk/qcom/clk-alpha-pll.c | 15 --------------- 1 file changed, 15 deletions(-) -- 2.20.1 diff --git a/drivers/clk/qcom/clk-alpha-pll.c b/drivers/clk/qcom/clk-alpha-pll.c index b48707693ffd..2c6773188761 100644 --- a/drivers/clk/qcom/clk-alpha-pll.c +++ b/drivers/clk/qcom/clk-alpha-pll.c @@ -1036,11 +1036,6 @@ static unsigned long clk_alpha_pll_postdiv_fabia_recalc_rate(struct clk_hw *hw, u32 i, div = 1, val; int ret; - if (!pll->post_div_table) { - pr_err("Missing the post_div_table for the PLL\n"); - return -EINVAL; - } - ret = regmap_read(pll->clkr.regmap, PLL_USER_CTL(pll), &val); if (ret) return ret; @@ -1063,11 +1058,6 @@ static long clk_alpha_pll_postdiv_fabia_round_rate(struct clk_hw *hw, { struct clk_alpha_pll_postdiv *pll = to_clk_alpha_pll_postdiv(hw); - if (!pll->post_div_table) { - pr_err("Missing the post_div_table for the PLL\n"); - return -EINVAL; - } - return divider_round_rate(hw, rate, prate, pll->post_div_table, pll->width, CLK_DIVIDER_ROUND_CLOSEST); } @@ -1089,11 +1079,6 @@ static int clk_alpha_pll_postdiv_fabia_set_rate(struct clk_hw *hw, if (val & PLL_VOTE_FSM_ENA) return 0; - if (!pll->post_div_table) { - pr_err("Missing the post_div_table for the PLL\n"); - return -EINVAL; - } - div = DIV_ROUND_UP_ULL(parent_rate, rate); for (i = 0; i < pll->num_post_div; i++) { if (pll->post_div_table[i].div == div) {