summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/nvgpu/common/xve/xve_gp106.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/gpu/nvgpu/common/xve/xve_gp106.c')
-rw-r--r--drivers/gpu/nvgpu/common/xve/xve_gp106.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/drivers/gpu/nvgpu/common/xve/xve_gp106.c b/drivers/gpu/nvgpu/common/xve/xve_gp106.c
index 4f3def11..3ed02f1b 100644
--- a/drivers/gpu/nvgpu/common/xve/xve_gp106.c
+++ b/drivers/gpu/nvgpu/common/xve/xve_gp106.c
@@ -111,7 +111,7 @@ int xve_get_speed_gp106(struct gk20a *g, u32 *xve_link_speed)
111 if (link_speed == xve_link_control_status_link_speed_link_speed_8p0_v()) 111 if (link_speed == xve_link_control_status_link_speed_link_speed_8p0_v())
112 real_link_speed = GPU_XVE_SPEED_8P0; 112 real_link_speed = GPU_XVE_SPEED_8P0;
113 113
114 if (!real_link_speed) 114 if (real_link_speed == 0U)
115 return -ENODEV; 115 return -ENODEV;
116 116
117 *xve_link_speed = real_link_speed; 117 *xve_link_speed = real_link_speed;
@@ -147,7 +147,7 @@ static void set_xve_l0s_mask(struct gk20a *g, bool status)
147static void set_xve_l1_mask(struct gk20a *g, int status) 147static void set_xve_l1_mask(struct gk20a *g, int status)
148{ 148{
149 u32 xve_priv; 149 u32 xve_priv;
150 u32 status_bit = status ? 1 : 0; 150 u32 status_bit = (status != 0) ? 1 : 0;
151 151
152 xve_priv = g->ops.xve.xve_readl(g, xve_priv_xv_r()); 152 xve_priv = g->ops.xve.xve_readl(g, xve_priv_xv_r());
153 153
@@ -242,7 +242,7 @@ static int __do_xve_set_speed_gp106(struct gk20a *g, u32 next_link_speed)
242 (xp_pl_link_config_ltssm_directive_f(pl_link_config) == 242 (xp_pl_link_config_ltssm_directive_f(pl_link_config) ==
243 xp_pl_link_config_ltssm_directive_normal_operations_v())) 243 xp_pl_link_config_ltssm_directive_normal_operations_v()))
244 break; 244 break;
245 } while (!nvgpu_timeout_expired(&timeout)); 245 } while (nvgpu_timeout_expired(&timeout) == 0);
246 246
247 if (nvgpu_timeout_peek_expired(&timeout)) { 247 if (nvgpu_timeout_peek_expired(&timeout)) {
248 err_status = -ETIMEDOUT; 248 err_status = -ETIMEDOUT;
@@ -313,7 +313,7 @@ static int __do_xve_set_speed_gp106(struct gk20a *g, u32 next_link_speed)
313 if (pl_link_config == 313 if (pl_link_config ==
314 gk20a_readl(g, xp_pl_link_config_r(0))) 314 gk20a_readl(g, xp_pl_link_config_r(0)))
315 break; 315 break;
316 } while (!nvgpu_timeout_expired(&timeout)); 316 } while (nvgpu_timeout_expired(&timeout) == 0);
317 317
318 if (nvgpu_timeout_peek_expired(&timeout)) { 318 if (nvgpu_timeout_peek_expired(&timeout)) {
319 err_status = -ETIMEDOUT; 319 err_status = -ETIMEDOUT;
@@ -348,7 +348,7 @@ static int __do_xve_set_speed_gp106(struct gk20a *g, u32 next_link_speed)
348 (xp_pl_link_config_ltssm_directive_f(pl_link_config) == 348 (xp_pl_link_config_ltssm_directive_f(pl_link_config) ==
349 xp_pl_link_config_ltssm_directive_normal_operations_v())) 349 xp_pl_link_config_ltssm_directive_normal_operations_v()))
350 break; 350 break;
351 } while (!nvgpu_timeout_expired(&timeout)); 351 } while (nvgpu_timeout_expired(&timeout) == 0);
352 352
353 if (nvgpu_timeout_peek_expired(&timeout)) { 353 if (nvgpu_timeout_peek_expired(&timeout)) {
354 err_status = -ETIMEDOUT; 354 err_status = -ETIMEDOUT;