drm/i915/gvt: Clean up zero initializers
authorVille Syrjälä <ville.syrjala@linux.intel.com>
Thu, 12 Oct 2023 12:24:42 +0000 (15:24 +0300)
committerVille Syrjälä <ville.syrjala@linux.intel.com>
Wed, 8 Nov 2023 17:51:42 +0000 (19:51 +0200)
Just use a simple {} to zero initialize arrays/structs instead
of the hodgepodge of stuff we are using currently.

Cc: Zhenyu Wang <zhenyuw@linux.intel.com>
Cc: Zhi Wang <zhi.a.wang@intel.com>
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20231012122442.15718-7-ville.syrjala@linux.intel.com
Reviewed-by: Jani Nikula <jani.nikula@intel.com>
drivers/gpu/drm/i915/gvt/cmd_parser.c
drivers/gpu/drm/i915/gvt/fb_decoder.c
drivers/gpu/drm/i915/gvt/handlers.c

index 05f9348b7a9d8ee7a11a2108e2f2439ddc7435ee..d4a3f3e093b0bc9f55416f2159e70faa6df1261a 100644 (file)
@@ -3047,7 +3047,7 @@ put_obj:
 
 static int combine_wa_ctx(struct intel_shadow_wa_ctx *wa_ctx)
 {
-       u32 per_ctx_start[CACHELINE_DWORDS] = {0};
+       u32 per_ctx_start[CACHELINE_DWORDS] = {};
        unsigned char *bb_start_sva;
 
        if (!wa_ctx->per_ctx.valid)
index 835c3fde8a202d1c05c692a8af484c76d981b745..313efdabee5729b3b28a31269e47c195a4a4fd8f 100644 (file)
@@ -56,7 +56,7 @@ static const struct pixel_format bdw_pixel_formats[] = {
        {DRM_FORMAT_XBGR8888, 32, "32-bit RGBX (8:8:8:8 MSB-X:B:G:R)"},
 
        /* non-supported format has bpp default to 0 */
-       {0, 0, NULL},
+       {}
 };
 
 static const struct pixel_format skl_pixel_formats[] = {
@@ -76,7 +76,7 @@ static const struct pixel_format skl_pixel_formats[] = {
        {DRM_FORMAT_XRGB2101010, 32, "32-bit BGRX (2:10:10:10 MSB-X:R:G:B)"},
 
        /* non-supported format has bpp default to 0 */
-       {0, 0, NULL},
+       {}
 };
 
 static int bdw_format_to_drm(int format)
@@ -293,7 +293,7 @@ static const struct cursor_mode_format cursor_pixel_formats[] = {
        {DRM_FORMAT_ARGB8888, 32, 64, 64, "64x64 32bpp ARGB"},
 
        /* non-supported format has bpp default to 0 */
-       {0, 0, 0, 0, NULL},
+       {}
 };
 
 static int cursor_mode_to_drm(int mode)
index 72addd8d380fd32b5fe41c57edae205572e232fb..90f6c1ece57d4478a30375df1725624b47449298 100644 (file)
@@ -538,7 +538,7 @@ static u32 bxt_vgpu_get_dp_bitrate(struct intel_vgpu *vgpu, enum port port)
        int refclk = vgpu->gvt->gt->i915->display.dpll.ref_clks.nssc;
        enum dpio_phy phy = DPIO_PHY0;
        enum dpio_channel ch = DPIO_CH0;
-       struct dpll clock = {0};
+       struct dpll clock = {};
        u32 temp;
 
        /* Port to PHY mapping is fixed, see bxt_ddi_phy_info{} */