From 95c09bddddf47b908a3d263bbdd6f929b753ab0c Mon Sep 17 00:00:00 2001 From: Scott Long Date: Mon, 30 Dec 2019 11:24:23 -0800 Subject: [PATCH] gpu: nvgpu: MISRA 4.5 fixes to min_t() MISRA Advisory Directive 4.5 states that identifiers in the same name space with overlapping visibility should be typographically ambiguous. The uses of 'a'/'__a' and 'b'/'__b' in the implementation of the min_t() macro are in violation of this directive. This change switches '__a' to 't_a' and '__b' to 't_b' (where 't_' stands for "typed") to eliminate these violations. Jira NVGPU-3178 Change-Id: I72394203ae59ba4d64ca5b539943c3efe9660417 Signed-off-by: Scott Long Reviewed-on: https://git-master.nvidia.com/r/2270879 Reviewed-by: Automatic_Commit_Validation_User GVS: Gerrit_Virtual_Submit Reviewed-by: Adeel Raza Reviewed-by: mobile promotions Tested-by: mobile promotions --- drivers/gpu/nvgpu/include/nvgpu/posix/utils.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/gpu/nvgpu/include/nvgpu/posix/utils.h b/drivers/gpu/nvgpu/include/nvgpu/posix/utils.h index a90e89895..23c83362d 100644 --- a/drivers/gpu/nvgpu/include/nvgpu/posix/utils.h +++ b/drivers/gpu/nvgpu/include/nvgpu/posix/utils.h @@ -36,9 +36,9 @@ */ #define min_t(type, a, b) \ ({ \ - type __a = (a); \ - type __b = (b); \ - (__a < __b) ? __a : __b; \ + type t_a = (a); \ + type t_b = (b); \ + (t_a < t_b) ? t_a : t_b; \ }) #if defined(min)