[Intel-gfx] [PATCH 05/23] drm/i915/selftest: Make sure to init i915_ggtt_view in igt_vma_rotate_remap()
Ville Syrjälä
ville.syrjala at linux.intel.com
Thu Mar 11 16:11:39 UTC 2021
On Thu, Mar 11, 2021 at 12:17:18AM +0200, Imre Deak wrote:
> This probably doesn't cause an issue, since the code checks the view
> type dependent size of the views before comparing them, but let's follow
> the practice to bzero the whole struct when initializing it.
>
> Signed-off-by: Imre Deak <imre.deak at intel.com>
> ---
> drivers/gpu/drm/i915/selftests/i915_vma.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/gpu/drm/i915/selftests/i915_vma.c b/drivers/gpu/drm/i915/selftests/i915_vma.c
> index ffea2602a781..3d557b8a2098 100644
> --- a/drivers/gpu/drm/i915/selftests/i915_vma.c
> +++ b/drivers/gpu/drm/i915/selftests/i915_vma.c
> @@ -515,7 +515,7 @@ static int igt_vma_rotate_remap(void *arg)
> for (t = types; *t; t++) {
> for (a = planes; a->width; a++) {
> for (b = planes + ARRAY_SIZE(planes); b-- != planes; ) {
> - struct i915_ggtt_view view;
> + struct i915_ggtt_view view = { };
I tend to write these as {} w/o any whitespace. grep says my way
is the more common approach. Might be nice to unify all of them...
Reviewed-by: Ville Syrjälä <ville.syrjala at linux.intel.com>
> unsigned int n, max_offset;
>
> max_offset = max(a->stride * a->height,
> --
> 2.25.1
>
> _______________________________________________
> Intel-gfx mailing list
> Intel-gfx at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/intel-gfx
--
Ville Syrjälä
Intel
More information about the Intel-gfx
mailing list