[Intel-gfx] [PATCH 04/26] drm/rcar-du: Use for_each_*_in_state

Maarten Lankhorst maarten.lankhorst at linux.intel.com
Mon May 30 09:58:27 UTC 2016


Op 30-05-16 om 11:18 schreef Laurent Pinchart:
> Hi Daniel,
>
> Thank you for the patch.
>
> This looks good to me as the resulting code is mostly similar. However, the 
> for_each_*_in_state macros end with an for_each_if() that tests if the 
> object's state is NULL, which isn't present in this code. I'm wondering 
> whether that was an oversight on my side possibly leading to a crash when 
> dereferencing a NULL state, or an unneeded check in the macros. Can 
> atomic_state->*_states[i] be NULL if atomic_state->*[i] is not NULL ?
Not in any normal case.


More information about the Intel-gfx mailing list