From 12af06ae328fde7b4d2a40b002c61d5ee4ae2f27 Mon Sep 17 00:00:00 2001 From: Vedashree Vidwans Date: Mon, 20 May 2019 16:01:59 -0700 Subject: [PATCH] gpu: nvgpu: fix MISRA 5.7 nvgpu.common.unit MISRA rule 5.7 forbids from re-using tag or identifier names multiple times. Multiple definitions of a tag or identifier may create developer confusion. Currently, enum nvgpu_unit definition is used in gk20a.h as type of function arguments without including unit.h header file. MISRA scanner considered this as two different definitions for the enum. Including correct header file resolves this issue. Jira NVGPU-3307 Change-Id: I824888084632e8897c7c0edcc2b05adfea4a6aff Signed-off-by: Vedashree Vidwans Reviewed-on: https://git-master.nvidia.com/r/2122465 Reviewed-by: mobile promotions Tested-by: mobile promotions --- drivers/gpu/nvgpu/include/nvgpu/gk20a.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/nvgpu/include/nvgpu/gk20a.h b/drivers/gpu/nvgpu/include/nvgpu/gk20a.h index 823473d10..180c26e0b 100644 --- a/drivers/gpu/nvgpu/include/nvgpu/gk20a.h +++ b/drivers/gpu/nvgpu/include/nvgpu/gk20a.h @@ -91,7 +91,6 @@ struct nvgpu_gpfifo_entry; struct vm_gk20a_mapping_batch; struct pmu_pg_stats_data; -enum nvgpu_unit; enum nvgpu_flush_op; enum gk20a_mem_rw_flag; enum nvgpu_nvlink_minion_dlcmd; @@ -120,6 +119,7 @@ enum ctxsw_addr_type; #include #include #include +#include #include "hal/clk/clk_gk20a.h"