summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/nvgpu/common/therm/therm_gp106.c
diff options
context:
space:
mode:
authorAmulya <Amurthyreddy@nvidia.com>2018-08-29 07:09:46 -0400
committermobile promotions <svcmobile_promotions@nvidia.com>2018-09-05 23:40:03 -0400
commitcf7850ee33a5a9ffc32f584c7c3beefe286ceed2 (patch)
treeeaa6af1806dd3242857d41efe427f0240d7e5310 /drivers/gpu/nvgpu/common/therm/therm_gp106.c
parent2eface802a4aea417206bcdda689a65cf47d300b (diff)
nvgpu: common: MISRA 10.1 boolean fixes
Fix violations where a variable of type non-boolean is used as a boolean in gpu/nvgpu/common. JIRA NVGPU-646 Change-Id: I91baa5cf1d38081161336bde5fbc06661b741273 Signed-off-by: Amulya <Amurthyreddy@nvidia.com> Reviewed-on: https://git-master.nvidia.com/r/1807133 Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com> Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Diffstat (limited to 'drivers/gpu/nvgpu/common/therm/therm_gp106.c')
-rw-r--r--drivers/gpu/nvgpu/common/therm/therm_gp106.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/gpu/nvgpu/common/therm/therm_gp106.c b/drivers/gpu/nvgpu/common/therm/therm_gp106.c
index cc3127d7..b22cefeb 100644
--- a/drivers/gpu/nvgpu/common/therm/therm_gp106.c
+++ b/drivers/gpu/nvgpu/common/therm/therm_gp106.c
@@ -44,8 +44,8 @@ int gp106_get_internal_sensor_curr_temp(struct gk20a *g, u32 *temp_f24_8)
44 44
45 readval = gk20a_readl(g, therm_temp_sensor_tsense_r()); 45 readval = gk20a_readl(g, therm_temp_sensor_tsense_r());
46 46
47 if (!(therm_temp_sensor_tsense_state_v(readval) & 47 if ((therm_temp_sensor_tsense_state_v(readval) &
48 therm_temp_sensor_tsense_state_valid_v())) { 48 therm_temp_sensor_tsense_state_valid_v()) == 0U) {
49 nvgpu_err(g, 49 nvgpu_err(g,
50 "Attempt to read temperature while sensor is OFF!"); 50 "Attempt to read temperature while sensor is OFF!");
51 err = -EINVAL; 51 err = -EINVAL;