[Intel-gfx] [PATCH v2] i915: fix build error with -Werror

Jeff Mahoney jeffm at suse.com
Mon Jul 4 15:30:06 UTC 2016


This fixes the following build error with -Werror and gcc 6.1:

drivers/gpu/drm/i915/i915_debugfs.c:2103:6: error: suggest explicit braces to avoid ambiguous 'else' [-Werror=parentheses]

Signed-off-by: Jeff Mahoney <jeffm at suse.com>
---
 drivers/gpu/drm/i915/i915_debugfs.c |    7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

--- a/drivers/gpu/drm/i915/i915_debugfs.c
+++ b/drivers/gpu/drm/i915/i915_debugfs.c
@@ -2100,9 +2100,10 @@ static int i915_dump_lrc(struct seq_file
 		return ret;
 
 	list_for_each_entry(ctx, &dev_priv->context_list, link)
-		if (ctx != dev_priv->kernel_context)
+		if (ctx != dev_priv->kernel_context) {
 			for_each_engine(engine, dev_priv)
 				i915_dump_lrc_obj(m, ctx, engine);
+		}
 
 	mutex_unlock(&dev->struct_mutex);
 


-- 
Jeff Mahoney
SUSE Labs


More information about the Intel-gfx mailing list