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 <scottl@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/2270879
Reviewed-by: Automatic_Commit_Validation_User
GVS: Gerrit_Virtual_Submit
Reviewed-by: Adeel Raza <araza@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
This commit is contained in:
Scott Long
2019-12-30 11:24:23 -08:00
committed by Alex Waterman
parent a615604411
commit 95c09bdddd

View File

@@ -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)