From b6c7b9976e05411c6d288d1981a0cde45c250387 Mon Sep 17 00:00:00 2001 From: ajesh Date: Thu, 16 Apr 2020 11:32:53 +0530 Subject: [PATCH] Revert "gpu: nvgpu: modify the prints for return values" This reverts commit 48946d43fd9b6028900b594d329cd7f51f196ba4. Jira NVGPU-4987 Change-Id: I2fbaa3ff0b5eec7fbf051353a6bd80576e818f2e Signed-off-by: ajesh Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvgpu/+/2329597 Reviewed-by: automaticguardword Reviewed-by: svc-mobile-coverity Reviewed-by: svc-mobile-misra Reviewed-by: svc-mobile-cert Reviewed-by: Shashank Singh Reviewed-by: Vaibhav Kachore Reviewed-by: mobile promotions GVS: Gerrit_Virtual_Submit Tested-by: mobile promotions --- drivers/gpu/nvgpu/os/posix/cond.c | 4 +--- drivers/gpu/nvgpu/os/posix/lock.c | 4 +--- 2 files changed, 2 insertions(+), 6 deletions(-) diff --git a/drivers/gpu/nvgpu/os/posix/cond.c b/drivers/gpu/nvgpu/os/posix/cond.c index 858caa449..d8cff043d 100644 --- a/drivers/gpu/nvgpu/os/posix/cond.c +++ b/drivers/gpu/nvgpu/os/posix/cond.c @@ -159,14 +159,12 @@ void nvgpu_cond_destroy(struct nvgpu_cond *cond) if (cond == NULL) { BUG(); } -#ifndef CONFIG_NVGPU_NON_FUSA err = pthread_cond_destroy(&cond->cond); if (err != 0) { nvgpu_err(NULL, "OS API pthread_cond_destroy error = %d", err); } +#ifndef CONFIG_NVGPU_NON_FUSA nvgpu_assert(err == 0); -#else - (void) pthread_cond_destroy(&cond->cond); #endif nvgpu_mutex_destroy(&cond->mutex); err = pthread_condattr_destroy(&cond->attr); diff --git a/drivers/gpu/nvgpu/os/posix/lock.c b/drivers/gpu/nvgpu/os/posix/lock.c index edfac42ab..07feee53f 100644 --- a/drivers/gpu/nvgpu/os/posix/lock.c +++ b/drivers/gpu/nvgpu/os/posix/lock.c @@ -47,14 +47,12 @@ int nvgpu_mutex_tryacquire(struct nvgpu_mutex *mutex) void nvgpu_mutex_destroy(struct nvgpu_mutex *mutex) { -#ifndef CONFIG_NVGPU_NON_FUSA int err = pthread_mutex_destroy(&mutex->lock.mutex); if (err != 0) { nvgpu_info(NULL, "Mutex destroy error %d", err); } +#ifndef CONFIG_NVGPU_NON_FUSA nvgpu_assert(err == 0); -#else - (void) pthread_mutex_destroy(&mutex->lock.mutex); #endif }