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

Jeff Mahoney jeffm at suse.com
Mon Jul 4 15:29:17 UTC 2016


On 7/4/16 10:29 AM, Jeff Mahoney wrote:
> 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]

Oops.  It turns out my build test wasn't using gcc6.  This doesn't fix
the error.  I'll post v2 shortly.

-Jeff


> Signed-off-by: Jeff Mahoney <jeffm at suse.com>
> ---
>  drivers/gpu/drm/i915/i915_debugfs.c |    3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> --- a/drivers/gpu/drm/i915/i915_debugfs.c
> +++ b/drivers/gpu/drm/i915/i915_debugfs.c
> @@ -2101,8 +2101,9 @@ static int i915_dump_lrc(struct seq_file
>  
>  	list_for_each_entry(ctx, &dev_priv->context_list, link)
>  		if (ctx != dev_priv->kernel_context)
> -			for_each_engine(engine, dev_priv)
> +			for_each_engine(engine, dev_priv) {
>  				i915_dump_lrc_obj(m, ctx, engine);
> +			}
>  
>  	mutex_unlock(&dev->struct_mutex);
>  
> 


-- 
Jeff Mahoney
SUSE Labs

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 881 bytes
Desc: OpenPGP digital signature
URL: <https://lists.freedesktop.org/archives/intel-gfx/attachments/20160704/a5cc1bc7/attachment-0001.sig>


More information about the Intel-gfx mailing list