mirror of
git://nv-tegra.nvidia.com/linux-nvgpu.git
synced 2025-12-22 17:36:20 +03:00
gpu: nvgpu: fix misra violation in bug unit
Modify the callback interface from bug to quiesce unit to remove a possible cyclic dependency in the bug unit. Make the list of callbacks from bug unit, UT specific. The quiesce callback function and argument are kept in separate variables, and in a normal run the only callback that bug unit would invoke will be the quiesce specific function. These changes will fix the violation of Rule 17.2 in bug unit. JIRA NVGPU-6537 Change-Id: Icb6bc92077f8d26c87425768b09a7194a98e015d Signed-off-by: ajesh <akv@nvidia.com> Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvgpu/+/2527207 (cherry picked from commit 7696565648c5dd573a03be19ba9525856b781ea6) Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvgpu/+/2530900 Reviewed-by: svc-mobile-coverity <svc-mobile-coverity@nvidia.com> Reviewed-by: svc-mobile-misra <svc-mobile-misra@nvidia.com> Reviewed-by: svc-mobile-cert <svc-mobile-cert@nvidia.com> Reviewed-by: svc_kernel_abi <svc_kernel_abi@nvidia.com> Reviewed-by: Rajesh Devaraj <rdevaraj@nvidia.com> Reviewed-by: Vaibhav Kachore <vkachore@nvidia.com> Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com> GVS: Gerrit_Virtual_Submit Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2019-2020, NVIDIA CORPORATION. All rights reserved.
|
||||
* Copyright (c) 2019-2021, NVIDIA CORPORATION. All rights reserved.
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a
|
||||
* copy of this software and associated documentation files (the "Software"),
|
||||
@@ -117,8 +117,8 @@ static void other_bug_cb(void *arg)
|
||||
int test_bug_cb(struct unit_module *m,
|
||||
struct gk20a *g, void *args)
|
||||
{
|
||||
struct nvgpu_bug_cb callback;
|
||||
struct nvgpu_bug_cb other_callback;
|
||||
struct nvgpu_bug_cb callback = {0};
|
||||
struct nvgpu_bug_cb other_callback = {0};
|
||||
jmp_buf handler;
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user