From cf7850ee33a5a9ffc32f584c7c3beefe286ceed2 Mon Sep 17 00:00:00 2001 From: Amulya Date: Wed, 29 Aug 2018 16:39:46 +0530 Subject: 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 Reviewed-on: https://git-master.nvidia.com/r/1807133 Reviewed-by: mobile promotions Tested-by: mobile promotions --- drivers/gpu/nvgpu/common/therm/therm_gp106.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'drivers/gpu/nvgpu/common/therm/therm_gp106.c') 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) readval = gk20a_readl(g, therm_temp_sensor_tsense_r()); - if (!(therm_temp_sensor_tsense_state_v(readval) & - therm_temp_sensor_tsense_state_valid_v())) { + if ((therm_temp_sensor_tsense_state_v(readval) & + therm_temp_sensor_tsense_state_valid_v()) == 0U) { nvgpu_err(g, "Attempt to read temperature while sensor is OFF!"); err = -EINVAL; -- cgit v1.2.2