[PATCH v4 02/12] drm/client: Restrict the plane_state scope

Noralf Trønnes noralf at tronnes.org
Sat Jun 15 08:52:10 UTC 2019



Den 14.06.2019 14.13, skrev Maxime Ripard:
> The drm_client_modeset_commit_atomic function uses two times the
> plane_state variable in inner blocks of code, but the variable has a scope
> global to this function.
> 
> This will lead to inadvertent devs to reuse the variable in the second
> block with the value left by the first, without any warning from the
> compiler since value would have been initialized.
> 
> Fix this by moving the variable declaration to the proper scope.
> 
> Signed-off-by: Maxime Ripard <maxime.ripard at bootlin.com>
> ---

Reviewed-by: Noralf Trønnes <noralf at tronnes.org>


More information about the dri-devel mailing list