[Intel-gfx] [PATCH 2/2] drm/i915: Use int instead of u32 to cache GuC logging level

Radhakrishna Sripada radhakrishna.sripada at intel.com
Wed Apr 4 00:04:56 UTC 2018


Static code analysis tool has reported an unused check of
log_level<0 when using u32. Use int instead of u32 to store guc_log_level.

Cc: Anusha Srivatsa <anusha.srivatsa at intel.com>
Signed-off-by: Radhakrishna Sripada <radhakrishna.sripada at intel.com>
---
 drivers/gpu/drm/i915/intel_guc.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/i915/intel_guc.c b/drivers/gpu/drm/i915/intel_guc.c
index a00a59a7d9ec..eb6f0bb7c084 100644
--- a/drivers/gpu/drm/i915/intel_guc.c
+++ b/drivers/gpu/drm/i915/intel_guc.c
@@ -225,7 +225,7 @@ static u32 get_core_family(struct drm_i915_private *dev_priv)
 
 static u32 get_log_control_flags(void)
 {
-	u32 level = i915_modparams.guc_log_level;
+	int level = i915_modparams.guc_log_level;
 	u32 flags = 0;
 
 	GEM_BUG_ON(level < 0);
-- 
2.9.3



More information about the Intel-gfx mailing list