mirror of
git://nv-tegra.nvidia.com/linux-nvgpu.git
synced 2025-12-25 02:52:51 +03:00
gpu: nvgpu: MISRA 14.4 boolean fixes
MISRA rule 14.4 doesn't allow the usage of non-boolean variable as boolean in the controlling expression of an if statement or an iteration statement. Fix violations where a non-boolean variable is used as a boolean in the controlling expression of if and loop statements. JIRA NVGPU-1022 Change-Id: I957f8ca1fa0eb00928c476960da1e6e420781c09 Signed-off-by: Amurthyreddy <amurthyreddy@nvidia.com> Reviewed-on: https://git-master.nvidia.com/r/1941002 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:
committed by
mobile promotions
parent
f9ca193a60
commit
710aab6ba4
@@ -303,7 +303,7 @@ static inline void nvgpu_alloc_disable_dbg(struct nvgpu_allocator *a)
|
||||
seq_printf(seq, fmt "\n", ##arg); \
|
||||
else \
|
||||
alloc_dbg(allocator, fmt, ##arg); \
|
||||
} while (0)
|
||||
} while (false)
|
||||
#endif
|
||||
|
||||
#define do_alloc_dbg(a, fmt, arg...) \
|
||||
@@ -323,7 +323,7 @@ static inline void nvgpu_alloc_disable_dbg(struct nvgpu_allocator *a)
|
||||
do { \
|
||||
if ((a)->debug) \
|
||||
do_alloc_dbg((a), fmt, ##arg); \
|
||||
} while (0)
|
||||
} while (false)
|
||||
#else
|
||||
#define alloc_dbg(a, fmt, arg...) do_alloc_dbg(a, fmt, ##arg)
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user