gpu: nvgpu: use boolean type for BUG_ON macro

Using while(0) was causing a MISRA violation because 0 is not a boolean
expression. This changes it to use false which is a boolean.

Change-Id: I2d532076ad0308399df5c6a5054b0cbd8cd110c3
Signed-off-by: Philip Elcan <pelcan@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/1932558
Reviewed-by: Automatic_Commit_Validation_User
GVS: Gerrit_Virtual_Submit
Reviewed-by: Nicolas Benech <nbenech@nvidia.com>
Reviewed-by: Alex Waterman <alexw@nvidia.com>
Reviewed-by: Terje Bergstrom <tbergstrom@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
This commit is contained in:
Philip Elcan
2018-10-22 12:16:17 -04:00
committed by mobile promotions
parent f8188089df
commit 40669da3b2

View File

@@ -35,7 +35,7 @@
if (cond) { \
BUG(); \
} \
} while (0)
} while (false)
#define WARN(cond, msg, arg...) __warn(cond, msg, ##arg)
#define WARN_ON(cond) __warn(cond, "")