linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH -next] drm/amdgpu: Fix warning Comparison to bool
@ 2020-04-30  6:38 Zou Wei
  2020-04-30 16:27 ` Alex Deucher
  0 siblings, 1 reply; 2+ messages in thread
From: Zou Wei @ 2020-04-30  6:38 UTC (permalink / raw)
  To: alexander.deucher, christian.koenig, David1.Zhou, airlied, daniel
  Cc: amd-gfx, dri-devel, linux-kernel, Zou Wei

fix below warnings reported by coccicheck

drivers/gpu/drm/amd/amdgpu/sdma_v5_0.c:630:5-11: WARNING: Comparison to bool

Reported-by: Hulk Robot <hulkci@huawei.com>
Signed-off-by: Zou Wei <zou_wei@huawei.com>
---
 drivers/gpu/drm/amd/amdgpu/sdma_v5_0.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/amd/amdgpu/sdma_v5_0.c b/drivers/gpu/drm/amd/amdgpu/sdma_v5_0.c
index b544baf..10080e4 100644
--- a/drivers/gpu/drm/amd/amdgpu/sdma_v5_0.c
+++ b/drivers/gpu/drm/amd/amdgpu/sdma_v5_0.c
@@ -627,7 +627,7 @@ static void sdma_v5_0_enable(struct amdgpu_device *adev, bool enable)
 	u32 f32_cntl;
 	int i;
 
-	if (enable == false) {
+	if (!enable) {
 		sdma_v5_0_gfx_stop(adev);
 		sdma_v5_0_rlc_stop(adev);
 	}
-- 
2.6.2


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

* Re: [PATCH -next] drm/amdgpu: Fix warning Comparison to bool
  2020-04-30  6:38 [PATCH -next] drm/amdgpu: Fix warning Comparison to bool Zou Wei
@ 2020-04-30 16:27 ` Alex Deucher
  0 siblings, 0 replies; 2+ messages in thread
From: Alex Deucher @ 2020-04-30 16:27 UTC (permalink / raw)
  To: Zou Wei
  Cc: Deucher, Alexander, Christian Koenig, Chunming Zhou, Dave Airlie,
	Daniel Vetter, Maling list - DRI developers, amd-gfx list, LKML

On Thu, Apr 30, 2020 at 3:32 AM Zou Wei <zou_wei@huawei.com> wrote:
>
> fix below warnings reported by coccicheck
>
> drivers/gpu/drm/amd/amdgpu/sdma_v5_0.c:630:5-11: WARNING: Comparison to bool

This seems incorrect.  enable is a bool.

Alex

>
> Reported-by: Hulk Robot <hulkci@huawei.com>
> Signed-off-by: Zou Wei <zou_wei@huawei.com>
> ---
>  drivers/gpu/drm/amd/amdgpu/sdma_v5_0.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/gpu/drm/amd/amdgpu/sdma_v5_0.c b/drivers/gpu/drm/amd/amdgpu/sdma_v5_0.c
> index b544baf..10080e4 100644
> --- a/drivers/gpu/drm/amd/amdgpu/sdma_v5_0.c
> +++ b/drivers/gpu/drm/amd/amdgpu/sdma_v5_0.c
> @@ -627,7 +627,7 @@ static void sdma_v5_0_enable(struct amdgpu_device *adev, bool enable)
>         u32 f32_cntl;
>         int i;
>
> -       if (enable == false) {
> +       if (!enable) {
>                 sdma_v5_0_gfx_stop(adev);
>                 sdma_v5_0_rlc_stop(adev);
>         }
> --
> 2.6.2
>
> _______________________________________________
> dri-devel mailing list
> dri-devel@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/dri-devel

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

end of thread, other threads:[~2020-04-30 16:28 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-04-30  6:38 [PATCH -next] drm/amdgpu: Fix warning Comparison to bool Zou Wei
2020-04-30 16:27 ` Alex Deucher

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