gpu: nvgpu: fix MISRA Rule 2.2 no dead code

MISRA rule 2.2 defines dead code as "operations which are executed but
removal of these operations has no effect on program behavior".
Variable initializations violate this rule if initialized value is not
used and replaced.

This patch fixes some of these reported violations.

Jira NVGPU-858

Change-Id: I694517ace8884c78c63f6346e455078d19b70b4d
Signed-off-by: Vedashree Vidwans <vvidwans@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/2110459
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
This commit is contained in:
Vedashree Vidwans
2019-05-02 08:45:20 -07:00
committed by mobile promotions
parent 9a450fe2bf
commit c90fcbae2a
6 changed files with 11 additions and 16 deletions

View File

@@ -52,9 +52,8 @@
bool is_nvgpu_gpu_state_valid(struct gk20a *g)
{
u32 boot_0 = 0xffffffffU;
u32 boot_0 = nvgpu_mc_boot_0(g, NULL, NULL, NULL);
boot_0 = nvgpu_mc_boot_0(g, NULL, NULL, NULL);
if (boot_0 == 0xffffffffU) {
nvgpu_err(g, "GPU has disappeared from bus!!");
return false;