From 4fd8df5ca055c5cc479160a2a511d1462c475ac2 Mon Sep 17 00:00:00 2001 From: Scott Long Date: Tue, 18 Feb 2020 09:49:13 -0800 Subject: [PATCH] gpu: nvgpu: fix misra 10.5 violations MISRA Advisory Rule 10.5 states that the value of an expression should not be cast to an inappropriate essential type. This change eliminates such a violation in the posix implementation of nvgpu_thread_cleanup_pop(). Jira NVGPU-3178 Change-Id: I2ad363b4d60c321fa20b23c167d783bebaceb7d3 Signed-off-by: Scott Long Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvgpu/+/2298986 Reviewed-by: Automatic_Commit_Validation_User Reviewed-by: Alex Waterman Reviewed-by: mobile promotions GVS: Gerrit_Virtual_Submit Tested-by: mobile promotions --- drivers/gpu/nvgpu/include/nvgpu/posix/thread.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/nvgpu/include/nvgpu/posix/thread.h b/drivers/gpu/nvgpu/include/nvgpu/posix/thread.h index 033fa6c67..c6a3e8533 100644 --- a/drivers/gpu/nvgpu/include/nvgpu/posix/thread.h +++ b/drivers/gpu/nvgpu/include/nvgpu/posix/thread.h @@ -52,7 +52,7 @@ /** * @brief Macro to pop the thread cancellation cleanup handler. */ -#define nvgpu_thread_cleanup_pop() pthread_cleanup_pop((bool)true) +#define nvgpu_thread_cleanup_pop() pthread_cleanup_pop((bool)1) /** * Returns the PID of the calling process.