Re: [PATCH 1/3] drm: Hold mode_config.lock to prevent hotplug whilst setting up crtcs

Chris Wilson
2016-11-28T14:59:30Z

On Mon, Nov 28, 2016 at 08:26:07AM +0100, Daniel Vetter wrote:
> On Wed, Nov 23, 2016 at 02:04:15PM +0000, Chris Wilson wrote:
> > +#define drm_fb_helper_for_each_connector(fbh, i__) \
> > + for (({lockdep_assert_held(&(fbh)->dev->mode_config.mutex); 1;}), \
> > + i__ = 0; i__ < (fbh)->connector_count; i__++)
> > +
>
> +1 on Jani's question.

I'm missing the question. Found it under pw

" No comments on the substance, but just curious, why is that "1;"
required there? Or is it?"

Hmm, the 1; itself isn't required. I was just uncomfortable when
thinking that ({}) evaluated to the result of the last statement, and
didn't want to contemplate what if that last statement was not valid in
that context. Appears gcc is quite happy since it is discarded and not
used as a rhs.
-Chris

--
Chris Wilson, Intel Open Source Technology Centre
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org