mirror of
git://nv-tegra.nvidia.com/linux-nvgpu.git
synced 2025-12-24 02:22:34 +03:00
gpu: nvgpu: unit: add unit_assert helper
Add unit_assert helper to check condition. In case of failure, the macro reports failed condition as well as line number, then runs bail out code. Jira NVGPU-3476 Change-Id: I9971e7fa0337661d46a06dfa05b67a98e3c46eee Signed-off-by: Thomas Fleury <tfleury@nvidia.com> Reviewed-on: https://git-master.nvidia.com/r/2129675 GVS: Gerrit_Virtual_Submit Reviewed-by: Deepak Nibade <dnibade@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
eb380fcbdb
commit
04cf2f1ba6
@@ -55,11 +55,7 @@
|
||||
} while (0)
|
||||
#endif
|
||||
|
||||
struct test_tsg_args {
|
||||
bool init_done;
|
||||
struct nvgpu_tsg *tsg;
|
||||
struct nvgpu_channel *ch;
|
||||
};
|
||||
#define assert(cond) unit_assert(cond, goto done)
|
||||
|
||||
struct test_tsg_args test_args = {
|
||||
.init_done = false,
|
||||
|
||||
Reference in New Issue
Block a user