From: Thomas Zimmermann <tzimmermann@suse.de>
To: Xu Wang <vulab@iscas.ac.cn>
Cc: linux-fbdev@vger.kernel.org, arnd@arndb.de,
b.zolnierkie@samsung.com, jani.nikula@intel.com,
daniel.vetter@ffwll.ch, gustavoars@kernel.org,
dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] video: fbdev: sh_mobile_lcdcfb: Remove redundant null check before clk_prepare_enable/cl
Date: Fri, 16 Oct 2020 10:56:25 +0000 [thread overview]
Message-ID: <20201016125625.7d2b5bd7@linux-uq9g> (raw)
In-Reply-To: <20201015101015.6dbd25ce@linux-uq9g>
On Thu, 15 Oct 2020 10:10:15 +0200 Thomas Zimmermann <tzimmermann@suse.de>
wrote:
> On Wed, 14 Oct 2020 08:57:22 +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/sh_mobile_lcdcfb.c | 6 ++----
> > 1 file changed, 2 insertions(+), 4 deletions(-)
> >
> > diff --git a/drivers/video/fbdev/sh_mobile_lcdcfb.c
> > b/drivers/video/fbdev/sh_mobile_lcdcfb.c index c1043420dbd3..c0952cc96bdb
> > 100644 --- a/drivers/video/fbdev/sh_mobile_lcdcfb.c
> > +++ b/drivers/video/fbdev/sh_mobile_lcdcfb.c
> > @@ -341,8 +341,7 @@ static void lcdc_wait_bit(struct sh_mobile_lcdc_priv
> > *priv, static void sh_mobile_lcdc_clk_on(struct sh_mobile_lcdc_priv *priv)
> > {
> > if (atomic_inc_and_test(&priv->hw_usecnt)) {
> > - if (priv->dot_clk)
> > - clk_prepare_enable(priv->dot_clk);
> > + clk_prepare_enable(priv->dot_clk);
> > pm_runtime_get_sync(priv->dev);
> > }
> > }
> > @@ -351,8 +350,7 @@ static void sh_mobile_lcdc_clk_off(struct
> > sh_mobile_lcdc_priv *priv) {
> > if (atomic_sub_return(1, &priv->hw_usecnt) = -1) {
> > pm_runtime_put(priv->dev);
> > - if (priv->dot_clk)
> > - clk_disable_unprepare(priv->dot_clk);
> > + clk_disable_unprepare(priv->dot_clk);
> > }
> > }
> >
>
>
>
--
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
WARNING: multiple messages have this Message-ID (diff)
From: Thomas Zimmermann <tzimmermann@suse.de>
To: Xu Wang <vulab@iscas.ac.cn>
Cc: linux-fbdev@vger.kernel.org, arnd@arndb.de,
b.zolnierkie@samsung.com, jani.nikula@intel.com,
daniel.vetter@ffwll.ch, gustavoars@kernel.org,
dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] video: fbdev: sh_mobile_lcdcfb: Remove redundant null check before clk_prepare_enable/clk_disable_unprepare
Date: Fri, 16 Oct 2020 12:56:25 +0200 [thread overview]
Message-ID: <20201016125625.7d2b5bd7@linux-uq9g> (raw)
In-Reply-To: <20201015101015.6dbd25ce@linux-uq9g>
On Thu, 15 Oct 2020 10:10:15 +0200 Thomas Zimmermann <tzimmermann@suse.de>
wrote:
> On Wed, 14 Oct 2020 08:57:22 +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/sh_mobile_lcdcfb.c | 6 ++----
> > 1 file changed, 2 insertions(+), 4 deletions(-)
> >
> > diff --git a/drivers/video/fbdev/sh_mobile_lcdcfb.c
> > b/drivers/video/fbdev/sh_mobile_lcdcfb.c index c1043420dbd3..c0952cc96bdb
> > 100644 --- a/drivers/video/fbdev/sh_mobile_lcdcfb.c
> > +++ b/drivers/video/fbdev/sh_mobile_lcdcfb.c
> > @@ -341,8 +341,7 @@ static void lcdc_wait_bit(struct sh_mobile_lcdc_priv
> > *priv, static void sh_mobile_lcdc_clk_on(struct sh_mobile_lcdc_priv *priv)
> > {
> > if (atomic_inc_and_test(&priv->hw_usecnt)) {
> > - if (priv->dot_clk)
> > - clk_prepare_enable(priv->dot_clk);
> > + clk_prepare_enable(priv->dot_clk);
> > pm_runtime_get_sync(priv->dev);
> > }
> > }
> > @@ -351,8 +350,7 @@ static void sh_mobile_lcdc_clk_off(struct
> > sh_mobile_lcdc_priv *priv) {
> > if (atomic_sub_return(1, &priv->hw_usecnt) == -1) {
> > pm_runtime_put(priv->dev);
> > - if (priv->dot_clk)
> > - clk_disable_unprepare(priv->dot_clk);
> > + clk_disable_unprepare(priv->dot_clk);
> > }
> > }
> >
>
>
>
--
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
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel
WARNING: multiple messages have this Message-ID (diff)
From: Thomas Zimmermann <tzimmermann@suse.de>
To: Xu Wang <vulab@iscas.ac.cn>
Cc: linux-fbdev@vger.kernel.org, arnd@arndb.de,
b.zolnierkie@samsung.com, jani.nikula@intel.com,
daniel.vetter@ffwll.ch, gustavoars@kernel.org,
dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] video: fbdev: sh_mobile_lcdcfb: Remove redundant null check before clk_prepare_enable/clk_disable_unprepare
Date: Fri, 16 Oct 2020 12:56:25 +0200 [thread overview]
Message-ID: <20201016125625.7d2b5bd7@linux-uq9g> (raw)
In-Reply-To: <20201015101015.6dbd25ce@linux-uq9g>
On Thu, 15 Oct 2020 10:10:15 +0200 Thomas Zimmermann <tzimmermann@suse.de>
wrote:
> On Wed, 14 Oct 2020 08:57:22 +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/sh_mobile_lcdcfb.c | 6 ++----
> > 1 file changed, 2 insertions(+), 4 deletions(-)
> >
> > diff --git a/drivers/video/fbdev/sh_mobile_lcdcfb.c
> > b/drivers/video/fbdev/sh_mobile_lcdcfb.c index c1043420dbd3..c0952cc96bdb
> > 100644 --- a/drivers/video/fbdev/sh_mobile_lcdcfb.c
> > +++ b/drivers/video/fbdev/sh_mobile_lcdcfb.c
> > @@ -341,8 +341,7 @@ static void lcdc_wait_bit(struct sh_mobile_lcdc_priv
> > *priv, static void sh_mobile_lcdc_clk_on(struct sh_mobile_lcdc_priv *priv)
> > {
> > if (atomic_inc_and_test(&priv->hw_usecnt)) {
> > - if (priv->dot_clk)
> > - clk_prepare_enable(priv->dot_clk);
> > + clk_prepare_enable(priv->dot_clk);
> > pm_runtime_get_sync(priv->dev);
> > }
> > }
> > @@ -351,8 +350,7 @@ static void sh_mobile_lcdc_clk_off(struct
> > sh_mobile_lcdc_priv *priv) {
> > if (atomic_sub_return(1, &priv->hw_usecnt) == -1) {
> > pm_runtime_put(priv->dev);
> > - if (priv->dot_clk)
> > - clk_disable_unprepare(priv->dot_clk);
> > + clk_disable_unprepare(priv->dot_clk);
> > }
> > }
> >
>
>
>
--
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
next prev parent reply other threads:[~2020-10-16 10:56 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-12-17 1:02 [PATCH] video: fbdev: sh_mobile_lcdcfb: use designated initializers Kees Cook
2016-12-17 1:02 ` Kees Cook
2016-12-19 13:11 ` Bartlomiej Zolnierkiewicz
2016-12-19 13:11 ` Bartlomiej Zolnierkiewicz
2016-12-19 16:13 ` Geert Uytterhoeven
2016-12-19 16:13 ` Geert Uytterhoeven
2020-10-14 8:57 ` [PATCH] video: fbdev: sh_mobile_lcdcfb: Remove redundant null check before clk_prepare_enable/clk_di Xu Wang
2020-10-14 8:57 ` [PATCH] video: fbdev: sh_mobile_lcdcfb: Remove redundant null check before clk_prepare_enable/clk_disable_unprepare Xu Wang
2020-10-14 8:57 ` Xu Wang
2020-10-15 8:10 ` [PATCH] video: fbdev: sh_mobile_lcdcfb: Remove redundant null check before clk_prepare_enable/cl Thomas Zimmermann
2020-10-15 8:10 ` [PATCH] video: fbdev: sh_mobile_lcdcfb: Remove redundant null check before clk_prepare_enable/clk_disable_unprepare Thomas Zimmermann
2020-10-15 8:10 ` Thomas Zimmermann
2020-10-16 10:56 ` Thomas Zimmermann [this message]
2020-10-16 10:56 ` Thomas Zimmermann
2020-10-16 10:56 ` Thomas Zimmermann
[not found] <CGME20170612082519epcas2p27928191481400c88cd3ee18f614daea2@epcas2p2.samsung.com>
2017-06-12 8:24 ` [PATCH] video: fbdev: sh_mobile_lcdcfb: constify sh_mobile_lcdc_bl_ops Arvind Yadav
2017-06-12 8:36 ` Arvind Yadav
2017-06-14 15:34 ` Bartlomiej Zolnierkiewicz
2017-06-14 15:34 ` Bartlomiej Zolnierkiewicz
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=20201016125625.7d2b5bd7@linux-uq9g \
--to=tzimmermann@suse.de \
--cc=arnd@arndb.de \
--cc=b.zolnierkie@samsung.com \
--cc=daniel.vetter@ffwll.ch \
--cc=dri-devel@lists.freedesktop.org \
--cc=gustavoars@kernel.org \
--cc=jani.nikula@intel.com \
--cc=linux-fbdev@vger.kernel.org \
--cc=linux-kernel@vger.kernel.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.