[PATCH] drm/msm/dp: use ARRAY_SIZE for calculating num_descs

Stephen Boyd swboyd at chromium.org
Mon Jun 27 19:19:41 UTC 2022


Quoting Dmitry Baryshkov (2022-06-27 09:54:13)
> If for some reason the msm_dp_config::descs array starts from non-zero
> index or contains the hole, setting the msm_dp_config::num_descs might
> be not that obvious and error-prone. Use ARRAY_SIZE to set this field
> rather than encoding the value manually.
>
> Reported-by: Kuogee Hsieh <quic_khsieh at quicinc.com>
> Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov at linaro.org>
> ---

Reviewed-by: Stephen Boyd <swboyd at chromium.org>


More information about the dri-devel mailing list