lkml.org 
[lkml]   [2016]   [Jun]   [7]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: small patch to avoid warning in gcc 6
From
Date
On Tue, 2016-06-07 at 18:41 -0600, Reinoud Koornstra wrote:
> Hello Everybody,
>
> A small patch that doesn't really do anything other than getting rid
> of a warning in gcc 6.1.0.
>
> drivers/gpu/drm/i915/i915_debugfs.c: In function ‘i915_dump_lrc’:
> drivers/gpu/drm/i915/i915_debugfs.c:2060:6: warning: suggest explicit
> braces to avoid ambiguous ‘else’ [-Wparentheses]
>    if (ctx != dev_priv->kernel_context)
>       ^

Likely there should be 2 pairs of braces added:

list_for_each_entry(ctx, &dev_priv->context_list, link) {
if (ctx != dev_priv->kernel_context) {
                        for_each_ring(ring, dev_priv, i)
                                i915_dump_lrc_obj(m, ctx, ring);
}
}

\
 
 \ /
  Last update: 2016-06-08 03:01    [W:0.058 / U:0.040 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site