gpu: nvgpu: remove redundant error prints

Remove OS API return error prints from posix files as the BUG
function prints the function and line number which causes the
error.

Jira NVGPU-4987

Change-Id: Ie6d6f781241ac5e837f2732fbb1cc1ddc4d971d4
Signed-off-by: ajesh <akv@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvgpu/+/2337390
Reviewed-by: automaticguardword <automaticguardword@nvidia.com>
Reviewed-by: svc-mobile-coverity <svc-mobile-coverity@nvidia.com>
Reviewed-by: svc-mobile-misra <svc-mobile-misra@nvidia.com>
Reviewed-by: Shashank Singh <shashsingh@nvidia.com>
Reviewed-by: Ankur Kishore <ankkishore@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
GVS: Gerrit_Virtual_Submit
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
This commit is contained in:
ajesh
2020-04-30 15:37:28 +05:30
committed by Alex Waterman
parent ea36438ed2
commit ce4e7a6859
4 changed files with 0 additions and 40 deletions

View File

@@ -52,10 +52,6 @@ struct __nvgpu_posix_lock {
static inline void nvgpu_posix_lock_acquire(struct __nvgpu_posix_lock *lock)
{
int err = pthread_mutex_lock(&lock->mutex);
if (err != 0) {
nvgpu_err(NULL, "OS API pthread_mutex_lock error = %d", err);
}
nvgpu_assert(err == 0);
}

View File

@@ -93,9 +93,6 @@ void nvgpu_cond_signal(struct nvgpu_cond *cond)
nvgpu_mutex_acquire(&cond->mutex);
err = pthread_cond_signal(&cond->cond);
nvgpu_mutex_release(&cond->mutex);
if (err != 0) {
nvgpu_err(NULL, "OS API pthread_cond_signal error = %d", err);
}
nvgpu_assert(err == 0);
}
@@ -109,9 +106,6 @@ void nvgpu_cond_signal_interruptible(struct nvgpu_cond *cond)
nvgpu_mutex_acquire(&cond->mutex);
err = pthread_cond_signal(&cond->cond);
nvgpu_mutex_release(&cond->mutex);
if (err != 0) {
nvgpu_err(NULL, "OS API pthread_cond_signal error = %d", err);
}
nvgpu_assert(err == 0);
}
@@ -156,9 +150,6 @@ void nvgpu_cond_destroy(struct nvgpu_cond *cond)
BUG();
}
err = pthread_cond_destroy(&cond->cond);
if (err != 0) {
nvgpu_err(NULL, "OS API pthread_cond_destroy error = %d", err);
}
nvgpu_assert(err == 0);
nvgpu_mutex_destroy(&cond->mutex);
err = pthread_condattr_destroy(&cond->attr);
@@ -176,9 +167,6 @@ void nvgpu_cond_signal_locked(struct nvgpu_cond *cond)
BUG();
}
err = pthread_cond_signal(&cond->cond);
if (err != 0) {
nvgpu_err(NULL, "OS API pthread_cond_signal error = %d", err);
}
nvgpu_assert(err == 0);
}

View File

@@ -48,18 +48,12 @@ int nvgpu_mutex_tryacquire(struct nvgpu_mutex *mutex)
void nvgpu_mutex_destroy(struct nvgpu_mutex *mutex)
{
int err = pthread_mutex_destroy(&mutex->lock.mutex);
if (err != 0) {
nvgpu_info(NULL, "Mutex destroy error %d", err);
}
nvgpu_assert(err == 0);
}
void nvgpu_spinlock_init(struct nvgpu_spinlock *spinlock)
{
int err = pthread_mutex_init(&spinlock->lock.mutex, NULL);
if (err != 0) {
nvgpu_err(NULL, "OS API pthread_mutex_init error = %d", err);
}
nvgpu_assert(err == 0);
}
@@ -76,9 +70,6 @@ void nvgpu_spinlock_release(struct nvgpu_spinlock *spinlock)
void nvgpu_raw_spinlock_init(struct nvgpu_raw_spinlock *spinlock)
{
int err = pthread_mutex_init(&spinlock->lock.mutex, NULL);
if (err != 0) {
nvgpu_err(NULL, "OS API pthread_mutex_init error = %d", err);
}
nvgpu_assert(err == 0);
}

View File

@@ -28,9 +28,6 @@
void nvgpu_rwsem_init(struct nvgpu_rwsem *rwsem)
{
int err = pthread_rwlock_init(&rwsem->rw_sem, NULL);
if (err != 0) {
nvgpu_err(NULL, "OS API pthread_rwlock_init error = %d", err);
}
nvgpu_assert(err == 0);
}
@@ -40,9 +37,6 @@ void nvgpu_rwsem_init(struct nvgpu_rwsem *rwsem)
void nvgpu_rwsem_down_read(struct nvgpu_rwsem *rwsem)
{
int err = pthread_rwlock_rdlock(&rwsem->rw_sem);
if (err != 0) {
nvgpu_err(NULL, "OS API pthread_rwlock_rdlock err = %d", err);
}
nvgpu_assert(err == 0);
}
@@ -52,26 +46,17 @@ void nvgpu_rwsem_down_read(struct nvgpu_rwsem *rwsem)
void nvgpu_rwsem_up_read(struct nvgpu_rwsem *rwsem)
{
int err = pthread_rwlock_unlock(&rwsem->rw_sem);
if (err != 0) {
nvgpu_err(NULL, "OS API pthread_rwlock_unlock err = %d", err);
}
nvgpu_assert(err == 0);
}
void nvgpu_rwsem_down_write(struct nvgpu_rwsem *rwsem)
{
int err = pthread_rwlock_wrlock(&rwsem->rw_sem);
if (err != 0) {
nvgpu_err(NULL, "OS API pthread_rwlock_wrlock err = %d", err);
}
nvgpu_assert(err == 0);
}
void nvgpu_rwsem_up_write(struct nvgpu_rwsem *rwsem)
{
int err = pthread_rwlock_unlock(&rwsem->rw_sem);
if (err != 0) {
nvgpu_err(NULL, "OS API pthread_rwlock_unlock err = %d", err);
}
nvgpu_assert(err == 0);
}