Files
linux/drivers/gpu/drm
Nathan Chancellor ff9c674d11 drm/xe: Fix total initialization in xe_ggtt_print_holes()
Clang warns (or errors with CONFIG_DRM_WERROR or CONFIG_WERROR):

  drivers/gpu/drm/xe/xe_ggtt.c:810:3: error: variable 'total' is uninitialized when used here [-Werror,-Wuninitialized]
    810 |                 total += hole_size;
        |                 ^~~~~
  drivers/gpu/drm/xe/xe_ggtt.c:798:11: note: initialize the variable 'total' to silence this warning
    798 |         u64 total;
        |                  ^
        |                   = 0
  1 error generated.

Move the zero initialization of total from
xe_gt_sriov_pf_config_print_available_ggtt() to xe_ggtt_print_holes() to
resolve the warning.

Fixes: 136367290e ("drm/xe: Introduce xe_ggtt_print_holes")
Signed-off-by: Nathan Chancellor <nathan@kernel.org>
Reviewed-by: Lucas De Marchi <lucas.demarchi@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20240823-drm-xe-fix-total-in-xe_ggtt_print_holes-v1-1-12b02d079327@kernel.org
Signed-off-by: Lucas De Marchi <lucas.demarchi@intel.com>
2024-08-24 06:11:26 -07:00
..
2024-07-05 10:47:28 +02:00
2024-07-05 10:47:28 +02:00
2024-05-02 11:33:17 +02:00
2024-08-09 08:13:48 +02:00
2024-07-05 10:47:28 +02:00
2024-05-02 11:33:18 +02:00
2024-06-18 10:06:35 +02:00
2024-04-25 20:55:49 -07:00
2024-06-17 10:38:18 +03:00
2024-05-08 15:31:58 +03:00
2024-06-24 17:08:53 +03:00
2024-02-26 11:41:07 +01:00