From patchwork Thu Aug 20 10:43:50 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Viresh Kumar X-Patchwork-Id: 248028 Delivered-To: patch@linaro.org Received: by 2002:a05:6e02:522:0:0:0:0 with SMTP id h2csp1234548ils; Thu, 20 Aug 2020 03:46:28 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwvBr8BWLdIILmQG0+f1/ODSZiiq13kHvcaubaA4z461XG1UGLFDu2BeQRxyV1BC2KBXvbJ X-Received: by 2002:a17:906:73d9:: with SMTP id n25mr2752820ejl.412.1597920388395; Thu, 20 Aug 2020 03:46:28 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1597920388; cv=none; d=google.com; s=arc-20160816; b=aMevqnyTF93VsuH5jAvwW3KNF2fZoZWWmVAu3pXfFLvFVhn2OMQW4l5A4kwuxdAvOH DanckEdF+Y2W+SotmLjCHDLzQd125inG5PjyuZeFLhj90FbIPFgFc7o1l3M2ee8OrkZs cIObgv/imsNrht/anoQR8pSYWrKInmR9qKpvpgIi2jrQdGDtw8dqWofLIEvC9XKAlykN Ua8nGK5QFvGXjiMMSXM2D1bGASKG4wq6JfdkjFoqT/99JtVrX3vAu73n5/QnxoxTZqvv mE/W4FIEZ3X/4pg95mB1A9eLA80H0i568Eip8L+CX72NfGOwyszJwiNLOwX5dDE46TFX vjFg== 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=RX8jH7WYd4F2NVJ6VgmGb3ASYy7lGOBAgdZtCkqBvgg=; b=jkAPNwRS4lX7ftMbNpUMt7e7U5+9Li16HFeHANpUnkFx64lIm32UWqNUka6GkI6qac JNjD0b2ngbD8HmwyGucG1PYFTBDpCz6gI5hd3oArd2YNbmBaLc62NdbasWLvnhYf4xjt K6RUfvuStpXmTxG0xQ/Tu2Ukzv7pbn96HCLzJL6KjGd0jc6NAnos+6vKQHYvCtJISQsa BrYkGYHThVolsJGPAKBW1f2BhrWKaNES65mRS2MdPx6E1WKEzTS0h5dYcyy8l7YOTXIv QMnf9hGqDkAW+IKaz1nTMU0dZvhP5bi4l4fNww48B/U3lDlQbCSr4vJa/8ygi5psejLa zhMg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=kdJLB6xv; spf=pass (google.com: domain of linux-pm-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-pm-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id w12si937182ejy.64.2020.08.20.03.46.28; Thu, 20 Aug 2020 03:46:28 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-pm-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=kdJLB6xv; spf=pass (google.com: domain of linux-pm-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-pm-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731320AbgHTKq1 (ORCPT + 10 others); Thu, 20 Aug 2020 06:46:27 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40236 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731888AbgHTKoh (ORCPT ); Thu, 20 Aug 2020 06:44:37 -0400 Received: from mail-pl1-x642.google.com (mail-pl1-x642.google.com [IPv6:2607:f8b0:4864:20::642]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B573EC061345 for ; Thu, 20 Aug 2020 03:44:19 -0700 (PDT) Received: by mail-pl1-x642.google.com with SMTP id bh1so734068plb.12 for ; Thu, 20 Aug 2020 03:44:19 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=RX8jH7WYd4F2NVJ6VgmGb3ASYy7lGOBAgdZtCkqBvgg=; b=kdJLB6xvJRzMw7YX5ULxAs3uZEqeFAoojfyPwZGYu+aBdj6Ph7yQ0NOWZklMEqNtVg CAg5NoZLrksr02/KRsMQAlBdpxV7alLNPycJflXgUYlJ3YGYTSgE3Yt2sulqK6O3u74f 0pPfT82L00RoAauHAovkXrF0UhOb7nt4XEsR3cCmZbPyRBk46P02Ih5tAQk4QMotcLEb FJLOVNuynnZvkkJZUNxNZnxweZRXDIxbcv6Mm61B6vWMhgvLjBUhFrjJI8wDk4tSxgFz Ze/Jy3wG4otR5A+kN/cKBR1hw2oMICfuKmcfrXw4vsmU5k4Pgd7BifURwVtXbU5lhD6R xfPA== 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:mime-version:content-transfer-encoding; bh=RX8jH7WYd4F2NVJ6VgmGb3ASYy7lGOBAgdZtCkqBvgg=; b=JKRnlGHCh7X3AkZwqfNTQW9ZX0GDQCTpruoaZS6Qs21DCYJGapWvjh//AFYATzzryi pDpap0i4t2SbpbwojluaCFT5gg/z6ckHW8zC+h8JL9fFAL2elz86XJkjXkZMtWnF4a0A mOI7LBitYHFcihYunEmbREQaCtM3iXUaf/4FsXrDiAP4R7m9YveqV/ZPBGuefoO0Cv9R WBfreelYifWXwLUv1y7rBu0VF3lC7z0qm8dBNvB6LX1PyrB5dzpJIdZ2m5xyx5kfjmcp nSxLknMKqh+b1emwBcvaN6g1PP1AyoWRoBwIbAomGuhGcE6VALBcX+SAROI6zVFGo84F i5Zw== X-Gm-Message-State: AOAM5310NMQhUrgyhnHTxsJzi4XDut/RSn/1OHf7/2R+km0vCRqN/drx eUk5QrazividQ8tgIstzYSFBKw== X-Received: by 2002:a17:902:ac84:: with SMTP id h4mr2112048plr.334.1597920258939; Thu, 20 Aug 2020 03:44:18 -0700 (PDT) Received: from localhost ([122.172.43.13]) by smtp.gmail.com with ESMTPSA id e125sm2435256pfh.69.2020.08.20.03.44.17 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Thu, 20 Aug 2020 03:44:18 -0700 (PDT) From: Viresh Kumar To: rnayak@codeaurora.org, "Rafael J. Wysocki" , Viresh Kumar , Shawn Guo , Sascha Hauer , Pengutronix Kernel Team , Fabio Estevam , NXP Linux Team Cc: linux-pm@vger.kernel.org, Vincent Guittot , Stephen Boyd , Nishanth Menon , linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH 1/8] cpufreq: imx6q: Unconditionally call dev_pm_opp_of_remove_table() Date: Thu, 20 Aug 2020 16:13:50 +0530 Message-Id: X-Mailer: git-send-email 2.25.0.rc1.19.g042ed3e048af In-Reply-To: References: MIME-Version: 1.0 Sender: linux-pm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-pm@vger.kernel.org dev_pm_opp_of_remove_table() doesn't report any errors when it fails to find the OPP table with error -ENODEV (i.e. OPP table not present for the device). And we can call dev_pm_opp_of_remove_table() unconditionally here. Signed-off-by: Viresh Kumar --- drivers/cpufreq/imx6q-cpufreq.c | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) -- 2.25.0.rc1.19.g042ed3e048af diff --git a/drivers/cpufreq/imx6q-cpufreq.c b/drivers/cpufreq/imx6q-cpufreq.c index ef7b34c1fd2b..5bf5fc759881 100644 --- a/drivers/cpufreq/imx6q-cpufreq.c +++ b/drivers/cpufreq/imx6q-cpufreq.c @@ -48,7 +48,6 @@ static struct clk_bulk_data clks[] = { }; static struct device *cpu_dev; -static bool free_opp; static struct cpufreq_frequency_table *freq_table; static unsigned int max_freq; static unsigned int transition_latency; @@ -390,9 +389,6 @@ static int imx6q_cpufreq_probe(struct platform_device *pdev) goto put_reg; } - /* Because we have added the OPPs here, we must free them */ - free_opp = true; - if (of_machine_is_compatible("fsl,imx6ul") || of_machine_is_compatible("fsl,imx6ull")) { ret = imx6ul_opp_check_speed_grading(cpu_dev); @@ -507,8 +503,7 @@ static int imx6q_cpufreq_probe(struct platform_device *pdev) free_freq_table: dev_pm_opp_free_cpufreq_table(cpu_dev, &freq_table); out_free_opp: - if (free_opp) - dev_pm_opp_of_remove_table(cpu_dev); + dev_pm_opp_of_remove_table(cpu_dev); put_reg: if (!IS_ERR(arm_reg)) regulator_put(arm_reg); @@ -528,8 +523,7 @@ static int imx6q_cpufreq_remove(struct platform_device *pdev) { cpufreq_unregister_driver(&imx6q_cpufreq_driver); dev_pm_opp_free_cpufreq_table(cpu_dev, &freq_table); - if (free_opp) - dev_pm_opp_of_remove_table(cpu_dev); + dev_pm_opp_of_remove_table(cpu_dev); regulator_put(arm_reg); if (!IS_ERR(pu_reg)) regulator_put(pu_reg); From patchwork Thu Aug 20 10:43:51 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Viresh Kumar X-Patchwork-Id: 248029 Delivered-To: patch@linaro.org Received: by 2002:a05:6e02:522:0:0:0:0 with SMTP id h2csp1234602ils; Thu, 20 Aug 2020 03:46:35 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyxnrxCdxzFRAdYwn0GaphBN/4hJTLTGbUmf4r7ojGLGgnFt9nGnI5eFUBLB7MQHEFKHduI X-Received: by 2002:a17:906:1719:: with SMTP id c25mr958530eje.487.1597920395498; Thu, 20 Aug 2020 03:46:35 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1597920395; cv=none; d=google.com; s=arc-20160816; b=rzHNtmwZQiQjs7hwtQsc0kSOq8H1sJlNMirqEY2xIE6nyZVyyciXYubzU5LH1T/3uk GeWYij4QcsovL6vARRXP/6Z1pjOelZIPJTHfJoMxFPmgmKOwprxnQp8TpthLX4CyGLxm 6g7OH2mSOiNguF6veNaww2TyPlm155MiUIwOtujAMK5R8wDV651PD+0WXgPWGsK1xD5c 83vAoSkNDm3KhtOpBOYoX61EFSqLH1y/u9IKXKE2qV5MnWl9mUs0AFMNogVZu4E4+MDu Q2Ka6dH/K0IuqwCvoJMnwqyFsX3IlCwItA/mVyWi4WlmRTBg4MsKebUslwXYM0Py0LgL FZtA== 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=x+bz+8kGVuMiMceaXT9LU2+tICSPMZ8W5Wbu/NfWx68=; b=H1EHBr+9trA17qRRWrQQzDxIT9LFKz90KYIwA0dqzymrxLW5wjhhWJ6P8CvpvGZLIM EgGOBu2QLYn8En+OsV+mSOKcldV0kjvwu5WQctJJZ9zVSS/36RcBvmEkUS/jLIZjjlAB ahelhxySpZHKCIBSsaKiRb7WADEfGDBnQwL+EyaCxV3dj3++Ciw7e71r/axR/Wb3I6rT FKJ6aCfMH07O3n/Lu/o+FLktix0bxpKB+dtYWrJRMtxMUJO3bcqaLqSwmk3QcX81qv14 gfh3R+IiP7O98xksKLNxZg5WVMcNbSkxMdkHZNqClX4noxeEJIczTkT9GFLEhjPKkQJJ X7uQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=VzvCfdly; spf=pass (google.com: domain of linux-pm-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-pm-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id c2si1453787edf.572.2020.08.20.03.46.35; Thu, 20 Aug 2020 03:46:35 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-pm-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=VzvCfdly; spf=pass (google.com: domain of linux-pm-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-pm-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728854AbgHTKq3 (ORCPT + 10 others); Thu, 20 Aug 2020 06:46:29 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40238 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731889AbgHTKoh (ORCPT ); Thu, 20 Aug 2020 06:44:37 -0400 Received: from mail-pf1-x442.google.com (mail-pf1-x442.google.com [IPv6:2607:f8b0:4864:20::442]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5B397C061346 for ; Thu, 20 Aug 2020 03:44:22 -0700 (PDT) Received: by mail-pf1-x442.google.com with SMTP id u128so825239pfb.6 for ; Thu, 20 Aug 2020 03:44:22 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=x+bz+8kGVuMiMceaXT9LU2+tICSPMZ8W5Wbu/NfWx68=; b=VzvCfdlyX26OvPS41xgFNpLtuTf6bOsmYXDqUDx9yH9XJzJYFihRnNb+KnOPfI/CpD HsS2D8Z1KcpukEvEzHvPa6ZlcadJdK0VqPvJGPk7k5LiPLnzLHj/s84K670FPUWTA4QT 8kz47EWrsP+qpsHgxuEg4qJpHBzyPKNUq/FQkZ80CzWc/UYpmMSUha+OVCbxZiDGQEFR OTLzfys4GCB+RzViJCKWQG+DhfRvuvI5bz/opYcl/sNOwqrGa4j+1F0IrE41gbUdQjB7 sbBhIKkBOq5NyflTtNBSgFE92CPEdwfI02ZZ+wt068yTKeDDEuj67TxT0QXC+b3pvrPy n/yw== 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:mime-version:content-transfer-encoding; bh=x+bz+8kGVuMiMceaXT9LU2+tICSPMZ8W5Wbu/NfWx68=; b=n5vGRRlAdGNnIddpEO8hvAColkmXehR3a1OMabZvh10KXKOwyMb/NzYWnPAaSi8n4T SJammLCibEWjRaU1VdQBqP8X7C4bOA75K/RQe2mPE1zR5owvCXrRJk79qIszwUJ8lqCZ U37zbo1BTgZgPadpEW6eXhZCEcKbApLg6gufiT3XmzvTcWj3cFamRkqptwqGErQB57i8 lTLRq0C7xDS7HnAADoWgro8x36FSUtBQPvfcCszzcApZP5bZrSJa1MFoJKkl1dICGCfd BvJ/GQfMkUkLl1OGRhZx+hRXpL8FFPyZFCLcjqb1LJqSSzeBuMAU5BQfvpbC5ChlgBaF 1cuw== X-Gm-Message-State: AOAM533v/VvajUNxvI7CPe/rpRBflPjAu/xVt46uyk63MzEYDO2mOGJR ApYGGm44W+LODlPTRr47Uv1IQA== X-Received: by 2002:a63:b10a:: with SMTP id r10mr2053661pgf.431.1597920261940; Thu, 20 Aug 2020 03:44:21 -0700 (PDT) Received: from localhost ([122.172.43.13]) by smtp.gmail.com with ESMTPSA id 144sm2333708pfu.114.2020.08.20.03.44.21 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Thu, 20 Aug 2020 03:44:21 -0700 (PDT) From: Viresh Kumar To: rnayak@codeaurora.org, Qiang Yu , David Airlie , Daniel Vetter Cc: Viresh Kumar , linux-pm@vger.kernel.org, Vincent Guittot , Rafael Wysocki , Stephen Boyd , Nishanth Menon , dri-devel@lists.freedesktop.org, lima@lists.freedesktop.org, linux-kernel@vger.kernel.org Subject: [PATCH 2/8] drm/lima: Unconditionally call dev_pm_opp_of_remove_table() Date: Thu, 20 Aug 2020 16:13:51 +0530 Message-Id: <56f1c76a0061dc3ed2d6ea115a3ba8b2e2dee9fd.1597919647.git.viresh.kumar@linaro.org> X-Mailer: git-send-email 2.25.0.rc1.19.g042ed3e048af In-Reply-To: References: MIME-Version: 1.0 Sender: linux-pm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-pm@vger.kernel.org dev_pm_opp_of_remove_table() doesn't report any errors when it fails to find the OPP table with error -ENODEV (i.e. OPP table not present for the device). And we can call dev_pm_opp_of_remove_table() unconditionally here. Signed-off-by: Viresh Kumar --- drivers/gpu/drm/lima/lima_devfreq.c | 6 +----- drivers/gpu/drm/lima/lima_devfreq.h | 1 - 2 files changed, 1 insertion(+), 6 deletions(-) -- 2.25.0.rc1.19.g042ed3e048af Reviewed-by: Qiang Yu diff --git a/drivers/gpu/drm/lima/lima_devfreq.c b/drivers/gpu/drm/lima/lima_devfreq.c index bbe02817721b..cd290d866a04 100644 --- a/drivers/gpu/drm/lima/lima_devfreq.c +++ b/drivers/gpu/drm/lima/lima_devfreq.c @@ -105,10 +105,7 @@ void lima_devfreq_fini(struct lima_device *ldev) devfreq->devfreq = NULL; } - if (devfreq->opp_of_table_added) { - dev_pm_opp_of_remove_table(ldev->dev); - devfreq->opp_of_table_added = false; - } + dev_pm_opp_of_remove_table(ldev->dev); if (devfreq->regulators_opp_table) { dev_pm_opp_put_regulators(devfreq->regulators_opp_table); @@ -162,7 +159,6 @@ int lima_devfreq_init(struct lima_device *ldev) ret = dev_pm_opp_of_add_table(dev); if (ret) goto err_fini; - ldevfreq->opp_of_table_added = true; lima_devfreq_reset(ldevfreq); diff --git a/drivers/gpu/drm/lima/lima_devfreq.h b/drivers/gpu/drm/lima/lima_devfreq.h index 5eed2975a375..2d9b3008ce77 100644 --- a/drivers/gpu/drm/lima/lima_devfreq.h +++ b/drivers/gpu/drm/lima/lima_devfreq.h @@ -18,7 +18,6 @@ struct lima_devfreq { struct opp_table *clkname_opp_table; struct opp_table *regulators_opp_table; struct thermal_cooling_device *cooling; - bool opp_of_table_added; ktime_t busy_time; ktime_t idle_time; From patchwork Thu Aug 20 10:43:52 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Viresh Kumar X-Patchwork-Id: 248022 Delivered-To: patch@linaro.org Received: by 2002:a05:6e02:522:0:0:0:0 with SMTP id h2csp1233742ils; Thu, 20 Aug 2020 03:45:12 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxrKqtFIXnzYmm9YZp7Mmeobj37MMeAvZvOo+v+/CLo1vF7uVrZ77QhXzX0TwL1ROe45IPS X-Received: by 2002:a17:906:5ac8:: with SMTP id x8mr2563128ejs.486.1597920311999; Thu, 20 Aug 2020 03:45:11 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1597920311; cv=none; d=google.com; s=arc-20160816; b=FyrCueVB6if8HEVT1HSpXB5cQbhcww0eJpeOEtXry15YswKai0rcSohpb9VcvogQH6 O0OqKRsD7RZJPS2uBkANF1wCu+mn6kISxd8y7hEXKz5/v+Fzl8d3uOgrE4DpQK++AC7w UR06EfRIKzNsaLbpKtMcZqnM02N/QE3eUnW/YdGYh8wyIb5J2kKhZzSp2YHljxsf8+qf Feem5qJQNnhlI6KVjH3+21GudvzPKOcbsUjw97LYF8XAjXmyCcpBvdZbyQF3h5qdw7O+ SxCvuaeuMNOE1D9acV9FviQPzz3sdR1qlmubELYiGArRh2UncQcC66kIp14BIQCbkxjD NMlg== 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=DpgTiEjgRiD0zhPSebj/TpHieKoL8i50gdOLCJBlmJ4=; b=TYAQID/QqnmbUVKjY9HPkcGRi4Z6H9HqXnBqAy0uI8P/C0ymFEUa+IJ+Bt+gHQBVvF rU0yRFuIZZtTP9QVfW+sMgFYjKoJanOO69IUatnorCjRz61JYQGpSBz7hCCuuV0zYMb5 OLSAFaIUoDjVdHyJ4AZsB2js033umlW6xMp03Q5vYowL/7EfFvxm/1TaE/7t+omcGv0f rLw3A7+epwsQt5CfIFf8T8DTO8V9F7L/ALLcy0HXDAv0MzmKTPZydi5vGEliupw3pD4A jTbXGteTq/pbQwTvKz0niWv6vuyX64A6yqIiSia1wHhur8s15BmG6oN1MpvqaA5HKmyX 1fCw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=OSGUAITJ; spf=pass (google.com: domain of linux-pm-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-pm-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id zn8si1087475ejb.70.2020.08.20.03.45.11; Thu, 20 Aug 2020 03:45:11 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-pm-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=OSGUAITJ; spf=pass (google.com: domain of linux-pm-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-pm-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731883AbgHTKot (ORCPT + 10 others); Thu, 20 Aug 2020 06:44:49 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40250 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731892AbgHTKoh (ORCPT ); Thu, 20 Aug 2020 06:44:37 -0400 Received: from mail-pl1-x644.google.com (mail-pl1-x644.google.com [IPv6:2607:f8b0:4864:20::644]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5B8B8C061349 for ; Thu, 20 Aug 2020 03:44:25 -0700 (PDT) Received: by mail-pl1-x644.google.com with SMTP id f5so842935plr.9 for ; Thu, 20 Aug 2020 03:44:25 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=DpgTiEjgRiD0zhPSebj/TpHieKoL8i50gdOLCJBlmJ4=; b=OSGUAITJhbJJ52/Uazu0MwC68AnxFTVFBm2nryW7rIRv2Iehs4ErKkFDB4CvW/yifJ ELaRK72bwMfqIokp6jb3YgnqZhSeHNDQzg025eNwaeahDVZfjtOHufpZEQ4EPZA58LRi wjwfNwQUwHsjcucCKoKS/aPzEGZSL86XD6dlQ/mSWuZKipvSC8SbXtbH0VffOwrmBBS9 N+TkFN4uny2gtdDnktp1L5R0IDe52JqLCbLdiILjK+3LPgtibESdOcwz3gLKy5O87faY np1FWs1hsGNXwSzhURE1Okz9dQm9zvIw5pJ4DhKC7mK3BqIx6pBnupcYs8m0KuS4XwTF 7ZTw== 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:mime-version:content-transfer-encoding; bh=DpgTiEjgRiD0zhPSebj/TpHieKoL8i50gdOLCJBlmJ4=; b=bPFRUyZLDW/lDAvcyM2pKIIuv9/5QHULuiNDmSpa21iPzjz9O2Lhd7NI8Bo8aLNs31 YgS0hfsg9KdtyvYqnTOfc3CaFKLI+LrBwzo7uhi52j0Yr41nCDJKxW52fA21Bqgso7Kl Ty0JgtpbOkG59+W4GMe55h3jKsV26DQwX57NhfI9gj7828pVBaIGKhfCm2a137FUvNt2 RH/z7VwU/JRQ1OjxFkIGmcmDmD1YWO7TdHDB7/S4uRC8lCIz7NrXq/bGvNm+0v4GrIsm v9Ul5b7CS07YxcL2vQVMBq1fAgL7t9jxXZ0ROYR5JHqG4tGXFrPst7X86mDpLh6UlTI9 cBUQ== X-Gm-Message-State: AOAM5336YJchQhBpDE7QNlm+lSFvFAupOhgMvcB8Zrc4TUObhrLV0nCP dvk4AQPYrChTvtWprUj3tWX50w== X-Received: by 2002:a17:90b:238d:: with SMTP id mr13mr1928786pjb.132.1597920264919; Thu, 20 Aug 2020 03:44:24 -0700 (PDT) Received: from localhost ([122.172.43.13]) by smtp.gmail.com with ESMTPSA id e7sm2145009pgn.64.2020.08.20.03.44.24 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Thu, 20 Aug 2020 03:44:24 -0700 (PDT) From: Viresh Kumar To: rnayak@codeaurora.org, Rob Clark , Sean Paul Cc: Viresh Kumar , linux-pm@vger.kernel.org, Vincent Guittot , Rafael Wysocki , Stephen Boyd , Nishanth Menon , linux-arm-msm@vger.kernel.org, dri-devel@lists.freedesktop.org, freedreno@lists.freedesktop.org, linux-kernel@vger.kernel.org Subject: [PATCH 3/8] drm/msm: Unconditionally call dev_pm_opp_of_remove_table() Date: Thu, 20 Aug 2020 16:13:52 +0530 Message-Id: <4ca1dd576f016d49e57b679d0921a268b4a7fa62.1597919647.git.viresh.kumar@linaro.org> X-Mailer: git-send-email 2.25.0.rc1.19.g042ed3e048af In-Reply-To: References: MIME-Version: 1.0 Sender: linux-pm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-pm@vger.kernel.org dev_pm_opp_of_remove_table() doesn't report any errors when it fails to find the OPP table with error -ENODEV (i.e. OPP table not present for the device). And we can call dev_pm_opp_of_remove_table() unconditionally here. Signed-off-by: Viresh Kumar --- drivers/gpu/drm/msm/disp/dpu1/dpu_kms.c | 10 +++------- drivers/gpu/drm/msm/disp/dpu1/dpu_kms.h | 1 - drivers/gpu/drm/msm/dsi/dsi_host.c | 8 ++------ 3 files changed, 5 insertions(+), 14 deletions(-) -- 2.25.0.rc1.19.g042ed3e048af diff --git a/drivers/gpu/drm/msm/disp/dpu1/dpu_kms.c b/drivers/gpu/drm/msm/disp/dpu1/dpu_kms.c index c0a4d4e16d82..1bd67ba1bf1f 100644 --- a/drivers/gpu/drm/msm/disp/dpu1/dpu_kms.c +++ b/drivers/gpu/drm/msm/disp/dpu1/dpu_kms.c @@ -1010,9 +1010,7 @@ static int dpu_bind(struct device *dev, struct device *master, void *data) return PTR_ERR(dpu_kms->opp_table); /* OPP table is optional */ ret = dev_pm_opp_of_add_table(dev); - if (!ret) { - dpu_kms->has_opp_table = true; - } else if (ret != -ENODEV) { + if (ret != -ENODEV) { dev_err(dev, "invalid OPP table in device tree\n"); dev_pm_opp_put_clkname(dpu_kms->opp_table); return ret; @@ -1037,8 +1035,7 @@ static int dpu_bind(struct device *dev, struct device *master, void *data) priv->kms = &dpu_kms->base; return ret; err: - if (dpu_kms->has_opp_table) - dev_pm_opp_of_remove_table(dev); + dev_pm_opp_of_remove_table(dev); dev_pm_opp_put_clkname(dpu_kms->opp_table); return ret; } @@ -1056,8 +1053,7 @@ static void dpu_unbind(struct device *dev, struct device *master, void *data) if (dpu_kms->rpm_enabled) pm_runtime_disable(&pdev->dev); - if (dpu_kms->has_opp_table) - dev_pm_opp_of_remove_table(dev); + dev_pm_opp_of_remove_table(dev); dev_pm_opp_put_clkname(dpu_kms->opp_table); } diff --git a/drivers/gpu/drm/msm/disp/dpu1/dpu_kms.h b/drivers/gpu/drm/msm/disp/dpu1/dpu_kms.h index e140cd633071..8295979a7165 100644 --- a/drivers/gpu/drm/msm/disp/dpu1/dpu_kms.h +++ b/drivers/gpu/drm/msm/disp/dpu1/dpu_kms.h @@ -129,7 +129,6 @@ struct dpu_kms { bool rpm_enabled; struct opp_table *opp_table; - bool has_opp_table; struct dss_module_power mp; diff --git a/drivers/gpu/drm/msm/dsi/dsi_host.c b/drivers/gpu/drm/msm/dsi/dsi_host.c index b17ac6c27554..288f9df06ea2 100644 --- a/drivers/gpu/drm/msm/dsi/dsi_host.c +++ b/drivers/gpu/drm/msm/dsi/dsi_host.c @@ -113,7 +113,6 @@ struct msm_dsi_host { struct clk *byte_intf_clk; struct opp_table *opp_table; - bool has_opp_table; u32 byte_clk_rate; u32 pixel_clk_rate; @@ -1891,9 +1890,7 @@ int msm_dsi_host_init(struct msm_dsi *msm_dsi) return PTR_ERR(msm_host->opp_table); /* OPP table is optional */ ret = dev_pm_opp_of_add_table(&pdev->dev); - if (!ret) { - msm_host->has_opp_table = true; - } else if (ret != -ENODEV) { + if (ret != -ENODEV) { dev_err(&pdev->dev, "invalid OPP table in device tree\n"); dev_pm_opp_put_clkname(msm_host->opp_table); return ret; @@ -1934,8 +1931,7 @@ void msm_dsi_host_destroy(struct mipi_dsi_host *host) mutex_destroy(&msm_host->cmd_mutex); mutex_destroy(&msm_host->dev_mutex); - if (msm_host->has_opp_table) - dev_pm_opp_of_remove_table(&msm_host->pdev->dev); + dev_pm_opp_of_remove_table(&msm_host->pdev->dev); dev_pm_opp_put_clkname(msm_host->opp_table); pm_runtime_disable(&msm_host->pdev->dev); } From patchwork Thu Aug 20 10:43:53 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Viresh Kumar X-Patchwork-Id: 248023 Delivered-To: patch@linaro.org Received: by 2002:a05:6e02:522:0:0:0:0 with SMTP id h2csp1233749ils; Thu, 20 Aug 2020 03:45:12 -0700 (PDT) X-Google-Smtp-Source: ABdhPJx1g3yWKyRg4f/JM/WXxJxn99o8qqxeumDP2lXkPryTiCvHeYIO1di3dz8Lssoc37lL64UX X-Received: by 2002:a50:d74b:: with SMTP id i11mr2377949edj.136.1597920312522; Thu, 20 Aug 2020 03:45:12 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1597920312; cv=none; d=google.com; s=arc-20160816; b=q6NYPA27mFAawlkr4d/oNgnpyUpWdoD9ZMisqn4bV1W1nwfNP8+bak8gpa2JAkAgp0 We6yrAxFaxyMobsQbDW8W3pg26/hXMew4g6b/5Wbo8eBIDZLb/ziKAFb4zmiNUVZZF96 qkVoONcFdPA/lgJycjKd0Qel0yjbfyOPblYuTaqOOkx6qpuiyL1LEBZhxeXTgspa+8Du MYzd8ZjA6h4pWpB/2t9kiqsFU5M52IOOnRcaKKbUHROctUViQcXXGgoEbOHGZCq1bbVD vCr/WBjn3cgdHR/0GSjpdBiRH83Y3q0/+KuBvLdau5QEMqGbrFALYN2iv/yNzkAOoNvC tHGQ== 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=/LOsg+FK0HYq6IcD/yEuwtjKnkS0z9yASmI3zpx6q2A=; b=RT5McKpk87gKF3L7Z6kJRnTmfkaqI560VAtDa/elFCH7LyVBRmjAOmjnMWL+9AvGfP l/jHzeVftuu55kAt5lZr7WPoY8PUPAB7X8UnGSP0hGK/lxYJp2fMV4rD3Lyi1lLOl2p1 5I+O6gsPWTeAAF/mIpGp1aQJ38z9rhfXv4rfwqnXrd5fbYpCgcSmt5MYaPi1AxnIdHrk OcL5IUabMDz0svhFQoGQGPL7OPjItUALWd+vjM0XSYiO3yfqbem762ZjrW3ixAy//hwX yjqjOUuDX+ylvqHhZVihyNi+yHHY18yMdtzENEnICfwGo1Rosv0Gv7J16qTA1cBKP8A/ SAsA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=JeiAOvt7; spf=pass (google.com: domain of linux-pm-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-pm-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id zn8si1087475ejb.70.2020.08.20.03.45.12; Thu, 20 Aug 2020 03:45:12 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-pm-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=JeiAOvt7; spf=pass (google.com: domain of linux-pm-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-pm-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731288AbgHTKpJ (ORCPT + 10 others); Thu, 20 Aug 2020 06:45:09 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40256 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731897AbgHTKoh (ORCPT ); Thu, 20 Aug 2020 06:44:37 -0400 Received: from mail-pg1-x543.google.com (mail-pg1-x543.google.com [IPv6:2607:f8b0:4864:20::543]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 531AFC06134C for ; Thu, 20 Aug 2020 03:44:28 -0700 (PDT) Received: by mail-pg1-x543.google.com with SMTP id h12so934753pgm.7 for ; Thu, 20 Aug 2020 03:44:28 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=/LOsg+FK0HYq6IcD/yEuwtjKnkS0z9yASmI3zpx6q2A=; b=JeiAOvt7RXm1vLlwduO6b/sWDGxWDZBlfXvUhtmlKqevYviiO5iuW0Dq4Y+IBeBu23 cToB2QPrKFqj/in4w4UJJbI46NRbCYY0NBi26HQdPui2dHUY4uvZZdxkdqn5mWHnhAn3 c4B0UBjRc/mRQJAE/EdSdu30LFedIxlAZSf1wfl0JaHFiB2I9UlGODYczefrXKJzKfe2 7KR6WT4os/o4nI3hewxkOGLjKmws6rfhkf673cbRFsP0xCkGsq94Z87OmSmOu6NB12wl 12gbw2p43q6l4BGM7DbjVf3r/cuyh3l8rJ+mH0f99CygvhowobayxBJxapUZTQa/z1P3 puEQ== 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:mime-version:content-transfer-encoding; bh=/LOsg+FK0HYq6IcD/yEuwtjKnkS0z9yASmI3zpx6q2A=; b=Njxb1OXZIcKG8VhgSjEtETKRZH4avU/JlOxfRUwy0V5biYezmCKVfl2IQyZ1OnYYew ir6P4pVW3ySRZkmEbLVdIIKNI3nKDVVkzD9XJDjaFU38RX8aSyhiaCRLZxIYISSiBYpb uIffTkLuDiFdg5xux1tFpxTOCmBoCTdFK2hLdJ2kmU+Z0PXhogR3k+Dg1TDQJgUBnEH3 t3IVPD7t5GlG5OQ+Uqv/yOa37qnuCT+swcMLkWdfrZ3B+hSHhiv9y+fufVDU2ZKdK/Ib qeg8nfjWWtrV37YdbOj2AAn5NswVzJmR9y6/0IRXBXttM8BEqyfR8mnAZVxYqGVq4RuH Csqg== X-Gm-Message-State: AOAM530QMnqFpnlljCz8mahB1YaVHytSXhZxu54C71rC7dp8Va7jpA/a QNniCg14o4HLLpCJzwHHKjVk6g== X-Received: by 2002:a63:7981:: with SMTP id u123mr1865493pgc.29.1597920267833; Thu, 20 Aug 2020 03:44:27 -0700 (PDT) Received: from localhost ([122.172.43.13]) by smtp.gmail.com with ESMTPSA id 20sm2109640pgz.20.2020.08.20.03.44.26 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Thu, 20 Aug 2020 03:44:27 -0700 (PDT) From: Viresh Kumar To: rnayak@codeaurora.org, Andy Gross , Bjorn Andersson , Adrian Hunter , Ulf Hansson Cc: Viresh Kumar , linux-pm@vger.kernel.org, Vincent Guittot , Rafael Wysocki , Stephen Boyd , Nishanth Menon , linux-arm-msm@vger.kernel.org, linux-mmc@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 4/8] mmc: sdhci-msm: Unconditionally call dev_pm_opp_of_remove_table() Date: Thu, 20 Aug 2020 16:13:53 +0530 Message-Id: X-Mailer: git-send-email 2.25.0.rc1.19.g042ed3e048af In-Reply-To: References: MIME-Version: 1.0 Sender: linux-pm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-pm@vger.kernel.org dev_pm_opp_of_remove_table() doesn't report any errors when it fails to find the OPP table with error -ENODEV (i.e. OPP table not present for the device). And we can call dev_pm_opp_of_remove_table() unconditionally here. Signed-off-by: Viresh Kumar --- drivers/mmc/host/sdhci-msm.c | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) -- 2.25.0.rc1.19.g042ed3e048af diff --git a/drivers/mmc/host/sdhci-msm.c b/drivers/mmc/host/sdhci-msm.c index 5a33389037cd..b7e47107a31a 100644 --- a/drivers/mmc/host/sdhci-msm.c +++ b/drivers/mmc/host/sdhci-msm.c @@ -263,7 +263,6 @@ struct sdhci_msm_host { unsigned long clk_rate; struct mmc_host *mmc; struct opp_table *opp_table; - bool has_opp_table; bool use_14lpp_dll_reset; bool tuning_done; bool calibration_done; @@ -2285,9 +2284,7 @@ static int sdhci_msm_probe(struct platform_device *pdev) /* OPP table is optional */ ret = dev_pm_opp_of_add_table(&pdev->dev); - if (!ret) { - msm_host->has_opp_table = true; - } else if (ret != -ENODEV) { + if (ret != -ENODEV) { dev_err(&pdev->dev, "Invalid OPP table in Device tree\n"); goto opp_cleanup; } @@ -2453,8 +2450,7 @@ static int sdhci_msm_probe(struct platform_device *pdev) clk_bulk_disable_unprepare(ARRAY_SIZE(msm_host->bulk_clks), msm_host->bulk_clks); opp_cleanup: - if (msm_host->has_opp_table) - dev_pm_opp_of_remove_table(&pdev->dev); + dev_pm_opp_of_remove_table(&pdev->dev); dev_pm_opp_put_clkname(msm_host->opp_table); bus_clk_disable: if (!IS_ERR(msm_host->bus_clk)) @@ -2474,8 +2470,7 @@ static int sdhci_msm_remove(struct platform_device *pdev) sdhci_remove_host(host, dead); - if (msm_host->has_opp_table) - dev_pm_opp_of_remove_table(&pdev->dev); + dev_pm_opp_of_remove_table(&pdev->dev); dev_pm_opp_put_clkname(msm_host->opp_table); pm_runtime_get_sync(&pdev->dev); pm_runtime_disable(&pdev->dev); From patchwork Thu Aug 20 10:43:54 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Viresh Kumar X-Patchwork-Id: 256995 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-12.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH, MAILING_LIST_MULTI, SIGNED_OFF_BY, SPF_HELO_NONE, SPF_PASS, URIBL_BLOCKED, USER_AGENT_GIT autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 20546C433E1 for ; Thu, 20 Aug 2020 10:46:23 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id EB30120724 for ; Thu, 20 Aug 2020 10:46:22 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="V874UKRv" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729576AbgHTKqV (ORCPT ); Thu, 20 Aug 2020 06:46:21 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40250 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731382AbgHTKom (ORCPT ); Thu, 20 Aug 2020 06:44:42 -0400 Received: from mail-pg1-x541.google.com (mail-pg1-x541.google.com [IPv6:2607:f8b0:4864:20::541]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 53A63C061357 for ; Thu, 20 Aug 2020 03:44:31 -0700 (PDT) Received: by mail-pg1-x541.google.com with SMTP id h12so934810pgm.7 for ; Thu, 20 Aug 2020 03:44:31 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=tBvIIVWSqLOvxm5DPjzeQaBDOBFgxxRxk7Pa8spcF4Y=; b=V874UKRvNzPN6yCv8qVBDzRdBiJEA270fWjz5BPet8N9PL05DbDPPGSBzOT4Y+iY/1 4d2DG05vPqpn16MzA1A+YMSq8cHlRMPn5JqZL3jVJih72dFB482zLOHksr4wnhik+uif WcXaSkGUZ4nY/8eKsNBikSG/6AXbZcr4EdezbYKrUzTJrY0yYz4d+Bb/FG/cV8ePqrwv dRyqQDFGT8c4oKA3pst29XRQ3/f3sIHW+cL2p7rERY/1sF3+Z6MTCvUuYSRYUwPPsd4+ AcusnBcReAvdqC0EVkWzaOONn61yPgQ5MBD3Nskh3CCbTi80YJwSyWZp2Gs9InhPlcP3 tmyw== 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:mime-version:content-transfer-encoding; bh=tBvIIVWSqLOvxm5DPjzeQaBDOBFgxxRxk7Pa8spcF4Y=; b=WFSSJKioYXXdP1zJQRl8mJPs09CGi+S9G+MXLDp9Cf9ABBquWqp+mmkcPsUxAWb8q6 jlKhny+LVwYoU0VbmNJFQcUjZLWWT+TnhUqeufSRwjnEGWeJa7pb77YYkULfaA+2o1e/ e1SexvI9RA6amWw1K0FEniFubuTgXkxqtMAZrvG3B1W4ddNi50pBkn6ArYV0jhFN2YN6 pS7AX0REevdEPYT1x1GQ2v8ERGmmRc6cPOXUYQ56iNwpnve3khOnnJnIdEnYktUinRg7 Fj8JTO10+cemNIh4oyM3FSr6tY3f1DDfmfd32U5WHWA0VsHWFn7bjWhQJoPIBf5e6Rli dXsg== X-Gm-Message-State: AOAM532/svkfDmTKybvZJWoo7S22eymj1gqTaIKejj/qqV2gufpLY3A1 PVkDeyUKcDMU/JM8SkVm1HKJ3A== X-Google-Smtp-Source: ABdhPJymYxVzYFrgD51zd21b7M1MPbmHJ7swyrMN/Tbs1N+OkZBWPAWKnZsexxmQeaYm+lrhpfO1EQ== X-Received: by 2002:aa7:9f8a:: with SMTP id z10mr1853318pfr.176.1597920270879; Thu, 20 Aug 2020 03:44:30 -0700 (PDT) Received: from localhost ([122.172.43.13]) by smtp.gmail.com with ESMTPSA id d13sm1862811pjz.3.2020.08.20.03.44.30 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Thu, 20 Aug 2020 03:44:30 -0700 (PDT) From: Viresh Kumar To: rnayak@codeaurora.org, Andy Gross , Bjorn Andersson , Mark Brown Cc: Viresh Kumar , linux-pm@vger.kernel.org, Vincent Guittot , Rafael Wysocki , Stephen Boyd , Nishanth Menon , linux-arm-msm@vger.kernel.org, linux-spi@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 5/8] spi: spi-geni-qcom: Unconditionally call dev_pm_opp_of_remove_table() Date: Thu, 20 Aug 2020 16:13:54 +0530 Message-Id: <91321ced21a5bbb98abc24c99e14b7f94f9045c0.1597919647.git.viresh.kumar@linaro.org> X-Mailer: git-send-email 2.25.0.rc1.19.g042ed3e048af In-Reply-To: References: MIME-Version: 1.0 Sender: linux-pm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-pm@vger.kernel.org dev_pm_opp_of_remove_table() doesn't report any errors when it fails to find the OPP table with error -ENODEV (i.e. OPP table not present for the device). And we can call dev_pm_opp_of_remove_table() unconditionally here. Signed-off-by: Viresh Kumar --- drivers/spi/spi-geni-qcom.c | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/drivers/spi/spi-geni-qcom.c b/drivers/spi/spi-geni-qcom.c index 80cea5cd3612..5d3904a0aff8 100644 --- a/drivers/spi/spi-geni-qcom.c +++ b/drivers/spi/spi-geni-qcom.c @@ -613,9 +613,7 @@ static int spi_geni_probe(struct platform_device *pdev) return PTR_ERR(mas->se.opp_table); /* OPP table is optional */ ret = dev_pm_opp_of_add_table(&pdev->dev); - if (!ret) { - mas->se.has_opp_table = true; - } else if (ret != -ENODEV) { + if (ret != -ENODEV) { dev_err(&pdev->dev, "invalid OPP table in device tree\n"); return ret; } @@ -669,8 +667,7 @@ static int spi_geni_probe(struct platform_device *pdev) spi_geni_probe_runtime_disable: pm_runtime_disable(dev); spi_master_put(spi); - if (mas->se.has_opp_table) - dev_pm_opp_of_remove_table(&pdev->dev); + dev_pm_opp_of_remove_table(&pdev->dev); dev_pm_opp_put_clkname(mas->se.opp_table); return ret; } @@ -685,8 +682,7 @@ static int spi_geni_remove(struct platform_device *pdev) free_irq(mas->irq, spi); pm_runtime_disable(&pdev->dev); - if (mas->se.has_opp_table) - dev_pm_opp_of_remove_table(&pdev->dev); + dev_pm_opp_of_remove_table(&pdev->dev); dev_pm_opp_put_clkname(mas->se.opp_table); return 0; } From patchwork Thu Aug 20 10:43:55 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Viresh Kumar X-Patchwork-Id: 248027 Delivered-To: patch@linaro.org Received: by 2002:a05:6e02:522:0:0:0:0 with SMTP id h2csp1234462ils; Thu, 20 Aug 2020 03:46:21 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxo0aqTuDTWEBnKr9ZISOOkMxNAIv6QmsEZvlhxIqkLrW/oEqpWGawlJSJsxuhctBsix6t2 X-Received: by 2002:a17:907:7287:: with SMTP id dt7mr2557012ejc.224.1597920381702; Thu, 20 Aug 2020 03:46:21 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1597920381; cv=none; d=google.com; s=arc-20160816; b=D/tWVl0yAd1mwY5mScj6jxy7DO43BjTTcSvUgo1WfvSlqHfFfA5PWkJvrO0/7o9ekw EbViFZwvBKVRfRKr9QS+bwfYz4xOdFruUw2x+IP3YdY3teXFsHwbxDxiPaF+l7yxigXB 7457j+3UmpbhL/XKE4ssYvqZ1DX0fpMonvola/78ElpA3TG09ZUculAeg1FPHffaxmbD f/xCp28560Koc+fwmeYCHlt9hfD/n/EST4r6ZC6SeX/1XRxIG9JaEgp2wdOMkPidw9vs jKlp47VR8pR4B4veiOtscaFZkEU98GvX0PZ+OONCxNj2qwIT7tny/zZqNF9bpsD9bwLF tjXg== 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=uOWJI5P/ZjP6zythnGegEhVJsfmWoLZo0o+x47AYS0E=; b=mSfj09VtdCbo3YxFyd538iFu7gT7miS+f8iSW0HEeHKjmLwUPx7SdjXylpCC5KSees ao5fGEY4W91UqMceLcQEk6WI+jD50VPz5tg9Uqqx+lUKqQvABasBkp9CsapAEB+d8JcL ttRKts1XGWKYFRbJ3RPDUw1RsVqsDTofwUltVrDU5ed/FACfx4rwYi/osNFK5Gsj7v8Z zU2iUbFnRXo1A7WrVeNT0avB/C9HCM39onUxPvVTMpVGVyznia4S917TrCnFQv7xfBJE jmGj9durmDc8bERyGS4lml76TlWIevnkUNJcZq0z6e1f60F7GZ+5F8Q8hjIQVDpsLszO foQw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="E/zVjsh1"; spf=pass (google.com: domain of linux-pm-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-pm-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id w12si937182ejy.64.2020.08.20.03.46.21; Thu, 20 Aug 2020 03:46:21 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-pm-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="E/zVjsh1"; spf=pass (google.com: domain of linux-pm-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-pm-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728575AbgHTKqU (ORCPT + 10 others); Thu, 20 Aug 2020 06:46:20 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40258 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731909AbgHTKou (ORCPT ); Thu, 20 Aug 2020 06:44:50 -0400 Received: from mail-pg1-x541.google.com (mail-pg1-x541.google.com [IPv6:2607:f8b0:4864:20::541]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5C198C06135A for ; Thu, 20 Aug 2020 03:44:34 -0700 (PDT) Received: by mail-pg1-x541.google.com with SMTP id g33so942458pgb.4 for ; Thu, 20 Aug 2020 03:44:34 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=uOWJI5P/ZjP6zythnGegEhVJsfmWoLZo0o+x47AYS0E=; b=E/zVjsh1o8if8+7pFUUiz4ZhecMs1/LIs7ui21OGEwUDDEWN5BncjVTkD2/mxtNAaS dcQBq6eMhvG3yCAs8AcgOvhwgYedg2Z6i8XzR0irtMGD70fqS6EJdJDlc9dVQfeKV/hz 5DFDXnQdSZqG2BexgfHV7DCg49HINy8/IpHTYlDc5U9WHW3v/LArJaYTquRMEYrbQOFc Y5ZJ8PiOqHnOyREyUI0MI/KnHsjQAseurJS7FnldTzKFRUwL7OqYLNowieBRkhbz6W+E 5v6fRtyff1yeAGbnzSV2ZFchTeTi0d9aOJzWYoZbOcXC/1VvkNfAf/7lE0XPElrau2QO 8Ecw== 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:mime-version:content-transfer-encoding; bh=uOWJI5P/ZjP6zythnGegEhVJsfmWoLZo0o+x47AYS0E=; b=NyvTB+FlqhdShCdYTLJWjkonGWKZGTrhqTRXJLSBHPowJBWXHY4TuK1z0sepqMv/cK lrtcaLCZBJR2XJqHqSlvvf6bSmO1wIN2FV3h5Nj/Z0gplAzO1zz3GrzTFZRbl37+6fxE xDUJQe/4p637312c5bjCnTjyCjkQtToyvxrZIVp5tXMxcTQ8Nsrc4J2WrcxetLwAwnPi HL7DCWHOhbce0cly5AoNm4ZRoX0dWeTLfm8AH88URpp7y/Z1x6JDQU7mDDJqFghuXaHm m4ygbHcURpzTnorpVhvQfJd/OHlCnkx+GQVYc741pHeGJHqNwxOaBmyO/yr7KAi7YufO YfGQ== X-Gm-Message-State: AOAM531ZzImQ1ak9mCHZ5zDFHnQcRr1Zxn1thW9DfVgbq2MGS9PDngWw BOpy1IiCEURvZuXWLC1CHcAhlg== X-Received: by 2002:aa7:9569:: with SMTP id x9mr1955507pfq.16.1597920273884; Thu, 20 Aug 2020 03:44:33 -0700 (PDT) Received: from localhost ([122.172.43.13]) by smtp.gmail.com with ESMTPSA id i14sm2492512pfu.50.2020.08.20.03.44.33 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Thu, 20 Aug 2020 03:44:33 -0700 (PDT) From: Viresh Kumar To: rnayak@codeaurora.org, Andy Gross , Bjorn Andersson , Mark Brown Cc: Viresh Kumar , linux-pm@vger.kernel.org, Vincent Guittot , Rafael Wysocki , Stephen Boyd , Nishanth Menon , linux-arm-msm@vger.kernel.org, linux-spi@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 6/8] spi: spi-qcom-qspi: Unconditionally call dev_pm_opp_of_remove_table() Date: Thu, 20 Aug 2020 16:13:55 +0530 Message-Id: <4d255332a28db9d79e0bae2cb73786df9c22efd6.1597919647.git.viresh.kumar@linaro.org> X-Mailer: git-send-email 2.25.0.rc1.19.g042ed3e048af In-Reply-To: References: MIME-Version: 1.0 Sender: linux-pm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-pm@vger.kernel.org dev_pm_opp_of_remove_table() doesn't report any errors when it fails to find the OPP table with error -ENODEV (i.e. OPP table not present for the device). And we can call dev_pm_opp_of_remove_table() unconditionally here. Signed-off-by: Viresh Kumar --- drivers/spi/spi-qcom-qspi.c | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) -- 2.25.0.rc1.19.g042ed3e048af diff --git a/drivers/spi/spi-qcom-qspi.c b/drivers/spi/spi-qcom-qspi.c index b8857a97f40a..7fd6f631dc17 100644 --- a/drivers/spi/spi-qcom-qspi.c +++ b/drivers/spi/spi-qcom-qspi.c @@ -143,7 +143,6 @@ struct qcom_qspi { struct qspi_xfer xfer; struct icc_path *icc_path_cpu_to_qspi; struct opp_table *opp_table; - bool has_opp_table; unsigned long last_speed; /* Lock to protect data accessed by IRQs */ spinlock_t lock; @@ -546,9 +545,7 @@ static int qcom_qspi_probe(struct platform_device *pdev) } /* OPP table is optional */ ret = dev_pm_opp_of_add_table(&pdev->dev); - if (!ret) { - ctrl->has_opp_table = true; - } else if (ret != -ENODEV) { + if (ret != -ENODEV) { dev_err(&pdev->dev, "invalid OPP table in device tree\n"); goto exit_probe_master_put; } @@ -562,8 +559,7 @@ static int qcom_qspi_probe(struct platform_device *pdev) return 0; pm_runtime_disable(dev); - if (ctrl->has_opp_table) - dev_pm_opp_of_remove_table(&pdev->dev); + dev_pm_opp_of_remove_table(&pdev->dev); dev_pm_opp_put_clkname(ctrl->opp_table); exit_probe_master_put: @@ -581,8 +577,7 @@ static int qcom_qspi_remove(struct platform_device *pdev) spi_unregister_master(master); pm_runtime_disable(&pdev->dev); - if (ctrl->has_opp_table) - dev_pm_opp_of_remove_table(&pdev->dev); + dev_pm_opp_of_remove_table(&pdev->dev); dev_pm_opp_put_clkname(ctrl->opp_table); return 0; From patchwork Thu Aug 20 10:43:56 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Viresh Kumar X-Patchwork-Id: 256996 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-12.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH, MAILING_LIST_MULTI, SIGNED_OFF_BY, SPF_HELO_NONE, SPF_PASS, URIBL_BLOCKED, USER_AGENT_GIT autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 0915DC433DF for ; Thu, 20 Aug 2020 10:46:21 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id D66062075E for ; Thu, 20 Aug 2020 10:46:20 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="sU8Hrsb4" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731412AbgHTKp6 (ORCPT ); Thu, 20 Aug 2020 06:45:58 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40236 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731448AbgHTKow (ORCPT ); Thu, 20 Aug 2020 06:44:52 -0400 Received: from mail-pg1-x541.google.com (mail-pg1-x541.google.com [IPv6:2607:f8b0:4864:20::541]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 235C9C061386 for ; Thu, 20 Aug 2020 03:44:37 -0700 (PDT) Received: by mail-pg1-x541.google.com with SMTP id i10so948780pgk.1 for ; Thu, 20 Aug 2020 03:44:37 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=Unw7a1Ns/qnZTpkEKrE5+CVHDBMwx2azmJ5ZvPCv2dM=; b=sU8Hrsb4MRIfnmL+kicatBveHr6TQM9RoJNr+RAbh93aHXDZrQv9ReuauGVZpjxDNt ASiS4rhFQ/GrsH/okv8NaiVqAUFe0ihnPbuHzsOb15CGUIFTzCojgI3ZAJiQBy2EEqYi GlAbVVpZkoQP1G4AsoljriGSJ5dCA6RwIdVp5h8FwYkner29DM0aMSHjcR0MO3+DkGNu sM7SwLparwQvQQg1fbd7SKH3yXqUxBrZ6CdrCGw+Y4Um8ZyydkwrNL+xFW5rfIf/ZwSm kMTDd8kinv2lcd0GxAr4oqWr00Lz2DZ7gIThbx8asjQE64BdDJJ2YiDiyxRfMCpB5Vb6 YZxw== 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:mime-version:content-transfer-encoding; bh=Unw7a1Ns/qnZTpkEKrE5+CVHDBMwx2azmJ5ZvPCv2dM=; b=KkGd3os5VRA/vBWaQR18nXHeGLXmGkDEtuOafP4CkI5kBwek29VOG+C0Dw+RP1nPum kVs3oLs4fRe8ykAD65qSdkbrGbeYoET8Ma5LSKgN0G034wHEX0Nmh0ug09hRuBCXNnP6 bAIWDmLEo5EjFhHsEUc+cICfF3BJsLsJIuhfLH6/3OXBroFVDs4PIQnBXhHgq23295VO Wlfc7oUubPWs9BPb5ml5BJTTQgmaxHxIo5+WqfsanE5ymz7I6YOBNvnl2YFM+mFd8Rpu 31WIKJGLshJS0Yi3MT2/W3TlDNFU1dJ0+CPS5q4/TqvSBlEaOuy5Ew44yHabIqH+lBb8 mZqg== X-Gm-Message-State: AOAM533lhsYJJsUgS+YvTo1sM2z6v1vw6edWcQG1IV/uqQKZGxrpz4PW il+NOb23F4E0ZEoxJGdO0WAFQQ== X-Google-Smtp-Source: ABdhPJw3lWm2gvdvqEFJvs9I9h8XevmviefGFlp+suPuncq52jE6Q1kcFXUraBxX4h2bkgjQy+0Dgw== X-Received: by 2002:a62:7c4f:: with SMTP id x76mr1854639pfc.124.1597920276683; Thu, 20 Aug 2020 03:44:36 -0700 (PDT) Received: from localhost ([122.172.43.13]) by smtp.gmail.com with ESMTPSA id a17sm2418743pfk.29.2020.08.20.03.44.35 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Thu, 20 Aug 2020 03:44:36 -0700 (PDT) From: Viresh Kumar To: rnayak@codeaurora.org, Andy Gross , Bjorn Andersson , Greg Kroah-Hartman , Jiri Slaby Cc: Viresh Kumar , linux-pm@vger.kernel.org, Vincent Guittot , Rafael Wysocki , Stephen Boyd , Nishanth Menon , linux-arm-msm@vger.kernel.org, linux-serial@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 7/8] tty: serial: qcom_geni_serial: Unconditionally call dev_pm_opp_of_remove_table() Date: Thu, 20 Aug 2020 16:13:56 +0530 Message-Id: <607b871b70f64f5364f5d3dbb3ad2efec7dc55c5.1597919647.git.viresh.kumar@linaro.org> X-Mailer: git-send-email 2.25.0.rc1.19.g042ed3e048af In-Reply-To: References: MIME-Version: 1.0 Sender: linux-pm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-pm@vger.kernel.org dev_pm_opp_of_remove_table() doesn't report any errors when it fails to find the OPP table with error -ENODEV (i.e. OPP table not present for the device). And we can call dev_pm_opp_of_remove_table() unconditionally here. Signed-off-by: Viresh Kumar --- drivers/tty/serial/qcom_geni_serial.c | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/drivers/tty/serial/qcom_geni_serial.c b/drivers/tty/serial/qcom_geni_serial.c index 3aa29d201f54..e4c90a76e6ac 100644 --- a/drivers/tty/serial/qcom_geni_serial.c +++ b/drivers/tty/serial/qcom_geni_serial.c @@ -1433,9 +1433,7 @@ static int qcom_geni_serial_probe(struct platform_device *pdev) return PTR_ERR(port->se.opp_table); /* OPP table is optional */ ret = dev_pm_opp_of_add_table(&pdev->dev); - if (!ret) { - port->se.has_opp_table = true; - } else if (ret != -ENODEV) { + if (ret != -ENODEV) { dev_err(&pdev->dev, "invalid OPP table in device tree\n"); return ret; } @@ -1478,8 +1476,7 @@ static int qcom_geni_serial_probe(struct platform_device *pdev) return 0; err: - if (port->se.has_opp_table) - dev_pm_opp_of_remove_table(&pdev->dev); + dev_pm_opp_of_remove_table(&pdev->dev); dev_pm_opp_put_clkname(port->se.opp_table); return ret; } @@ -1489,8 +1486,7 @@ static int qcom_geni_serial_remove(struct platform_device *pdev) struct qcom_geni_serial_port *port = platform_get_drvdata(pdev); struct uart_driver *drv = port->private_data.drv; - if (port->se.has_opp_table) - dev_pm_opp_of_remove_table(&pdev->dev); + dev_pm_opp_of_remove_table(&pdev->dev); dev_pm_opp_put_clkname(port->se.opp_table); dev_pm_clear_wake_irq(&pdev->dev); device_init_wakeup(&pdev->dev, false); From patchwork Thu Aug 20 10:43:57 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Viresh Kumar X-Patchwork-Id: 248026 Delivered-To: patch@linaro.org Received: by 2002:a05:6e02:522:0:0:0:0 with SMTP id h2csp1234210ils; Thu, 20 Aug 2020 03:45:58 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyocqAd6Q+ls9WYHEIz3wJfmv1ZA3ngNLXOxu/dG7HwQ/x2Or6I2A4hBvplNFNX1SjXAPRt X-Received: by 2002:a50:fc02:: with SMTP id i2mr2256614edr.121.1597920358806; Thu, 20 Aug 2020 03:45:58 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1597920358; cv=none; d=google.com; s=arc-20160816; b=V4Y5CbsNeDBOAz05EgrdXGyzCnyf+RjMpPkkkNcBnzyJxIj4SuThnRA6mGacv/eNpq Wrq6qNKgTbHyBK3Gy53UWp5+ltu8PrlzliYX7ad413JRsagnut57b774zxMnN+BSLVlV Vd2yuPnrFPnVSWiEI1lz6aNvlgz026weiRCDqQTf+CfZVlTO/zsSFhSh5eRvk/6u6ph8 qVd3q22fA3QkEsR0VmqifSwQezA0oTMLbInpXGeikog32TQ0B6f3CSz/T2ObU5hMshok iwxg+BcEuvaH0X4Jr6sVxhu4BJXqnVgsAv7ODPTL9Ph9/0cSfLFC+tl0TSxZBmzEL7qU k9iQ== 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=haHH6xEEDXJD3ODlka0BS0C5wOsHmEx6Ewo0XdB15Uc=; b=KEqbcm9ZcVoq1WsAeor2PtNn+8QRJN0gAlegCsDXCTE4MhXehPdAS2QdqNz9gvcuR0 MNuxx8QI7lAWPChq8pdAoGiMMAw9VdCntuKc2lAqhZB+qGfzRBLRFl/rf1yL3MAw5E/M 5Uz+6LKIRkptc8EA00VQ7pLzVSOPer9wE2rCpWG1jd3bwViovSSFZWsGKNa6GIqfkC8w OxRH9WqLQ0Gq1HenO/WZzhEbm5OxLegIeBe/mSfxXnJOn6c3MFxsUp0vZ3+7pRZHTMcE mYhajmTZwTZxA+1S200kQUwhN79hzgauiTX3Ue9Vq2PSzOLUcb8VcuONjARA4iKNCugx tjFQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=vU9PtiBP; spf=pass (google.com: domain of linux-pm-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-pm-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id i8si1167516edj.113.2020.08.20.03.45.58; Thu, 20 Aug 2020 03:45:58 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-pm-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=vU9PtiBP; spf=pass (google.com: domain of linux-pm-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-pm-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731423AbgHTKpo (ORCPT + 10 others); Thu, 20 Aug 2020 06:45:44 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40322 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731914AbgHTKo4 (ORCPT ); Thu, 20 Aug 2020 06:44:56 -0400 Received: from mail-pg1-x543.google.com (mail-pg1-x543.google.com [IPv6:2607:f8b0:4864:20::543]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id ECD48C061344 for ; Thu, 20 Aug 2020 03:44:39 -0700 (PDT) Received: by mail-pg1-x543.google.com with SMTP id d19so926920pgl.10 for ; Thu, 20 Aug 2020 03:44:39 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=haHH6xEEDXJD3ODlka0BS0C5wOsHmEx6Ewo0XdB15Uc=; b=vU9PtiBP/HMww5OYiXpQ2L/p3G067TEgmGB7o6dGutqO8yILjlrEn53ex/u3faTp52 ThF1jzECs2i+5ZuE8HPnXkwi1aAQCfu6hJ3ejTDZJCHMwWvI24LXzKm7M6x0ciFr72wP OeCydEUBElA1g0WqGWGlncp53UuL1I87DeVH1eZFO72pv0o51t5tbD5Q6MeBqYVUD+H7 Jd5mg7xLagn5+maXyf+J/zdNvyHv4YKZBrHEpAQcZq2SVRJ1twUFTsCOBkh1s5BEXekM oMqeaBRysQ0+4BQkjjfkXpTamNlPKKFFx49eG0LPOFE31HjXMu1q2lb/0yvVUnWmuvi1 GQLQ== 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:mime-version:content-transfer-encoding; bh=haHH6xEEDXJD3ODlka0BS0C5wOsHmEx6Ewo0XdB15Uc=; b=AGnYC9JQwMMSCVKIEp3yS4nD2lVVQSVBGHAYUFu0EnfPxNiQ0uhtPTZb/kbysHhc90 9GSLPAJ1j8DVPqTWoNcz+qrwu680kU7AfOHPBfut0CvGSG6umZzSQZyMBK/0kHHA9p0y E3E1ASpByYpAPY+F4sPAwAXR09LV8dZorgx+LDsTJI6I5VFXdYuHnPnLUsrynQMHkUOq wirj2MYAA1ru5ISJ34ZoF6zkIDYTwaO6ynsUCYOpxD2L4h1Xfdm3aAy/MdsFOZxuzzcD kDR9WR7P2QgU0qUj+STXojeUXd5O12WAskQ7eB0TmVFGwOfFlHkRtHDXU5ivWpop79Yf GX/A== X-Gm-Message-State: AOAM531IOouDPr+aV/GUT4+MdsdmMB0Swk3D52uUWYivPSsM1xkpFkJ+ uZUya/Xl6PX18N5pusCHN6rbng== X-Received: by 2002:a05:6a00:847:: with SMTP id q7mr1769819pfk.172.1597920279519; Thu, 20 Aug 2020 03:44:39 -0700 (PDT) Received: from localhost ([122.172.43.13]) by smtp.gmail.com with ESMTPSA id s125sm2338382pfb.125.2020.08.20.03.44.38 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Thu, 20 Aug 2020 03:44:39 -0700 (PDT) From: Viresh Kumar To: rnayak@codeaurora.org Cc: Viresh Kumar , linux-pm@vger.kernel.org, Vincent Guittot , Rafael Wysocki , Stephen Boyd , Nishanth Menon , linux-kernel@vger.kernel.org Subject: [PATCH 8/8] qcom-geni-se: remove has_opp_table Date: Thu, 20 Aug 2020 16:13:57 +0530 Message-Id: <4e27260253fdda236562f8bed9ec30a75e03f97c.1597919647.git.viresh.kumar@linaro.org> X-Mailer: git-send-email 2.25.0.rc1.19.g042ed3e048af In-Reply-To: References: MIME-Version: 1.0 Sender: linux-pm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-pm@vger.kernel.org has_opp_table isn't used anymore, remove it. Signed-off-by: Viresh Kumar --- include/linux/qcom-geni-se.h | 2 -- 1 file changed, 2 deletions(-) -- 2.25.0.rc1.19.g042ed3e048af diff --git a/include/linux/qcom-geni-se.h b/include/linux/qcom-geni-se.h index 8f385fbe5a0e..02d1417c8ecf 100644 --- a/include/linux/qcom-geni-se.h +++ b/include/linux/qcom-geni-se.h @@ -48,7 +48,6 @@ struct geni_icc_path { * @clk_perf_tbl: Table of clock frequency input to serial engine clock * @icc_paths: Array of ICC paths for SE * @opp_table: Pointer to the OPP table - * @has_opp_table: Specifies if the SE has an OPP table */ struct geni_se { void __iomem *base; @@ -59,7 +58,6 @@ struct geni_se { unsigned long *clk_perf_tbl; struct geni_icc_path icc_paths[3]; struct opp_table *opp_table; - bool has_opp_table; }; /* Common SE registers */