* [PATCH] drm/amd/powerplay: fix amd_powerplay_reset()
@ 2017-10-24 9:44 ` Dan Carpenter
0 siblings, 0 replies; 8+ messages in thread
From: Dan Carpenter @ 2017-10-24 9:44 UTC (permalink / raw)
To: Alex Deucher, Rex Zhu
Cc: David Airlie, kernel-janitors-u79uwXL29TY76Z2rM5mHXA,
dri-devel-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW, Huang Rui,
amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW, Eric Huang,
Christian König
We accidentally inverted an if statement and turned amd_powerplay_reset()
into a no-op.
Fixes: ae97988fc89e ("drm/amd/powerplay: tidy up ret checks in amd_powerplay.c (v3)")
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
---
IMHO, tidying unreadable double negatives is tricky and error prone but
still worth it in the long run.
diff --git a/drivers/gpu/drm/amd/powerplay/amd_powerplay.c b/drivers/gpu/drm/amd/powerplay/amd_powerplay.c
index 3c8ef4bfc205..0f8b6dc853a5 100644
--- a/drivers/gpu/drm/amd/powerplay/amd_powerplay.c
+++ b/drivers/gpu/drm/amd/powerplay/amd_powerplay.c
@@ -1184,7 +1184,7 @@ int amd_powerplay_reset(void *handle)
int ret;
ret = pp_check(instance);
- if (!ret)
+ if (ret)
return ret;
ret = pp_hw_fini(instance);
_______________________________________________
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
^ permalink raw reply related [flat|nested] 8+ messages in thread
* [PATCH] drm/amd/powerplay: fix amd_powerplay_reset()
@ 2017-10-24 9:44 ` Dan Carpenter
0 siblings, 0 replies; 8+ messages in thread
From: Dan Carpenter @ 2017-10-24 9:44 UTC (permalink / raw)
To: Alex Deucher, Rex Zhu
Cc: David Airlie, kernel-janitors-u79uwXL29TY76Z2rM5mHXA,
dri-devel-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW, Huang Rui,
amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW, Eric Huang,
Christian König
We accidentally inverted an if statement and turned amd_powerplay_reset()
into a no-op.
Fixes: ae97988fc89e ("drm/amd/powerplay: tidy up ret checks in amd_powerplay.c (v3)")
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
---
IMHO, tidying unreadable double negatives is tricky and error prone but
still worth it in the long run.
diff --git a/drivers/gpu/drm/amd/powerplay/amd_powerplay.c b/drivers/gpu/drm/amd/powerplay/amd_powerplay.c
index 3c8ef4bfc205..0f8b6dc853a5 100644
--- a/drivers/gpu/drm/amd/powerplay/amd_powerplay.c
+++ b/drivers/gpu/drm/amd/powerplay/amd_powerplay.c
@@ -1184,7 +1184,7 @@ int amd_powerplay_reset(void *handle)
int ret;
ret = pp_check(instance);
- if (!ret)
+ if (ret)
return ret;
ret = pp_hw_fini(instance);
^ permalink raw reply related [flat|nested] 8+ messages in thread
* Re: [PATCH] drm/amd/powerplay: fix amd_powerplay_reset()
2017-10-24 9:44 ` Dan Carpenter
@ 2017-10-24 10:11 ` Jani Nikula
-1 siblings, 0 replies; 8+ messages in thread
From: Jani Nikula @ 2017-10-24 10:11 UTC (permalink / raw)
To: Dan Carpenter, Alex Deucher, Rex Zhu
Cc: kernel-janitors, amd-gfx, Huang Rui, dri-devel, Eric Huang,
Christian König
On Tue, 24 Oct 2017, Dan Carpenter <dan.carpenter@oracle.com> wrote:
> We accidentally inverted an if statement and turned amd_powerplay_reset()
> into a no-op.
>
> Fixes: ae97988fc89e ("drm/amd/powerplay: tidy up ret checks in amd_powerplay.c (v3)")
For some reason I looked up that commit, and it has *two* cases where
"ret != 0" gets changed to "!ret".
BR,
Jani.
> Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
> ---
> IMHO, tidying unreadable double negatives is tricky and error prone but
> still worth it in the long run.
>
> diff --git a/drivers/gpu/drm/amd/powerplay/amd_powerplay.c b/drivers/gpu/drm/amd/powerplay/amd_powerplay.c
> index 3c8ef4bfc205..0f8b6dc853a5 100644
> --- a/drivers/gpu/drm/amd/powerplay/amd_powerplay.c
> +++ b/drivers/gpu/drm/amd/powerplay/amd_powerplay.c
> @@ -1184,7 +1184,7 @@ int amd_powerplay_reset(void *handle)
> int ret;
>
> ret = pp_check(instance);
> - if (!ret)
> + if (ret)
> return ret;
>
> ret = pp_hw_fini(instance);
> _______________________________________________
> dri-devel mailing list
> dri-devel@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/dri-devel
--
Jani Nikula, Intel Open Source Technology Center
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH] drm/amd/powerplay: fix amd_powerplay_reset()
@ 2017-10-24 10:11 ` Jani Nikula
0 siblings, 0 replies; 8+ messages in thread
From: Jani Nikula @ 2017-10-24 10:11 UTC (permalink / raw)
To: Dan Carpenter, Alex Deucher, Rex Zhu
Cc: kernel-janitors, amd-gfx, Huang Rui, dri-devel, Eric Huang,
Christian König
On Tue, 24 Oct 2017, Dan Carpenter <dan.carpenter@oracle.com> wrote:
> We accidentally inverted an if statement and turned amd_powerplay_reset()
> into a no-op.
>
> Fixes: ae97988fc89e ("drm/amd/powerplay: tidy up ret checks in amd_powerplay.c (v3)")
For some reason I looked up that commit, and it has *two* cases where
"ret != 0" gets changed to "!ret".
BR,
Jani.
> Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
> ---
> IMHO, tidying unreadable double negatives is tricky and error prone but
> still worth it in the long run.
>
> diff --git a/drivers/gpu/drm/amd/powerplay/amd_powerplay.c b/drivers/gpu/drm/amd/powerplay/amd_powerplay.c
> index 3c8ef4bfc205..0f8b6dc853a5 100644
> --- a/drivers/gpu/drm/amd/powerplay/amd_powerplay.c
> +++ b/drivers/gpu/drm/amd/powerplay/amd_powerplay.c
> @@ -1184,7 +1184,7 @@ int amd_powerplay_reset(void *handle)
> int ret;
>
> ret = pp_check(instance);
> - if (!ret)
> + if (ret)
> return ret;
>
> ret = pp_hw_fini(instance);
> _______________________________________________
> dri-devel mailing list
> dri-devel@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/dri-devel
--
Jani Nikula, Intel Open Source Technology Center
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH] drm/amd/powerplay: fix amd_powerplay_reset()
2017-10-24 10:11 ` Jani Nikula
@ 2017-10-24 10:31 ` Dan Carpenter
-1 siblings, 0 replies; 8+ messages in thread
From: Dan Carpenter @ 2017-10-24 10:31 UTC (permalink / raw)
To: Jani Nikula
Cc: Alex Deucher, Rex Zhu, kernel-janitors, dri-devel, Huang Rui,
amd-gfx, Eric Huang, Christian König
On Tue, Oct 24, 2017 at 01:11:07PM +0300, Jani Nikula wrote:
> On Tue, 24 Oct 2017, Dan Carpenter <dan.carpenter@oracle.com> wrote:
> > We accidentally inverted an if statement and turned amd_powerplay_reset()
> > into a no-op.
> >
> > Fixes: ae97988fc89e ("drm/amd/powerplay: tidy up ret checks in amd_powerplay.c (v3)")
>
> For some reason I looked up that commit, and it has *two* cases where
> "ret != 0" gets changed to "!ret".
>
The other bug was secretly fixed in commit 3811f8f00c5f ("drm/amd/powerplay:
move set_clockgating_by_smu to pp func table").
regards,
dan carpenter
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH] drm/amd/powerplay: fix amd_powerplay_reset()
@ 2017-10-24 10:31 ` Dan Carpenter
0 siblings, 0 replies; 8+ messages in thread
From: Dan Carpenter @ 2017-10-24 10:31 UTC (permalink / raw)
To: Jani Nikula
Cc: Alex Deucher, Rex Zhu, kernel-janitors, dri-devel, Huang Rui,
amd-gfx, Eric Huang, Christian König
On Tue, Oct 24, 2017 at 01:11:07PM +0300, Jani Nikula wrote:
> On Tue, 24 Oct 2017, Dan Carpenter <dan.carpenter@oracle.com> wrote:
> > We accidentally inverted an if statement and turned amd_powerplay_reset()
> > into a no-op.
> >
> > Fixes: ae97988fc89e ("drm/amd/powerplay: tidy up ret checks in amd_powerplay.c (v3)")
>
> For some reason I looked up that commit, and it has *two* cases where
> "ret != 0" gets changed to "!ret".
>
The other bug was secretly fixed in commit 3811f8f00c5f ("drm/amd/powerplay:
move set_clockgating_by_smu to pp func table").
regards,
dan carpenter
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH] drm/amd/powerplay: fix amd_powerplay_reset()
2017-10-24 9:44 ` Dan Carpenter
@ 2017-10-25 22:28 ` Alex Deucher
-1 siblings, 0 replies; 8+ messages in thread
From: Alex Deucher @ 2017-10-25 22:28 UTC (permalink / raw)
To: Dan Carpenter
Cc: kernel-janitors, Maling list - DRI developers, Eric Huang,
Huang Rui, amd-gfx list, Alex Deucher, Rex Zhu,
Christian König
On Tue, Oct 24, 2017 at 5:44 AM, Dan Carpenter <dan.carpenter@oracle.com> wrote:
> We accidentally inverted an if statement and turned amd_powerplay_reset()
> into a no-op.
>
> Fixes: ae97988fc89e ("drm/amd/powerplay: tidy up ret checks in amd_powerplay.c (v3)")
> Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Applied. thanks!
Alex
> ---
> IMHO, tidying unreadable double negatives is tricky and error prone but
> still worth it in the long run.
>
> diff --git a/drivers/gpu/drm/amd/powerplay/amd_powerplay.c b/drivers/gpu/drm/amd/powerplay/amd_powerplay.c
> index 3c8ef4bfc205..0f8b6dc853a5 100644
> --- a/drivers/gpu/drm/amd/powerplay/amd_powerplay.c
> +++ b/drivers/gpu/drm/amd/powerplay/amd_powerplay.c
> @@ -1184,7 +1184,7 @@ int amd_powerplay_reset(void *handle)
> int ret;
>
> ret = pp_check(instance);
> - if (!ret)
> + if (ret)
> return ret;
>
> ret = pp_hw_fini(instance);
> _______________________________________________
> amd-gfx mailing list
> amd-gfx@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/amd-gfx
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH] drm/amd/powerplay: fix amd_powerplay_reset()
@ 2017-10-25 22:28 ` Alex Deucher
0 siblings, 0 replies; 8+ messages in thread
From: Alex Deucher @ 2017-10-25 22:28 UTC (permalink / raw)
To: Dan Carpenter
Cc: kernel-janitors, Maling list - DRI developers, Eric Huang,
Huang Rui, amd-gfx list, Alex Deucher, Rex Zhu,
Christian König
On Tue, Oct 24, 2017 at 5:44 AM, Dan Carpenter <dan.carpenter@oracle.com> wrote:
> We accidentally inverted an if statement and turned amd_powerplay_reset()
> into a no-op.
>
> Fixes: ae97988fc89e ("drm/amd/powerplay: tidy up ret checks in amd_powerplay.c (v3)")
> Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Applied. thanks!
Alex
> ---
> IMHO, tidying unreadable double negatives is tricky and error prone but
> still worth it in the long run.
>
> diff --git a/drivers/gpu/drm/amd/powerplay/amd_powerplay.c b/drivers/gpu/drm/amd/powerplay/amd_powerplay.c
> index 3c8ef4bfc205..0f8b6dc853a5 100644
> --- a/drivers/gpu/drm/amd/powerplay/amd_powerplay.c
> +++ b/drivers/gpu/drm/amd/powerplay/amd_powerplay.c
> @@ -1184,7 +1184,7 @@ int amd_powerplay_reset(void *handle)
> int ret;
>
> ret = pp_check(instance);
> - if (!ret)
> + if (ret)
> return ret;
>
> ret = pp_hw_fini(instance);
> _______________________________________________
> amd-gfx mailing list
> amd-gfx@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/amd-gfx
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2017-10-25 22:28 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-10-24 9:44 [PATCH] drm/amd/powerplay: fix amd_powerplay_reset() Dan Carpenter
2017-10-24 9:44 ` Dan Carpenter
2017-10-24 10:11 ` Jani Nikula
2017-10-24 10:11 ` Jani Nikula
2017-10-24 10:31 ` Dan Carpenter
2017-10-24 10:31 ` Dan Carpenter
2017-10-25 22:28 ` Alex Deucher
2017-10-25 22:28 ` Alex Deucher
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.