* [PATCH] omapfb/dss: Remove redundant null check before clk_prepare_enable/clk_disable_unprepare
@ 2020-10-14 8:49 Xu Wang
2020-10-15 8:08 ` Thomas Zimmermann
0 siblings, 1 reply; 4+ messages in thread
From: Xu Wang @ 2020-10-14 8:49 UTC (permalink / raw)
To: b.zolnierkie, pakki001, yuehaibing
Cc: linux-omap, linux-fbdev, dri-devel, linux-kernel
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>
---
drivers/video/fbdev/omap2/omapfb/dss/venc.c | 6 ++----
1 file changed, 2 insertions(+), 4 deletions(-)
diff --git a/drivers/video/fbdev/omap2/omapfb/dss/venc.c b/drivers/video/fbdev/omap2/omapfb/dss/venc.c
index 0b0ad20afd63..8895fb8493d8 100644
--- a/drivers/video/fbdev/omap2/omapfb/dss/venc.c
+++ b/drivers/video/fbdev/omap2/omapfb/dss/venc.c
@@ -890,8 +890,7 @@ static int venc_remove(struct platform_device *pdev)
static int venc_runtime_suspend(struct device *dev)
{
- if (venc.tv_dac_clk)
- clk_disable_unprepare(venc.tv_dac_clk);
+ clk_disable_unprepare(venc.tv_dac_clk);
dispc_runtime_put();
@@ -906,8 +905,7 @@ static int venc_runtime_resume(struct device *dev)
if (r < 0)
return r;
- if (venc.tv_dac_clk)
- clk_prepare_enable(venc.tv_dac_clk);
+ clk_prepare_enable(venc.tv_dac_clk);
return 0;
}
--
2.17.1
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH] omapfb/dss: Remove redundant null check before clk_prepare_enable/clk_disable_unprepare
2020-10-14 8:49 [PATCH] omapfb/dss: Remove redundant null check before clk_prepare_enable/clk_disable_unprepare Xu Wang
@ 2020-10-15 8:08 ` Thomas Zimmermann
2020-10-16 9:53 ` Thomas Zimmermann
2020-10-16 9:53 ` Thomas Zimmermann
0 siblings, 2 replies; 4+ messages in thread
From: Thomas Zimmermann @ 2020-10-15 8:08 UTC (permalink / raw)
To: Xu Wang
Cc: b.zolnierkie, pakki001, yuehaibing, linux-fbdev, linux-omap,
linux-kernel, dri-devel
On Wed, 14 Oct 2020 08:49:20 +0000 Xu Wang <vulab@iscas.ac.cn> 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: Thomas Zimmermann <tzimmermann@suse.de>
> ---
> drivers/video/fbdev/omap2/omapfb/dss/venc.c | 6 ++----
> 1 file changed, 2 insertions(+), 4 deletions(-)
>
> diff --git a/drivers/video/fbdev/omap2/omapfb/dss/venc.c
> b/drivers/video/fbdev/omap2/omapfb/dss/venc.c index
> 0b0ad20afd63..8895fb8493d8 100644 ---
> a/drivers/video/fbdev/omap2/omapfb/dss/venc.c +++
> b/drivers/video/fbdev/omap2/omapfb/dss/venc.c @@ -890,8 +890,7 @@ static
> int venc_remove(struct platform_device *pdev)
> static int venc_runtime_suspend(struct device *dev)
> {
> - if (venc.tv_dac_clk)
> - clk_disable_unprepare(venc.tv_dac_clk);
> + clk_disable_unprepare(venc.tv_dac_clk);
>
> dispc_runtime_put();
>
> @@ -906,8 +905,7 @@ static int venc_runtime_resume(struct device *dev)
> if (r < 0)
> return r;
>
> - if (venc.tv_dac_clk)
> - clk_prepare_enable(venc.tv_dac_clk);
> + clk_prepare_enable(venc.tv_dac_clk);
>
> return 0;
> }
--
Thomas Zimmermann
Graphics Driver Developer
SUSE Software Solutions Germany GmbH
Maxfeldstr. 5, 90409 Nürnberg, Germany
(HRB 36809, AG Nürnberg)
Geschäftsführer: Felix Imendörffer
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] omapfb/dss: Remove redundant null check before clk_prepare_enable/clk_disable_unprepare
2020-10-15 8:08 ` Thomas Zimmermann
@ 2020-10-16 9:53 ` Thomas Zimmermann
2020-10-16 9:53 ` Thomas Zimmermann
1 sibling, 0 replies; 4+ messages in thread
From: Thomas Zimmermann @ 2020-10-16 9:53 UTC (permalink / raw)
To: Xu Wang
Cc: b.zolnierkie, pakki001, yuehaibing, linux-fbdev, linux-omap,
linux-kernel, dri-devel
On Thu, 15 Oct 2020 10:08:27 +0200 Thomas Zimmermann <tzimmermann@suse.de>
wrote:
> On Wed, 14 Oct 2020 08:49:20 +0000 Xu Wang <vulab@iscas.ac.cn> 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: Thomas Zimmermann <tzimmermann@suse.de>
>
Merged into drm-misc-next. Thanks!
> > ---
> > drivers/video/fbdev/omap2/omapfb/dss/venc.c | 6 ++----
> > 1 file changed, 2 insertions(+), 4 deletions(-)
> >
> > diff --git a/drivers/video/fbdev/omap2/omapfb/dss/venc.c
> > b/drivers/video/fbdev/omap2/omapfb/dss/venc.c index
> > 0b0ad20afd63..8895fb8493d8 100644 ---
> > a/drivers/video/fbdev/omap2/omapfb/dss/venc.c +++
> > b/drivers/video/fbdev/omap2/omapfb/dss/venc.c @@ -890,8 +890,7 @@ static
> > int venc_remove(struct platform_device *pdev)
> > static int venc_runtime_suspend(struct device *dev)
> > {
> > - if (venc.tv_dac_clk)
> > - clk_disable_unprepare(venc.tv_dac_clk);
> > + clk_disable_unprepare(venc.tv_dac_clk);
> >
> > dispc_runtime_put();
> >
> > @@ -906,8 +905,7 @@ static int venc_runtime_resume(struct device *dev)
> > if (r < 0)
> > return r;
> >
> > - if (venc.tv_dac_clk)
> > - clk_prepare_enable(venc.tv_dac_clk);
> > + clk_prepare_enable(venc.tv_dac_clk);
> >
> > return 0;
> > }
>
>
>
--
Thomas Zimmermann
Graphics Driver Developer
SUSE Software Solutions Germany GmbH
Maxfeldstr. 5, 90409 Nürnberg, Germany
(HRB 36809, AG Nürnberg)
Geschäftsführer: Felix Imendörffer
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] omapfb/dss: Remove redundant null check before clk_prepare_enable/clk_disable_unprepare
2020-10-15 8:08 ` Thomas Zimmermann
2020-10-16 9:53 ` Thomas Zimmermann
@ 2020-10-16 9:53 ` Thomas Zimmermann
1 sibling, 0 replies; 4+ messages in thread
From: Thomas Zimmermann @ 2020-10-16 9:53 UTC (permalink / raw)
To: Xu Wang
Cc: b.zolnierkie, pakki001, yuehaibing, linux-fbdev, linux-omap,
linux-kernel, dri-devel
On Thu, 15 Oct 2020 10:08:27 +0200 Thomas Zimmermann <tzimmermann@suse.de>
wrote:
> On Wed, 14 Oct 2020 08:49:20 +0000 Xu Wang <vulab@iscas.ac.cn> 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: Thomas Zimmermann <tzimmermann@suse.de>
>
Merged into drm-misc-next. Thanks!
> > ---
> > drivers/video/fbdev/omap2/omapfb/dss/venc.c | 6 ++----
> > 1 file changed, 2 insertions(+), 4 deletions(-)
> >
> > diff --git a/drivers/video/fbdev/omap2/omapfb/dss/venc.c
> > b/drivers/video/fbdev/omap2/omapfb/dss/venc.c index
> > 0b0ad20afd63..8895fb8493d8 100644 ---
> > a/drivers/video/fbdev/omap2/omapfb/dss/venc.c +++
> > b/drivers/video/fbdev/omap2/omapfb/dss/venc.c @@ -890,8 +890,7 @@ static
> > int venc_remove(struct platform_device *pdev)
> > static int venc_runtime_suspend(struct device *dev)
> > {
> > - if (venc.tv_dac_clk)
> > - clk_disable_unprepare(venc.tv_dac_clk);
> > + clk_disable_unprepare(venc.tv_dac_clk);
> >
> > dispc_runtime_put();
> >
> > @@ -906,8 +905,7 @@ static int venc_runtime_resume(struct device *dev)
> > if (r < 0)
> > return r;
> >
> > - if (venc.tv_dac_clk)
> > - clk_prepare_enable(venc.tv_dac_clk);
> > + clk_prepare_enable(venc.tv_dac_clk);
> >
> > return 0;
> > }
>
>
>
--
Thomas Zimmermann
Graphics Driver Developer
SUSE Software Solutions Germany GmbH
Maxfeldstr. 5, 90409 Nürnberg, Germany
(HRB 36809, AG Nürnberg)
Geschäftsführer: Felix Imendörffer
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2020-10-16 9:53 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-10-14 8:49 [PATCH] omapfb/dss: Remove redundant null check before clk_prepare_enable/clk_disable_unprepare Xu Wang
2020-10-15 8:08 ` Thomas Zimmermann
2020-10-16 9:53 ` Thomas Zimmermann
2020-10-16 9:53 ` Thomas Zimmermann
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).