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

Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20231012122442.15718-6-ville.syrjala@linux.intel.com
Reviewed-by: Jani Nikula <jani.nikula@intel.com>
drivers/gpu/drm/i915/pxp/intel_pxp_gsccs.c
drivers/gpu/drm/i915/pxp/intel_pxp_huc.c
drivers/gpu/drm/i915/pxp/intel_pxp_tee.c

index 9b2cc0db2f5550eb1880ed3bee65cfefbcd30372..7f3990b3f40b2e643384e5422e5c6d0ef9ed5188 100644 (file)
@@ -208,8 +208,8 @@ int intel_pxp_gsccs_create_session(struct intel_pxp *pxp,
                                   int arb_session_id)
 {
        struct drm_i915_private *i915 = pxp->ctrl_gt->i915;
-       struct pxp43_create_arb_in msg_in = {0};
-       struct pxp43_create_arb_out msg_out = {0};
+       struct pxp43_create_arb_in msg_in = {};
+       struct pxp43_create_arb_out msg_out = {};
        int ret;
 
        msg_in.header.api_version = PXP_APIVER(4, 3);
@@ -246,8 +246,8 @@ int intel_pxp_gsccs_create_session(struct intel_pxp *pxp,
 void intel_pxp_gsccs_end_arb_fw_session(struct intel_pxp *pxp, u32 session_id)
 {
        struct drm_i915_private *i915 = pxp->ctrl_gt->i915;
-       struct pxp42_inv_stream_key_in msg_in = {0};
-       struct pxp42_inv_stream_key_out msg_out = {0};
+       struct pxp42_inv_stream_key_in msg_in = {};
+       struct pxp42_inv_stream_key_out msg_out = {};
        int ret = 0;
 
        /*
index 5eedce9169421bb0318400a82a5da33d91842bcd..0e609547bef802f31aea7869a787e9ee16864420 100644 (file)
@@ -18,8 +18,8 @@ int intel_pxp_huc_load_and_auth(struct intel_pxp *pxp)
 {
        struct intel_gt *gt;
        struct intel_huc *huc;
-       struct pxp43_start_huc_auth_in huc_in = {0};
-       struct pxp43_huc_auth_out huc_out = {0};
+       struct pxp43_start_huc_auth_in huc_in = {};
+       struct pxp43_huc_auth_out huc_out = {};
        dma_addr_t huc_phys_addr;
        u8 client_id = 0;
        u8 fence_id = 0;
index e50112645950df0367e5ef4144a2be847e71f6e9..86149edb831d2cc2e635f6bf77089528faefca1a 100644 (file)
@@ -326,8 +326,8 @@ int intel_pxp_tee_cmd_create_arb_session(struct intel_pxp *pxp,
                                         int arb_session_id)
 {
        struct drm_i915_private *i915 = pxp->ctrl_gt->i915;
-       struct pxp42_create_arb_in msg_in = {0};
-       struct pxp42_create_arb_out msg_out = {0};
+       struct pxp42_create_arb_in msg_in = {};
+       struct pxp42_create_arb_out msg_out = {};
        int ret;
 
        msg_in.header.api_version = PXP_APIVER(4, 2);
@@ -364,8 +364,8 @@ int intel_pxp_tee_cmd_create_arb_session(struct intel_pxp *pxp,
 void intel_pxp_tee_end_arb_fw_session(struct intel_pxp *pxp, u32 session_id)
 {
        struct drm_i915_private *i915 = pxp->ctrl_gt->i915;
-       struct pxp42_inv_stream_key_in msg_in = {0};
-       struct pxp42_inv_stream_key_out msg_out = {0};
+       struct pxp42_inv_stream_key_in msg_in = {};
+       struct pxp42_inv_stream_key_out msg_out = {};
        int ret, trials = 0;
 
 try_again: