From patchwork Tue Jun 25 06:31:38 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Vinod Koul X-Patchwork-Id: 167680 Delivered-To: patch@linaro.org Received: by 2002:a92:4782:0:0:0:0:0 with SMTP id e2csp5155062ilk; Mon, 24 Jun 2019 23:35:08 -0700 (PDT) X-Google-Smtp-Source: APXvYqwuKTuoQADuhHVU0wpFCv5PED6X7wGB52wUrekEIOM1TWPeUIAlhtNGyQnSv0WeUyysYG5q X-Received: by 2002:a63:18c:: with SMTP id 134mr31824128pgb.432.1561444508426; Mon, 24 Jun 2019 23:35:08 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1561444508; cv=none; d=google.com; s=arc-20160816; b=PFREfUqlUO8mcycv1xggxnBCiqFaFwkZewYc2zZeYEJ39ciKf4mpEpJ/wHwZ6ksAwQ nYNbjykItbhzt1I814m6tcE3fW/o0s8qLWXxwHq5jvuzZixM74SaYY+86MW0t+NSgzuk yCUgJFeqxgKEkJtvRRJ1xCvCp7yU0/7w2KfgWXCDQTUC32dxz79cPPe2F8vr8AInCqe0 2vPeAYMOGTTUXBS+BJXkvLVbTF2YGK2kFu7hr14scbKd4uPJoVBMa36dGSXBN/R4YVZb HifpK1tynXq4/StNCS7G1N/d/vxfVHmjRS2yVn8qPxQy9UI/oHsQN9JHYFDnMSCZDrg3 jSEw== 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=SEEFe1d5EsxVmlQTQkSKSKghpEwOUj7e0OdFM/sBufQ=; b=VCoLwWDpR7v8uK/WZ9Dz5p3SEt3o8jpKwO8kgwv7cYe3KcuwbHsazT6iPPZVbOKdpB kdoLyZ2mAtjTaaAKJZ8evz6n0mYcvK3tHVYfdbs6IR4PWegXnQ2WSqRDo/Cf9wj2u8qH BrvP/MpAWvg3QA1ybT9VSi9PVd+FhLS94z64WOgKDhceULWPngDp4T1aUEZnlkzLMdqV guCDVHdFtENuJEj8sJcnjbv90mVSkNm15PmxcvJE0AmBc16p5ZZqy6KTe24TkumV+0Xc k8wAuB4+Jb01ZbwbJvWlCbYVH8yypBQ67YBjKs2hCS82zaMIpROOzb8BeJow0mVBkms/ FSVQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=IdfKzvRQ; spf=pass (google.com: best guess record for domain of linux-arm-msm-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-arm-msm-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 s24si7874065pfh.227.2019.06.24.23.35.08; Mon, 24 Jun 2019 23:35:08 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-arm-msm-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=IdfKzvRQ; spf=pass (google.com: best guess record for domain of linux-arm-msm-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-arm-msm-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 S1729418AbfFYGfH (ORCPT + 15 others); Tue, 25 Jun 2019 02:35:07 -0400 Received: from mail.kernel.org ([198.145.29.99]:41722 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726321AbfFYGfH (ORCPT ); Tue, 25 Jun 2019 02:35:07 -0400 Received: from localhost.localdomain (unknown [106.201.40.23]) (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 35E4F2085A; Tue, 25 Jun 2019 06:35:03 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1561444507; bh=4p3TclynktLEVHGnNL/mLsnZWSfnsqwzBkuTC1A6VEo=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=IdfKzvRQHtACtYVzSU9BRHVOHPalr4PbGL+09cbQ96eB34hOoExQMgbpaXm/i7bhm 2bQ2f4uETBY4LkqGS6UaphFLdYR9jmIy/H85EyhiqkYXDPLrI2w7MZLIIXC9sV6c9A VrOpwRSyHI/GCVIPSRG86l+MAqRz43L6up01O4Nw= 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 Subject: [PATCH v3 1/3] clk: qcom: clk-alpha-pll: Remove post_div_table checks Date: Tue, 25 Jun 2019 12:01:38 +0530 Message-Id: <20190625063140.17106-2-vkoul@kernel.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190625063140.17106-1-vkoul@kernel.org> References: <20190625063140.17106-1-vkoul@kernel.org> MIME-Version: 1.0 Sender: linux-arm-msm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org We want users to code properly and fix the post_div_table missing and not reply 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) {