linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH -next] drm/lima: simplify the return expression of lima_devfreq_target
@ 2020-09-19 10:08 Liu Shixin
  2020-09-19 10:43 ` Qiang Yu
  0 siblings, 1 reply; 3+ messages in thread
From: Liu Shixin @ 2020-09-19 10:08 UTC (permalink / raw)
  To: Qiang Yu, David Airlie, Daniel Vetter
  Cc: dri-devel, lima, linux-kernel, Liu Shixin

Simplify the return expression.

Signed-off-by: Liu Shixin <liushixin2@huawei.com>
---
 drivers/gpu/drm/lima/lima_devfreq.c | 7 +------
 1 file changed, 1 insertion(+), 6 deletions(-)

diff --git a/drivers/gpu/drm/lima/lima_devfreq.c b/drivers/gpu/drm/lima/lima_devfreq.c
index bbe02817721b..5914442936ed 100644
--- a/drivers/gpu/drm/lima/lima_devfreq.c
+++ b/drivers/gpu/drm/lima/lima_devfreq.c
@@ -35,18 +35,13 @@ static int lima_devfreq_target(struct device *dev, unsigned long *freq,
 			       u32 flags)
 {
 	struct dev_pm_opp *opp;
-	int err;
 
 	opp = devfreq_recommended_opp(dev, freq, flags);
 	if (IS_ERR(opp))
 		return PTR_ERR(opp);
 	dev_pm_opp_put(opp);
 
-	err = dev_pm_opp_set_rate(dev, *freq);
-	if (err)
-		return err;
-
-	return 0;
+	return dev_pm_opp_set_rate(dev, *freq);
 }
 
 static void lima_devfreq_reset(struct lima_devfreq *devfreq)
-- 
2.25.1


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH -next] drm/lima: simplify the return expression of lima_devfreq_target
  2020-09-19 10:08 [PATCH -next] drm/lima: simplify the return expression of lima_devfreq_target Liu Shixin
@ 2020-09-19 10:43 ` Qiang Yu
  2020-11-16  0:24   ` Qiang Yu
  0 siblings, 1 reply; 3+ messages in thread
From: Qiang Yu @ 2020-09-19 10:43 UTC (permalink / raw)
  To: Liu Shixin
  Cc: David Airlie, Daniel Vetter, dri-devel, lima, Linux Kernel Mailing List

Looks good for me, patch is:
Reviewed-by: Qiang Yu <yuq825@gmail.com>

Regards,
Qiang

On Sat, Sep 19, 2020 at 5:47 PM Liu Shixin <liushixin2@huawei.com> wrote:
>
> Simplify the return expression.
>
> Signed-off-by: Liu Shixin <liushixin2@huawei.com>
> ---
>  drivers/gpu/drm/lima/lima_devfreq.c | 7 +------
>  1 file changed, 1 insertion(+), 6 deletions(-)
>
> diff --git a/drivers/gpu/drm/lima/lima_devfreq.c b/drivers/gpu/drm/lima/lima_devfreq.c
> index bbe02817721b..5914442936ed 100644
> --- a/drivers/gpu/drm/lima/lima_devfreq.c
> +++ b/drivers/gpu/drm/lima/lima_devfreq.c
> @@ -35,18 +35,13 @@ static int lima_devfreq_target(struct device *dev, unsigned long *freq,
>                                u32 flags)
>  {
>         struct dev_pm_opp *opp;
> -       int err;
>
>         opp = devfreq_recommended_opp(dev, freq, flags);
>         if (IS_ERR(opp))
>                 return PTR_ERR(opp);
>         dev_pm_opp_put(opp);
>
> -       err = dev_pm_opp_set_rate(dev, *freq);
> -       if (err)
> -               return err;
> -
> -       return 0;
> +       return dev_pm_opp_set_rate(dev, *freq);
>  }
>
>  static void lima_devfreq_reset(struct lima_devfreq *devfreq)
> --
> 2.25.1
>

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH -next] drm/lima: simplify the return expression of lima_devfreq_target
  2020-09-19 10:43 ` Qiang Yu
@ 2020-11-16  0:24   ` Qiang Yu
  0 siblings, 0 replies; 3+ messages in thread
From: Qiang Yu @ 2020-11-16  0:24 UTC (permalink / raw)
  To: Liu Shixin
  Cc: David Airlie, Daniel Vetter, dri-devel, lima, Linux Kernel Mailing List

Applied to drm-misc-next.

On Sat, Sep 19, 2020 at 6:43 PM Qiang Yu <yuq825@gmail.com> wrote:
>
> Looks good for me, patch is:
> Reviewed-by: Qiang Yu <yuq825@gmail.com>
>
> Regards,
> Qiang
>
> On Sat, Sep 19, 2020 at 5:47 PM Liu Shixin <liushixin2@huawei.com> wrote:
> >
> > Simplify the return expression.
> >
> > Signed-off-by: Liu Shixin <liushixin2@huawei.com>
> > ---
> >  drivers/gpu/drm/lima/lima_devfreq.c | 7 +------
> >  1 file changed, 1 insertion(+), 6 deletions(-)
> >
> > diff --git a/drivers/gpu/drm/lima/lima_devfreq.c b/drivers/gpu/drm/lima/lima_devfreq.c
> > index bbe02817721b..5914442936ed 100644
> > --- a/drivers/gpu/drm/lima/lima_devfreq.c
> > +++ b/drivers/gpu/drm/lima/lima_devfreq.c
> > @@ -35,18 +35,13 @@ static int lima_devfreq_target(struct device *dev, unsigned long *freq,
> >                                u32 flags)
> >  {
> >         struct dev_pm_opp *opp;
> > -       int err;
> >
> >         opp = devfreq_recommended_opp(dev, freq, flags);
> >         if (IS_ERR(opp))
> >                 return PTR_ERR(opp);
> >         dev_pm_opp_put(opp);
> >
> > -       err = dev_pm_opp_set_rate(dev, *freq);
> > -       if (err)
> > -               return err;
> > -
> > -       return 0;
> > +       return dev_pm_opp_set_rate(dev, *freq);
> >  }
> >
> >  static void lima_devfreq_reset(struct lima_devfreq *devfreq)
> > --
> > 2.25.1
> >

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2020-11-16  0:24 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-09-19 10:08 [PATCH -next] drm/lima: simplify the return expression of lima_devfreq_target Liu Shixin
2020-09-19 10:43 ` Qiang Yu
2020-11-16  0:24   ` Qiang Yu

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).