From d29afd2c9e990799b470bb95a97935cf5b5020db Mon Sep 17 00:00:00 2001 From: Terje Bergstrom Date: Wed, 9 Nov 2016 15:53:16 -0800 Subject: gpu: nvgpu: Fix signed comparison bugs Fix small problems related to signed versus unsigned comparisons throughout the driver. Bump up the warning level to prevent such problems from occuring in future. Change-Id: I8ff5efb419f664e8a2aedadd6515ae4d18502ae0 Signed-off-by: Terje Bergstrom Reviewed-on: http://git-master/r/1252068 Reviewed-by: mobile promotions Tested-by: mobile promotions --- drivers/gpu/nvgpu/gm20b/gr_gm20b.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'drivers/gpu/nvgpu/gm20b/gr_gm20b.c') diff --git a/drivers/gpu/nvgpu/gm20b/gr_gm20b.c b/drivers/gpu/nvgpu/gm20b/gr_gm20b.c index 56812fa6..cff0774d 100644 --- a/drivers/gpu/nvgpu/gm20b/gr_gm20b.c +++ b/drivers/gpu/nvgpu/gm20b/gr_gm20b.c @@ -548,11 +548,11 @@ static void gr_gm20b_load_tpc_mask(struct gk20a *g) fuse_tpc_mask = g->ops.gr.get_gpc_tpc_mask(g, 0); if (g->tpc_fs_mask_user && g->tpc_fs_mask_user != fuse_tpc_mask && - fuse_tpc_mask == (0x1 << g->gr.max_tpc_count) - 1) { + fuse_tpc_mask == (0x1U << g->gr.max_tpc_count) - 1U) { u32 val = g->tpc_fs_mask_user; - val &= (0x1 << g->gr.max_tpc_count) - 1; + val &= (0x1U << g->gr.max_tpc_count) - 1U; /* skip tpc to disable the other tpc cause channel timeout */ - val = (0x1 << hweight32(val)) - 1; + val = (0x1U << hweight32(val)) - 1U; gk20a_writel(g, gr_fe_tpc_fs_r(), val); } else { gk20a_writel(g, gr_fe_tpc_fs_r(), pes_tpc_mask); -- cgit v1.2.2