mirror of
git://nv-tegra.nvidia.com/linux-nvgpu.git
synced 2025-12-24 02:22:34 +03:00
gpu: nvgpu: fix MISRA 5.7 and 10.4 violations
- Rule 5.7 doesn't allow an identifier to be reused. This change renames variable "ops" to resolve this violation. - Rule 10.4 says both operands of operators in which arithmetic operations will be do shall be of same type. JIRA NVGPU-6056 Change-Id: Ic88f398c49d122cee206efcf88afd1edf951b042 Signed-off-by: srajum <srajum@nvidia.com> Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvgpu/+/2561772 (cherry picked from commit c129465413db2c28bfcb0a039962cb65e2fca1ea) Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvgpu/+/2677518 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: Dinesh T <dt@nvidia.com> Reviewed-by: Ankur Kishore <ankkishore@nvidia.com> GVS: Gerrit_Virtual_Submit
This commit is contained in:
committed by
mobile promotions
parent
c0f4723339
commit
07583dffed
@@ -275,7 +275,7 @@ void nvgpu_worker_init_name(struct nvgpu_worker *worker,
|
||||
}
|
||||
|
||||
int nvgpu_worker_init(struct gk20a *g, struct nvgpu_worker *worker,
|
||||
const struct nvgpu_worker_ops *ops)
|
||||
const struct nvgpu_worker_ops *worker_ops)
|
||||
{
|
||||
int err;
|
||||
|
||||
@@ -286,7 +286,7 @@ int nvgpu_worker_init(struct gk20a *g, struct nvgpu_worker *worker,
|
||||
nvgpu_spinlock_init(&worker->items_lock);
|
||||
nvgpu_mutex_init(&worker->start_lock);
|
||||
|
||||
worker->ops = ops;
|
||||
worker->ops = worker_ops;
|
||||
|
||||
err = nvgpu_worker_start(worker);
|
||||
if (err != 0) {
|
||||
|
||||
Reference in New Issue
Block a user