From: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
To: Xu Wang <vulab@iscas.ac.cn>,
robdclark@gmail.com, sean@poorly.run, airlied@linux.ie,
daniel@ffwll.ch, tzimmermann@suse.de, mka@chromium.org,
harigovi@codeaurora.org, emil.velikov@collabora.com,
rikard.falkeborn@gmail.com, viresh.kumar@linaro.org,
rnayak@codeaurora.org
Cc: linux-arm-msm@vger.kernel.org, dri-devel@lists.freedesktop.org,
freedreno@lists.freedesktop.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] drm/msm: dsi: Remove redundant null check before clk_prepare_enable/clk_disable_unprepare
Date: Sat, 2 Oct 2021 22:48:54 +0300 [thread overview]
Message-ID: <3de6b365-7ef7-e191-a072-c7bd418c519b@linaro.org> (raw)
In-Reply-To: <20201231095616.25973-1-vulab@iscas.ac.cn>
On 31/12/2020 12:56, Xu Wang wrote:
> Because clk_prepare_enable() and clk_disable_unprepare() already checked
> NULL clock parameter, so the additional checks are unnecessary, just
> remove them.
>
> Signed-off-by: Xu Wang <vulab@iscas.ac.cn>
Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
> ---
> drivers/gpu/drm/msm/dsi/dsi_host.c | 15 ++++++---------
> 1 file changed, 6 insertions(+), 9 deletions(-)
>
> diff --git a/drivers/gpu/drm/msm/dsi/dsi_host.c b/drivers/gpu/drm/msm/dsi/dsi_host.c
> index ab281cba0f08..e7af90f045bf 100644
> --- a/drivers/gpu/drm/msm/dsi/dsi_host.c
> +++ b/drivers/gpu/drm/msm/dsi/dsi_host.c
> @@ -565,13 +565,11 @@ int dsi_link_clk_enable_6g(struct msm_dsi_host *msm_host)
> goto pixel_clk_err;
> }
>
> - if (msm_host->byte_intf_clk) {
> - ret = clk_prepare_enable(msm_host->byte_intf_clk);
> - if (ret) {
> - pr_err("%s: Failed to enable byte intf clk\n",
> - __func__);
> - goto byte_intf_clk_err;
> - }
> + ret = clk_prepare_enable(msm_host->byte_intf_clk);
> + if (ret) {
> + pr_err("%s: Failed to enable byte intf clk\n",
> + __func__);
> + goto byte_intf_clk_err;
> }
>
> return 0;
> @@ -667,8 +665,7 @@ void dsi_link_clk_disable_6g(struct msm_dsi_host *msm_host)
> dev_pm_opp_set_rate(&msm_host->pdev->dev, 0);
> clk_disable_unprepare(msm_host->esc_clk);
> clk_disable_unprepare(msm_host->pixel_clk);
> - if (msm_host->byte_intf_clk)
> - clk_disable_unprepare(msm_host->byte_intf_clk);
> + clk_disable_unprepare(msm_host->byte_intf_clk);
> clk_disable_unprepare(msm_host->byte_clk);
> }
>
>
--
With best wishes
Dmitry
prev parent reply other threads:[~2021-10-02 19:49 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-12-31 9:56 [PATCH] drm/msm: dsi: Remove redundant null check before clk_prepare_enable/clk_disable_unprepare Xu Wang
2021-10-02 19:48 ` Dmitry Baryshkov [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=3de6b365-7ef7-e191-a072-c7bd418c519b@linaro.org \
--to=dmitry.baryshkov@linaro.org \
--cc=airlied@linux.ie \
--cc=daniel@ffwll.ch \
--cc=dri-devel@lists.freedesktop.org \
--cc=emil.velikov@collabora.com \
--cc=freedreno@lists.freedesktop.org \
--cc=harigovi@codeaurora.org \
--cc=linux-arm-msm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mka@chromium.org \
--cc=rikard.falkeborn@gmail.com \
--cc=rnayak@codeaurora.org \
--cc=robdclark@gmail.com \
--cc=sean@poorly.run \
--cc=tzimmermann@suse.de \
--cc=viresh.kumar@linaro.org \
--cc=vulab@iscas.ac.cn \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox