From 49f2692bc0d68a89e0ceccb4d54d8f94e09f37f7 Mon Sep 17 00:00:00 2001 From: Anup Mahindre Date: Wed, 26 Dec 2018 13:26:45 +0530 Subject: [PATCH] gpu: nvgpu: Remove redundant warnings from gk20a_ctrl_dev_ioctl Remove redundant warnings that are being generated when nvpgu is returning proper error codes. Add nvgpu_warns instead. Bug 200457091 Change-Id: Ida44cd6bd784ad4ce55b44a8cf974bb89a5f3301 Signed-off-by: Anup Mahindre Reviewed-on: https://git-master.nvidia.com/r/1980734 Reviewed-by: svc-mobile-coverity Reviewed-by: svc-mobile-misra GVS: Gerrit_Virtual_Submit Reviewed-by: Deepak Nibade Reviewed-by: Vijayakumar Subbu Reviewed-by: mobile promotions Tested-by: mobile promotions --- drivers/gpu/nvgpu/os/linux/ioctl_ctrl.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/drivers/gpu/nvgpu/os/linux/ioctl_ctrl.c b/drivers/gpu/nvgpu/os/linux/ioctl_ctrl.c index e21cdf792..513ec8ca9 100644 --- a/drivers/gpu/nvgpu/os/linux/ioctl_ctrl.c +++ b/drivers/gpu/nvgpu/os/linux/ioctl_ctrl.c @@ -942,13 +942,15 @@ static int nvgpu_gpu_alloc_vidmem(struct gk20a *g, nvgpu_log_fn(g, " "); - /* not yet supported */ - if (WARN_ON(args->in.flags & NVGPU_GPU_ALLOC_VIDMEM_FLAG_CPU_MASK)) { + if (args->in.flags & NVGPU_GPU_ALLOC_VIDMEM_FLAG_CPU_MASK) { + nvgpu_warn(g, + "Allocating vidmem with FLAG_CPU_MASK is not yet supported"); return -EINVAL; } - /* not yet supported */ - if (WARN_ON(args->in.flags & NVGPU_GPU_ALLOC_VIDMEM_FLAG_VPR)) { + if (args->in.flags & NVGPU_GPU_ALLOC_VIDMEM_FLAG_VPR) { + nvgpu_warn(g, + "Allocating vidmem with FLAG_VPR is not yet supported"); return -EINVAL; }