mirror of
git://nv-tegra.nvidia.com/linux-nvgpu.git
synced 2025-12-23 18:16:01 +03:00
gpu: nvgpu: modify the prints for return values
Modify the prints for certain OS API return values for non safe build. Jira NVGPU-4987 Change-Id: I7c3eba58b5c685fbf654b7093e4d2180e02c49a6 Signed-off-by: ajesh <akv@nvidia.com> Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvgpu/+/2324992 Reviewed-by: automaticguardword <automaticguardword@nvidia.com> Reviewed-by: Shashank Singh <shashsingh@nvidia.com> Reviewed-by: svc-mobile-coverity <svc-mobile-coverity@nvidia.com> Reviewed-by: svc-mobile-misra <svc-mobile-misra@nvidia.com> Reviewed-by: svc-mobile-cert <svc-mobile-cert@nvidia.com> Reviewed-by: Vaibhav Kachore <vkachore@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:
@@ -159,12 +159,14 @@ void nvgpu_cond_destroy(struct nvgpu_cond *cond)
|
|||||||
if (cond == NULL) {
|
if (cond == NULL) {
|
||||||
BUG();
|
BUG();
|
||||||
}
|
}
|
||||||
|
#ifndef CONFIG_NVGPU_NON_FUSA
|
||||||
err = pthread_cond_destroy(&cond->cond);
|
err = pthread_cond_destroy(&cond->cond);
|
||||||
if (err != 0) {
|
if (err != 0) {
|
||||||
nvgpu_err(NULL, "OS API pthread_cond_destroy error = %d", err);
|
nvgpu_err(NULL, "OS API pthread_cond_destroy error = %d", err);
|
||||||
}
|
}
|
||||||
#ifndef CONFIG_NVGPU_NON_FUSA
|
|
||||||
nvgpu_assert(err == 0);
|
nvgpu_assert(err == 0);
|
||||||
|
#else
|
||||||
|
(void) pthread_cond_destroy(&cond->cond);
|
||||||
#endif
|
#endif
|
||||||
nvgpu_mutex_destroy(&cond->mutex);
|
nvgpu_mutex_destroy(&cond->mutex);
|
||||||
err = pthread_condattr_destroy(&cond->attr);
|
err = pthread_condattr_destroy(&cond->attr);
|
||||||
|
|||||||
@@ -47,12 +47,14 @@ int nvgpu_mutex_tryacquire(struct nvgpu_mutex *mutex)
|
|||||||
|
|
||||||
void nvgpu_mutex_destroy(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);
|
int err = pthread_mutex_destroy(&mutex->lock.mutex);
|
||||||
if (err != 0) {
|
if (err != 0) {
|
||||||
nvgpu_info(NULL, "Mutex destroy error %d", err);
|
nvgpu_info(NULL, "Mutex destroy error %d", err);
|
||||||
}
|
}
|
||||||
#ifndef CONFIG_NVGPU_NON_FUSA
|
|
||||||
nvgpu_assert(err == 0);
|
nvgpu_assert(err == 0);
|
||||||
|
#else
|
||||||
|
(void) pthread_mutex_destroy(&mutex->lock.mutex);
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user