From d2be65315a9ebfc88e77489571a31c48b3d21284 Mon Sep 17 00:00:00 2001 From: Philip Elcan Date: Mon, 27 Aug 2018 12:45:27 -0400 Subject: gpu: nvgpu: fix some MISRA 10.3 violations Fix MISRA 10.3 violations in mclk_gp106.c. Cleanup cases where values were being assigned to narrower types. Changes in mclk_gp106.c required updates to other files to resolve errors and prevent introducing new violations. JIRA NVGPU-647 Change-Id: Ifdb03ad41d9dbf05dbcf79494ae8565fff6ee083 Signed-off-by: Philip Elcan Reviewed-on: https://git-master.nvidia.com/r/1809366 Reviewed-by: mobile promotions Tested-by: mobile promotions --- drivers/gpu/nvgpu/gk20a/gk20a.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'drivers/gpu/nvgpu/gk20a/gk20a.h') diff --git a/drivers/gpu/nvgpu/gk20a/gk20a.h b/drivers/gpu/nvgpu/gk20a/gk20a.h index e9497ea7..dd63a105 100644 --- a/drivers/gpu/nvgpu/gk20a/gk20a.h +++ b/drivers/gpu/nvgpu/gk20a/gk20a.h @@ -1653,10 +1653,10 @@ static inline bool nvgpu_is_timeouts_enabled(struct gk20a *g) return nvgpu_atomic_read(&g->timeouts_disabled_refcount) == 0; } -static inline unsigned long gk20a_get_gr_idle_timeout(struct gk20a *g) +static inline u32 gk20a_get_gr_idle_timeout(struct gk20a *g) { return nvgpu_is_timeouts_enabled(g) ? - g->gr_idle_timeout_default : ULONG_MAX; + g->gr_idle_timeout_default : UINT_MAX; } #define MULTICHAR_TAG(a, b, c, d) (((a) << 24) | ((b) << 16) | ((c) << 8) | (d)) -- cgit v1.2.2