2020-09-21 13:18:40

by Qinglang Miao

[permalink] [raw]
Subject: [PATCH -next] drm/panfrost: simplify the return expression of panfrost_devfreq_target()

Simplify the return expression.

Signed-off-by: Qinglang Miao <[email protected]>
---
drivers/gpu/drm/panfrost/panfrost_devfreq.c | 7 +------
1 file changed, 1 insertion(+), 6 deletions(-)

diff --git a/drivers/gpu/drm/panfrost/panfrost_devfreq.c b/drivers/gpu/drm/panfrost/panfrost_devfreq.c
index 8ab025d00..913eaa6d0 100644
--- a/drivers/gpu/drm/panfrost/panfrost_devfreq.c
+++ b/drivers/gpu/drm/panfrost/panfrost_devfreq.c
@@ -29,18 +29,13 @@ static int panfrost_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 panfrost_devfreq_reset(struct panfrost_devfreq *pfdevfreq)
--
2.23.0


2020-10-01 11:00:09

by Steven Price

[permalink] [raw]
Subject: Re: [PATCH -next] drm/panfrost: simplify the return expression of panfrost_devfreq_target()

On 21/09/2020 14:10, Qinglang Miao wrote:
> Simplify the return expression.
>
> Signed-off-by: Qinglang Miao <[email protected]>

Reviewed-by: Steven Price <[email protected]>

> ---
> drivers/gpu/drm/panfrost/panfrost_devfreq.c | 7 +------
> 1 file changed, 1 insertion(+), 6 deletions(-)
>
> diff --git a/drivers/gpu/drm/panfrost/panfrost_devfreq.c b/drivers/gpu/drm/panfrost/panfrost_devfreq.c
> index 8ab025d00..913eaa6d0 100644
> --- a/drivers/gpu/drm/panfrost/panfrost_devfreq.c
> +++ b/drivers/gpu/drm/panfrost/panfrost_devfreq.c
> @@ -29,18 +29,13 @@ static int panfrost_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 panfrost_devfreq_reset(struct panfrost_devfreq *pfdevfreq)
>

2020-10-01 11:27:24

by Daniel Vetter

[permalink] [raw]
Subject: Re: [PATCH -next] drm/panfrost: simplify the return expression of panfrost_devfreq_target()

On Thu, Oct 1, 2020 at 12:58 PM Steven Price <[email protected]> wrote:
>
> On 21/09/2020 14:10, Qinglang Miao wrote:
> > Simplify the return expression.
> >
> > Signed-off-by: Qinglang Miao <[email protected]>
>
> Reviewed-by: Steven Price <[email protected]>

As committer/maintainer for this please indicate whether you'll merge
this or not, with just an r-b patches are in an awkward limbo state.
Since Qinglang isn't committer you probably want to merge their
patches, for otherwise they get lost.
-Daniel
>
> > ---
> > drivers/gpu/drm/panfrost/panfrost_devfreq.c | 7 +------
> > 1 file changed, 1 insertion(+), 6 deletions(-)
> >
> > diff --git a/drivers/gpu/drm/panfrost/panfrost_devfreq.c b/drivers/gpu/drm/panfrost/panfrost_devfreq.c
> > index 8ab025d00..913eaa6d0 100644
> > --- a/drivers/gpu/drm/panfrost/panfrost_devfreq.c
> > +++ b/drivers/gpu/drm/panfrost/panfrost_devfreq.c
> > @@ -29,18 +29,13 @@ static int panfrost_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 panfrost_devfreq_reset(struct panfrost_devfreq *pfdevfreq)
> >
>


--
Daniel Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch

2020-10-01 13:00:28

by Steven Price

[permalink] [raw]
Subject: Re: [PATCH -next] drm/panfrost: simplify the return expression of panfrost_devfreq_target()

On 01/10/2020 12:25, Daniel Vetter wrote:
> On Thu, Oct 1, 2020 at 12:58 PM Steven Price <[email protected]> wrote:
>>
>> On 21/09/2020 14:10, Qinglang Miao wrote:
>>> Simplify the return expression.
>>>
>>> Signed-off-by: Qinglang Miao <[email protected]>
>>
>> Reviewed-by: Steven Price <[email protected]>
>
> As committer/maintainer for this please indicate whether you'll merge
> this or not, with just an r-b patches are in an awkward limbo state.
> Since Qinglang isn't committer you probably want to merge their
> patches, for otherwise they get lost.
> -Daniel

Sorry, I should have said - I'll push this (and the other similar patch
[1]) to drm-misc-next.

Steve

[1]
https://lore.kernel.org/r/[email protected]/