[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAAEAJfA_1tLk0nk-WOtwdpF3W70keyaT=YPQHzXo5+nvWiZR=A@mail.gmail.com>
Date: Fri, 4 Jan 2019 13:40:24 -0300
From: Ezequiel Garcia <ezequiel@...guardiasur.com.ar>
To: "Gustavo A. R. Silva" <gustavo@...eddedor.com>
Cc: Felix Kuehling <Felix.Kuehling@....com>,
Harish Kasiviswanathan <Harish.Kasiviswanathan@....com>,
Alex Deucher <alexander.deucher@....com>,
Christian König <christian.koenig@....com>,
"David (ChunMing) Zhou" <David1.Zhou@....com>,
David Airlie <airlied@...ux.ie>,
Daniel Vetter <daniel@...ll.ch>, amd-gfx@...ts.freedesktop.org,
dri-devel <dri-devel@...ts.freedesktop.org>,
Linux Kernel Mailing List <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH v2] drm/amdgpu_vm: fix boolean expressions
Hey Gustavo,
On Thu, 3 Jan 2019 at 17:25, Gustavo A. R. Silva <gustavo@...eddedor.com> wrote:
>
> Fix boolean expressions by using logical AND operator '&&'
> instead of bitwise operator '&'.
>
> This issue was detected with the help of Coccinelle.
>
> Fixes: 9a4b7d4c769e ("drm/amdgpu: Add vm context module param")
> Cc: stable@...r.kernel.org
> Reviewed-by: Felix Kuehling <Felix.Kuehling@....com>
> Signed-off-by: Gustavo A. R. Silva <gustavo@...eddedor.com>
> ---
> Changes in v2:
> - Update Fixes tag.
>
This just fixes a user warning that would be wrongly reported, but
doesn't fix any other issue.
Why stable?
Thanks,
Eze
> drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c
> index e73d152659a2..4cc0d1079935 100644
> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c
> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c
> @@ -3006,7 +3006,7 @@ int amdgpu_vm_init(struct amdgpu_device *adev, struct amdgpu_vm *vm,
> }
> DRM_DEBUG_DRIVER("VM update mode is %s\n",
> vm->use_cpu_for_update ? "CPU" : "SDMA");
> - WARN_ONCE((vm->use_cpu_for_update & !amdgpu_gmc_vram_full_visible(&adev->gmc)),
> + WARN_ONCE((vm->use_cpu_for_update && !amdgpu_gmc_vram_full_visible(&adev->gmc)),
> "CPU update of VM recommended only for large BAR system\n");
> vm->last_update = NULL;
>
> @@ -3136,7 +3136,7 @@ int amdgpu_vm_make_compute(struct amdgpu_device *adev, struct amdgpu_vm *vm, uns
> vm->pte_support_ats = pte_support_ats;
> DRM_DEBUG_DRIVER("VM update mode is %s\n",
> vm->use_cpu_for_update ? "CPU" : "SDMA");
> - WARN_ONCE((vm->use_cpu_for_update & !amdgpu_gmc_vram_full_visible(&adev->gmc)),
> + WARN_ONCE((vm->use_cpu_for_update && !amdgpu_gmc_vram_full_visible(&adev->gmc)),
> "CPU update of VM recommended only for large BAR system\n");
>
> if (vm->pasid) {
> --
> 2.20.1
>
--
Ezequiel García, VanguardiaSur
www.vanguardiasur.com.ar
Powered by blists - more mailing lists