From c7a2633e827ad95d8eaae6b82c7b000c387820a4 Mon Sep 17 00:00:00 2001 From: Vinod G Date: Tue, 1 Oct 2019 17:52:20 -0700 Subject: [PATCH] gpu: nvgpu: Correct misra error in gr unit Correct 5.3 misra error in gr ecc unit misra_c_2012_rule_5_3_violation: Declaration with identifier "err" hides another declaration. Change the variable name inside the function. Jira NVGPU-4085 Change-Id: Ib8cd62ce98da1cf1bf327eb8dd92e51c1b77d6f4 Signed-off-by: Vinod G Reviewed-on: https://git-master.nvidia.com/r/2209867 Reviewed-by: svc-mobile-coverity Reviewed-by: svc-mobile-misra GVS: Gerrit_Virtual_Submit Reviewed-by: Seshendra Gadagottu Reviewed-by: mobile promotions Tested-by: mobile promotions --- drivers/gpu/nvgpu/hal/gr/ecc/ecc_gv11b_fusa.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/drivers/gpu/nvgpu/hal/gr/ecc/ecc_gv11b_fusa.c b/drivers/gpu/nvgpu/hal/gr/ecc/ecc_gv11b_fusa.c index d106390b4..7f497f4f5 100644 --- a/drivers/gpu/nvgpu/hal/gr/ecc/ecc_gv11b_fusa.c +++ b/drivers/gpu/nvgpu/hal/gr/ecc/ecc_gv11b_fusa.c @@ -194,19 +194,19 @@ static int gv11b_ecc_init_sm_uncorrected_err_count(struct gk20a *g) static int gv11b_ecc_init_tpc(struct gk20a *g) { - int err; + int ret; NVGPU_ECC_COUNTER_INIT_PER_TPC(sm_lrf_ecc_single_err_count); NVGPU_ECC_COUNTER_INIT_PER_TPC(sm_lrf_ecc_double_err_count); - err = gv11b_ecc_init_sm_corrected_err_count(g); - if (err != 0) { - return err; + ret = gv11b_ecc_init_sm_corrected_err_count(g); + if (ret != 0) { + return ret; } - err = gv11b_ecc_init_sm_uncorrected_err_count(g); - if (err != 0) { - return err; + ret = gv11b_ecc_init_sm_uncorrected_err_count(g); + if (ret != 0) { + return ret; } return 0;