[PATCH 2/6] drm/i915/hdcp: Clean up zero initializers

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



From: Ville Syrjälä <ville.syrjala@xxxxxxxxxxxxxxx>

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@xxxxxxxxxxxxxxx>
---
 .../drm/i915/display/intel_hdcp_gsc_message.c | 44 +++++++++----------
 1 file changed, 21 insertions(+), 23 deletions(-)

diff --git a/drivers/gpu/drm/i915/display/intel_hdcp_gsc_message.c b/drivers/gpu/drm/i915/display/intel_hdcp_gsc_message.c
index caa9f0b25729..240b00849f3d 100644
--- a/drivers/gpu/drm/i915/display/intel_hdcp_gsc_message.c
+++ b/drivers/gpu/drm/i915/display/intel_hdcp_gsc_message.c
@@ -13,9 +13,8 @@ int
 intel_hdcp_gsc_initiate_session(struct device *dev, struct hdcp_port_data *data,
 				struct hdcp2_ake_init *ake_data)
 {
-	struct wired_cmd_initiate_hdcp2_session_in session_init_in = { { 0 } };
-	struct wired_cmd_initiate_hdcp2_session_out
-						session_init_out = { { 0 } };
+	struct wired_cmd_initiate_hdcp2_session_in session_init_in = {};
+	struct wired_cmd_initiate_hdcp2_session_out session_init_out = {};
 	struct drm_i915_private *i915;
 	ssize_t byte;
 
@@ -71,8 +70,8 @@ intel_hdcp_gsc_verify_receiver_cert_prepare_km(struct device *dev,
 					       *ek_pub_km,
 					       size_t *msg_sz)
 {
-	struct wired_cmd_verify_receiver_cert_in verify_rxcert_in = { { 0 } };
-	struct wired_cmd_verify_receiver_cert_out verify_rxcert_out = { { 0 } };
+	struct wired_cmd_verify_receiver_cert_in verify_rxcert_in = {};
+	struct wired_cmd_verify_receiver_cert_out verify_rxcert_out = {};
 	struct drm_i915_private *i915;
 	ssize_t byte;
 
@@ -134,8 +133,8 @@ int
 intel_hdcp_gsc_verify_hprime(struct device *dev, struct hdcp_port_data *data,
 			     struct hdcp2_ake_send_hprime *rx_hprime)
 {
-	struct wired_cmd_ake_send_hprime_in send_hprime_in = { { 0 } };
-	struct wired_cmd_ake_send_hprime_out send_hprime_out = { { 0 } };
+	struct wired_cmd_ake_send_hprime_in send_hprime_in = {};
+	struct wired_cmd_ake_send_hprime_out send_hprime_out = {};
 	struct drm_i915_private *i915;
 	ssize_t byte;
 
@@ -182,8 +181,8 @@ int
 intel_hdcp_gsc_store_pairing_info(struct device *dev, struct hdcp_port_data *data,
 				  struct hdcp2_ake_send_pairing_info *pairing_info)
 {
-	struct wired_cmd_ake_send_pairing_info_in pairing_info_in = { { 0 } };
-	struct wired_cmd_ake_send_pairing_info_out pairing_info_out = { { 0 } };
+	struct wired_cmd_ake_send_pairing_info_in pairing_info_in = {};
+	struct wired_cmd_ake_send_pairing_info_out pairing_info_out = {};
 	struct drm_i915_private *i915;
 	ssize_t byte;
 
@@ -233,8 +232,8 @@ intel_hdcp_gsc_initiate_locality_check(struct device *dev,
 				       struct hdcp_port_data *data,
 				       struct hdcp2_lc_init *lc_init_data)
 {
-	struct wired_cmd_init_locality_check_in lc_init_in = { { 0 } };
-	struct wired_cmd_init_locality_check_out lc_init_out = { { 0 } };
+	struct wired_cmd_init_locality_check_in lc_init_in = {};
+	struct wired_cmd_init_locality_check_out lc_init_out = {};
 	struct drm_i915_private *i915;
 	ssize_t byte;
 
@@ -279,8 +278,8 @@ int
 intel_hdcp_gsc_verify_lprime(struct device *dev, struct hdcp_port_data *data,
 			     struct hdcp2_lc_send_lprime *rx_lprime)
 {
-	struct wired_cmd_validate_locality_in verify_lprime_in = { { 0 } };
-	struct wired_cmd_validate_locality_out verify_lprime_out = { { 0 } };
+	struct wired_cmd_validate_locality_in verify_lprime_in = {};
+	struct wired_cmd_validate_locality_out verify_lprime_out = {};
 	struct drm_i915_private *i915;
 	ssize_t byte;
 
@@ -329,8 +328,8 @@ int intel_hdcp_gsc_get_session_key(struct device *dev,
 				   struct hdcp_port_data *data,
 				   struct hdcp2_ske_send_eks *ske_data)
 {
-	struct wired_cmd_get_session_key_in get_skey_in = { { 0 } };
-	struct wired_cmd_get_session_key_out get_skey_out = { { 0 } };
+	struct wired_cmd_get_session_key_in get_skey_in = {};
+	struct wired_cmd_get_session_key_out get_skey_out = {};
 	struct drm_i915_private *i915;
 	ssize_t byte;
 
@@ -381,8 +380,8 @@ intel_hdcp_gsc_repeater_check_flow_prepare_ack(struct device *dev,
 					       struct hdcp2_rep_send_ack
 					       *rep_send_ack)
 {
-	struct wired_cmd_verify_repeater_in verify_repeater_in = { { 0 } };
-	struct wired_cmd_verify_repeater_out verify_repeater_out = { { 0 } };
+	struct wired_cmd_verify_repeater_in verify_repeater_in = {};
+	struct wired_cmd_verify_repeater_out verify_repeater_out = {};
 	struct drm_i915_private *i915;
 	ssize_t byte;
 
@@ -442,8 +441,7 @@ int intel_hdcp_gsc_verify_mprime(struct device *dev,
 				 struct hdcp2_rep_stream_ready *stream_ready)
 {
 	struct wired_cmd_repeater_auth_stream_req_in *verify_mprime_in;
-	struct wired_cmd_repeater_auth_stream_req_out
-					verify_mprime_out = { { 0 } };
+	struct wired_cmd_repeater_auth_stream_req_out verify_mprime_out = {};
 	struct drm_i915_private *i915;
 	ssize_t byte;
 	size_t cmd_size;
@@ -504,8 +502,8 @@ int intel_hdcp_gsc_verify_mprime(struct device *dev,
 int intel_hdcp_gsc_enable_authentication(struct device *dev,
 					 struct hdcp_port_data *data)
 {
-	struct wired_cmd_enable_auth_in enable_auth_in = { { 0 } };
-	struct wired_cmd_enable_auth_out enable_auth_out = { { 0 } };
+	struct wired_cmd_enable_auth_in enable_auth_in = {};
+	struct wired_cmd_enable_auth_out enable_auth_out = {};
 	struct drm_i915_private *i915;
 	ssize_t byte;
 
@@ -549,8 +547,8 @@ int intel_hdcp_gsc_enable_authentication(struct device *dev,
 int
 intel_hdcp_gsc_close_session(struct device *dev, struct hdcp_port_data *data)
 {
-	struct wired_cmd_close_session_in session_close_in = { { 0 } };
-	struct wired_cmd_close_session_out session_close_out = { { 0 } };
+	struct wired_cmd_close_session_in session_close_in = {};
+	struct wired_cmd_close_session_out session_close_out = {};
 	struct drm_i915_private *i915;
 	ssize_t byte;
 
-- 
2.41.0




[Index of Archives]     [AMD Graphics]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux