Re: [PATCH 4/9] drm/core: Add drm_for_each_encoder_mask.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, 24 Nov 2015, Maarten Lankhorst <maarten.lankhorst@xxxxxxxxxxxxxxx> wrote:
> +#define drm_for_each_encoder_mask(encoder, dev, encoder_mask) \
> +	list_for_each_entry((encoder), &(dev)->mode_config.encoder_list, head) \
> +		if ((encoder_mask) & (1 << drm_encoder_index(encoder)))

How about

	if (!((encoder_mask) & (1 << drm_encoder_index(encoder)))); else

to avoid dangling else problems?

This inspired me to write [1].

BR,
Jani.


[1] http://patchwork.freedesktop.org/patch/msgid/1448386585-4144-1-git-send-email-jani.nikula@xxxxxxxxx


-- 
Jani Nikula, Intel Open Source Technology Center
_______________________________________________
Intel-gfx mailing list
Intel-gfx@xxxxxxxxxxxxxxxxxxxxx
http://lists.freedesktop.org/mailman/listinfo/intel-gfx




[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]
  Powered by Linux