From patchwork Thu Oct 12 12:24:37 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?b?VmlsbGUgU3lyasOkbMOk?= X-Patchwork-Id: 13419211 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id BB925CDB47E for ; Thu, 12 Oct 2023 12:24:51 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 5FB5410E11C; Thu, 12 Oct 2023 12:24:50 +0000 (UTC) Received: from mgamail.intel.com (mgamail.intel.com [192.55.52.93]) by gabe.freedesktop.org (Postfix) with ESMTPS id EDC6A10E11C for ; Thu, 12 Oct 2023 12:24:48 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1697113488; x=1728649488; h=from:to:subject:date:message-id:in-reply-to:references: mime-version:content-transfer-encoding; bh=fck2ruw0HgvcL40Ps6jbMrIdAnrVPpjO+0wP2Hr52y8=; b=gLeV8ZD6r59cOnQMxtT0w6ZmSOkrAqZv8bnjZbchA59q3GNSPaRPZg8o Bv0C+1VAxQ+CNk86yMm4jgpwu7t1VktL5Vtu/FTw0IMqGKw7/UFDJsGE9 4e2HjX4jYo6Cf4mpqK8LWvJx5LNFPOwDUm8j62Cmgkic802MmucqAdBjm wqERBd9+EOvgNNPCUpdrTaeGoia6aAmSwMkSR0EHTTO3j/b4RIraKhvFD VaNQdGq/pbjz2ht76rEf/o1YJWOsxWrIZXwcereQ8ZRXBXuHsv9rRcCpn MP+xoJIPBG6cZZTSSva7YzvZrQvWYUSqFxHiZvjYjn8PcXfxMoprsN9te A==; X-IronPort-AV: E=McAfee;i="6600,9927,10861"; a="382140838" X-IronPort-AV: E=Sophos;i="6.03,218,1694761200"; d="scan'208";a="382140838" Received: from fmsmga003.fm.intel.com ([10.253.24.29]) by fmsmga102.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 12 Oct 2023 05:24:48 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10861"; a="844978982" X-IronPort-AV: E=Sophos;i="6.03,218,1694761200"; d="scan'208";a="844978982" Received: from stinkpipe.fi.intel.com (HELO stinkbox) ([10.237.72.74]) by FMSMGA003.fm.intel.com with SMTP; 12 Oct 2023 05:24:46 -0700 Received: by stinkbox (sSMTP sendmail emulation); Thu, 12 Oct 2023 15:24:45 +0300 From: Ville Syrjala To: intel-gfx@lists.freedesktop.org Date: Thu, 12 Oct 2023 15:24:37 +0300 Message-ID: <20231012122442.15718-2-ville.syrjala@linux.intel.com> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20231012122442.15718-1-ville.syrjala@linux.intel.com> References: <20231012122442.15718-1-ville.syrjala@linux.intel.com> MIME-Version: 1.0 Subject: [Intel-gfx] [PATCH 1/6] drm/i915/display: Clean up zero initializers X-BeenThere: intel-gfx@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Intel graphics driver community testing & development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: intel-gfx-bounces@lists.freedesktop.org Sender: "Intel-gfx" From: Ville Syrjälä 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ä --- drivers/gpu/drm/i915/display/intel_acpi.c | 2 +- drivers/gpu/drm/i915/display/intel_cx0_phy.c | 2 +- drivers/gpu/drm/i915/display/intel_dp.c | 6 +++--- drivers/gpu/drm/i915/display/intel_dp_aux_backlight.c | 4 ++-- drivers/gpu/drm/i915/display/intel_dp_mst.c | 2 +- drivers/gpu/drm/i915/display/intel_gmbus.c | 2 +- drivers/gpu/drm/i915/display/intel_plane_initial.c | 2 +- drivers/gpu/drm/i915/display/intel_sdvo.c | 2 +- drivers/gpu/drm/i915/display/intel_snps_phy.c | 2 +- drivers/gpu/drm/i915/display/intel_wm.c | 2 +- 10 files changed, 13 insertions(+), 13 deletions(-) diff --git a/drivers/gpu/drm/i915/display/intel_acpi.c b/drivers/gpu/drm/i915/display/intel_acpi.c index 9df78e7caa2b..0aa3999374e2 100644 --- a/drivers/gpu/drm/i915/display/intel_acpi.c +++ b/drivers/gpu/drm/i915/display/intel_acpi.c @@ -153,7 +153,7 @@ static acpi_handle intel_dsm_pci_probe(struct pci_dev *pdev) static bool intel_dsm_detect(void) { acpi_handle dhandle = NULL; - char acpi_method_name[255] = { 0 }; + char acpi_method_name[255] = {}; struct acpi_buffer buffer = {sizeof(acpi_method_name), acpi_method_name}; struct pci_dev *pdev = NULL; int vga_count = 0; diff --git a/drivers/gpu/drm/i915/display/intel_cx0_phy.c b/drivers/gpu/drm/i915/display/intel_cx0_phy.c index 6e6a1818071e..d414f6b7f993 100644 --- a/drivers/gpu/drm/i915/display/intel_cx0_phy.c +++ b/drivers/gpu/drm/i915/display/intel_cx0_phy.c @@ -3009,7 +3009,7 @@ void intel_c10pll_state_verify(struct intel_atomic_state *state, struct drm_i915_private *i915 = to_i915(state->base.dev); const struct intel_crtc_state *new_crtc_state = intel_atomic_get_new_crtc_state(state, crtc); - struct intel_c10pll_state mpllb_hw_state = { 0 }; + struct intel_c10pll_state mpllb_hw_state = {}; const struct intel_c10pll_state *mpllb_sw_state = &new_crtc_state->cx0pll_state.c10; struct intel_encoder *encoder; enum phy phy; diff --git a/drivers/gpu/drm/i915/display/intel_dp.c b/drivers/gpu/drm/i915/display/intel_dp.c index 4f6835a7578e..cb87687f5f10 100644 --- a/drivers/gpu/drm/i915/display/intel_dp.c +++ b/drivers/gpu/drm/i915/display/intel_dp.c @@ -1581,7 +1581,7 @@ int intel_dp_dsc_compute_max_bpp(struct intel_dp *intel_dp, u8 max_req_bpc) { struct drm_i915_private *i915 = dp_to_i915(intel_dp); int i, num_bpc; - u8 dsc_bpc[3] = {0}; + u8 dsc_bpc[3] = {}; u8 dsc_max_bpc; dsc_max_bpc = intel_dp_dsc_max_src_input_bpc(i915); @@ -2003,7 +2003,7 @@ static int intel_dp_dsc_compute_pipe_bpp(struct intel_dp *intel_dp, u8 max_req_bpc = conn_state->max_requested_bpc; u8 dsc_max_bpc, dsc_max_bpp; u8 dsc_min_bpc, dsc_min_bpp; - u8 dsc_bpc[3] = {0}; + u8 dsc_bpc[3] = {}; int forced_bpp, pipe_bpp; int num_bpc, i, ret; @@ -2933,7 +2933,7 @@ intel_edp_init_source_oui(struct intel_dp *intel_dp, bool careful) { struct drm_i915_private *i915 = dp_to_i915(intel_dp); u8 oui[] = { 0x00, 0xaa, 0x01 }; - u8 buf[3] = { 0 }; + u8 buf[3] = {}; /* * During driver init, we want to be careful and avoid changing the source OUI if it's diff --git a/drivers/gpu/drm/i915/display/intel_dp_aux_backlight.c b/drivers/gpu/drm/i915/display/intel_dp_aux_backlight.c index 95cc5251843e..26ea7e9f1b89 100644 --- a/drivers/gpu/drm/i915/display/intel_dp_aux_backlight.c +++ b/drivers/gpu/drm/i915/display/intel_dp_aux_backlight.c @@ -169,7 +169,7 @@ intel_dp_aux_hdr_get_backlight(struct intel_connector *connector, enum pipe pipe struct intel_panel *panel = &connector->panel; struct intel_dp *intel_dp = enc_to_intel_dp(connector->encoder); u8 tmp; - u8 buf[2] = { 0 }; + u8 buf[2] = {}; if (drm_dp_dpcd_readb(&intel_dp->aux, INTEL_EDP_HDR_GETSET_CTRL_PARAMS, &tmp) != 1) { drm_err(&i915->drm, "[CONNECTOR:%d:%s] Failed to read current backlight mode from DPCD\n", @@ -204,7 +204,7 @@ intel_dp_aux_hdr_set_aux_backlight(const struct drm_connector_state *conn_state, struct intel_connector *connector = to_intel_connector(conn_state->connector); struct drm_device *dev = connector->base.dev; struct intel_dp *intel_dp = enc_to_intel_dp(connector->encoder); - u8 buf[4] = { 0 }; + u8 buf[4] = {}; buf[0] = level & 0xFF; buf[1] = (level & 0xFF00) >> 8; diff --git a/drivers/gpu/drm/i915/display/intel_dp_mst.c b/drivers/gpu/drm/i915/display/intel_dp_mst.c index 73e397736463..2f5e50506088 100644 --- a/drivers/gpu/drm/i915/display/intel_dp_mst.c +++ b/drivers/gpu/drm/i915/display/intel_dp_mst.c @@ -194,7 +194,7 @@ static int intel_dp_dsc_mst_compute_link_config(struct intel_encoder *encoder, &crtc_state->hw.adjusted_mode; int slots = -EINVAL; int i, num_bpc; - u8 dsc_bpc[3] = {0}; + u8 dsc_bpc[3] = {}; int min_bpp, max_bpp, sink_min_bpp, sink_max_bpp; u8 dsc_max_bpc; bool need_timeslot_recalc = false; diff --git a/drivers/gpu/drm/i915/display/intel_gmbus.c b/drivers/gpu/drm/i915/display/intel_gmbus.c index 801fabbccf7e..40d7b6f3f489 100644 --- a/drivers/gpu/drm/i915/display/intel_gmbus.c +++ b/drivers/gpu/drm/i915/display/intel_gmbus.c @@ -781,7 +781,7 @@ int intel_gmbus_output_aksv(struct i2c_adapter *adapter) struct intel_gmbus *bus = to_intel_gmbus(adapter); struct drm_i915_private *i915 = bus->i915; u8 cmd = DRM_HDCP_DDC_AKSV; - u8 buf[DRM_HDCP_KSV_LEN] = { 0 }; + u8 buf[DRM_HDCP_KSV_LEN] = {}; struct i2c_msg msgs[] = { { .addr = DRM_HDCP_DDC_ADDR, diff --git a/drivers/gpu/drm/i915/display/intel_plane_initial.c b/drivers/gpu/drm/i915/display/intel_plane_initial.c index 451a642e106e..a55c09cbd0e4 100644 --- a/drivers/gpu/drm/i915/display/intel_plane_initial.c +++ b/drivers/gpu/drm/i915/display/intel_plane_initial.c @@ -166,7 +166,7 @@ intel_alloc_initial_plane_obj(struct intel_crtc *crtc, { struct drm_device *dev = crtc->base.dev; struct drm_i915_private *dev_priv = to_i915(dev); - struct drm_mode_fb_cmd2 mode_cmd = { 0 }; + struct drm_mode_fb_cmd2 mode_cmd = {}; struct drm_framebuffer *fb = &plane_config->fb->base; struct i915_vma *vma; diff --git a/drivers/gpu/drm/i915/display/intel_sdvo.c b/drivers/gpu/drm/i915/display/intel_sdvo.c index 35137e978591..a636f42ceae5 100644 --- a/drivers/gpu/drm/i915/display/intel_sdvo.c +++ b/drivers/gpu/drm/i915/display/intel_sdvo.c @@ -649,7 +649,7 @@ intel_sdvo_get_value(struct intel_sdvo *intel_sdvo, u8 cmd, void *value, int len static bool intel_sdvo_set_target_input(struct intel_sdvo *intel_sdvo) { - struct intel_sdvo_set_target_input_args targets = {0}; + struct intel_sdvo_set_target_input_args targets = {}; return intel_sdvo_set_value(intel_sdvo, SDVO_CMD_SET_TARGET_INPUT, &targets, sizeof(targets)); diff --git a/drivers/gpu/drm/i915/display/intel_snps_phy.c b/drivers/gpu/drm/i915/display/intel_snps_phy.c index c0285365efae..ce5a73a4cc89 100644 --- a/drivers/gpu/drm/i915/display/intel_snps_phy.c +++ b/drivers/gpu/drm/i915/display/intel_snps_phy.c @@ -1998,7 +1998,7 @@ void intel_mpllb_state_verify(struct intel_atomic_state *state, struct drm_i915_private *i915 = to_i915(state->base.dev); const struct intel_crtc_state *new_crtc_state = intel_atomic_get_new_crtc_state(state, crtc); - struct intel_mpllb_state mpllb_hw_state = { 0 }; + struct intel_mpllb_state mpllb_hw_state = {}; const struct intel_mpllb_state *mpllb_sw_state = &new_crtc_state->mpllb_state; struct intel_encoder *encoder; diff --git a/drivers/gpu/drm/i915/display/intel_wm.c b/drivers/gpu/drm/i915/display/intel_wm.c index b615449e70b4..82c4933ad507 100644 --- a/drivers/gpu/drm/i915/display/intel_wm.c +++ b/drivers/gpu/drm/i915/display/intel_wm.c @@ -290,7 +290,7 @@ static ssize_t wm_latency_write(struct file *file, const char __user *ubuf, { struct seq_file *m = file->private_data; struct drm_i915_private *dev_priv = m->private; - u16 new[8] = { 0 }; + u16 new[8] = {}; int level; int ret; char tmp[32]; From patchwork Thu Oct 12 12:24:38 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?b?VmlsbGUgU3lyasOkbMOk?= X-Patchwork-Id: 13419213 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 35438CDB482 for ; Thu, 12 Oct 2023 12:24:55 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id C157410E13C; Thu, 12 Oct 2023 12:24:54 +0000 (UTC) Received: from mgamail.intel.com (mgamail.intel.com [192.55.52.93]) by gabe.freedesktop.org (Postfix) with ESMTPS id 9239810E13C for ; Thu, 12 Oct 2023 12:24:51 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1697113491; x=1728649491; h=from:to:subject:date:message-id:in-reply-to:references: mime-version:content-transfer-encoding; bh=qljeMlPVqMwOgZA6AVSfICILXTi2+xKFh/0EBDNggWI=; b=LX9mNVDiYLGfbBtyKZ518JdYKZujltDlNJkFLm7b9NSRGd8pFGBWJAtg ND4zJSXGb+yZzxGhLp7FLMo5xtXYXgqSDPeMTpv1cNNIC3L4Qr5uADiGt djwHnV6g6ZXnWFxPQzhaZlYBeSqWDZ5szLNi1475JTFfjyOpsdgv/D8oB i+xRtWoVVMl26L5lm2dgrgn/R4bXE1VAw57C36JlXQWCZhd45zGcNBidD 0PbfDZfxTUXP7wOZqECY4WdQtnuSSe33VGqGEKH71/w31f8J5raDrwr6j 59vilIu2TqOAnaIFWb7+4KP1loTtwO19hb/zUXbHMnHgUKGTBCum+gf9D g==; X-IronPort-AV: E=McAfee;i="6600,9927,10861"; a="382140842" X-IronPort-AV: E=Sophos;i="6.03,218,1694761200"; d="scan'208";a="382140842" Received: from fmsmga003.fm.intel.com ([10.253.24.29]) by fmsmga102.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 12 Oct 2023 05:24:51 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10861"; a="844978995" X-IronPort-AV: E=Sophos;i="6.03,218,1694761200"; d="scan'208";a="844978995" Received: from stinkpipe.fi.intel.com (HELO stinkbox) ([10.237.72.74]) by FMSMGA003.fm.intel.com with SMTP; 12 Oct 2023 05:24:49 -0700 Received: by stinkbox (sSMTP sendmail emulation); Thu, 12 Oct 2023 15:24:48 +0300 From: Ville Syrjala To: intel-gfx@lists.freedesktop.org Date: Thu, 12 Oct 2023 15:24:38 +0300 Message-ID: <20231012122442.15718-3-ville.syrjala@linux.intel.com> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20231012122442.15718-1-ville.syrjala@linux.intel.com> References: <20231012122442.15718-1-ville.syrjala@linux.intel.com> MIME-Version: 1.0 Subject: [Intel-gfx] [PATCH 2/6] drm/i915/hdcp: Clean up zero initializers X-BeenThere: intel-gfx@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Intel graphics driver community testing & development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: intel-gfx-bounces@lists.freedesktop.org Sender: "Intel-gfx" From: Ville Syrjälä 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ä --- .../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; From patchwork Thu Oct 12 12:24:39 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?b?VmlsbGUgU3lyasOkbMOk?= X-Patchwork-Id: 13419212 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 6A504C41513 for ; Thu, 12 Oct 2023 12:24:56 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id EB1D910E4B9; Thu, 12 Oct 2023 12:24:55 +0000 (UTC) Received: from mgamail.intel.com (mgamail.intel.com [192.55.52.93]) by gabe.freedesktop.org (Postfix) with ESMTPS id 80F4410E13C for ; Thu, 12 Oct 2023 12:24:54 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1697113494; x=1728649494; h=from:to:subject:date:message-id:in-reply-to:references: mime-version:content-transfer-encoding; bh=mDjxN41u7P02d+995R8F8nlKl7+pcQBRsj84Fe4cPPw=; b=P7Agg7ogV8zw4/eO6BGQEIw+D5+P8H9biBTnJjFegnkp9RLU5nzFTIaZ dq4Y57RGmdwiWXqEjRUq//NtNTK6a+hdyZf4A4VeUjKhiMTS7e9L2cyud krAjziluaGBCQhS8FzWAbnuTFtioMh17oNYPf0cXt7ANnVL7vfPA1zi1o eZPRONscexgz0Ylqt5ZSihytlnovMG4DoNuNZCfbNWJ3TZhgBOkuMEa1j fzObSTqOkQsAr4RYMEifAS0yY9dyuikAdrDMszPasRcTTvb6bfsw390MQ aNmFgBMWMaO6YZijDXG+iGFce3kgHb5r8mReAy9lKxvpugeyAcoHVsYZY w==; X-IronPort-AV: E=McAfee;i="6600,9927,10861"; a="382140850" X-IronPort-AV: E=Sophos;i="6.03,218,1694761200"; d="scan'208";a="382140850" Received: from fmsmga003.fm.intel.com ([10.253.24.29]) by fmsmga102.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 12 Oct 2023 05:24:54 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10861"; a="844979017" X-IronPort-AV: E=Sophos;i="6.03,218,1694761200"; d="scan'208";a="844979017" Received: from stinkpipe.fi.intel.com (HELO stinkbox) ([10.237.72.74]) by FMSMGA003.fm.intel.com with SMTP; 12 Oct 2023 05:24:52 -0700 Received: by stinkbox (sSMTP sendmail emulation); Thu, 12 Oct 2023 15:24:51 +0300 From: Ville Syrjala To: intel-gfx@lists.freedesktop.org Date: Thu, 12 Oct 2023 15:24:39 +0300 Message-ID: <20231012122442.15718-4-ville.syrjala@linux.intel.com> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20231012122442.15718-1-ville.syrjala@linux.intel.com> References: <20231012122442.15718-1-ville.syrjala@linux.intel.com> MIME-Version: 1.0 Subject: [Intel-gfx] [PATCH 3/6] drm/i915/guc: Clean up zero initializers X-BeenThere: intel-gfx@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Intel graphics driver community testing & development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: intel-gfx-bounces@lists.freedesktop.org Sender: "Intel-gfx" From: Ville Syrjälä 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ä --- drivers/gpu/drm/i915/gt/uc/intel_guc_capture.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/i915/gt/uc/intel_guc_capture.c b/drivers/gpu/drm/i915/gt/uc/intel_guc_capture.c index 331cec07c125..a4da0208c883 100644 --- a/drivers/gpu/drm/i915/gt/uc/intel_guc_capture.c +++ b/drivers/gpu/drm/i915/gt/uc/intel_guc_capture.c @@ -1101,8 +1101,8 @@ guc_capture_create_prealloc_nodes(struct intel_guc *guc) static int guc_capture_extract_reglists(struct intel_guc *guc, struct __guc_capture_bufstate *buf) { - struct guc_state_capture_group_header_t ghdr = {0}; - struct guc_state_capture_header_t hdr = {0}; + struct guc_state_capture_group_header_t ghdr = {}; + struct guc_state_capture_header_t hdr = {}; struct __guc_capture_parsed_output *node = NULL; struct guc_mmio_reg *regs = NULL; int i, numlists, numregs, ret = 0; From patchwork Thu Oct 12 12:24:40 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?b?VmlsbGUgU3lyasOkbMOk?= X-Patchwork-Id: 13419214 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 80900CDB46E for ; Thu, 12 Oct 2023 12:25:00 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 12E4110E4C2; Thu, 12 Oct 2023 12:25:00 +0000 (UTC) Received: from mgamail.intel.com (mgamail.intel.com [192.55.52.93]) by gabe.freedesktop.org (Postfix) with ESMTPS id 7380A10E4C2 for ; Thu, 12 Oct 2023 12:24:57 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1697113497; x=1728649497; h=from:to:subject:date:message-id:in-reply-to:references: mime-version:content-transfer-encoding; bh=mUhBDLnHNV/nzgR2GRUwF2xzRh4dR88UaBXEs1pb5aA=; b=bZBy/BpA01zmQsmGBrZdriIf97l26MwEd3ZisrwWHQwiC0gkVAzqceMB WSG1xvMDDApWfU/QAjNLYbpiEnvYdImytBaDMJ7NkyoFvgubhKnxrgrTh iULPuUcl5+AyQfD4SL+k+y9+fcp7NVVsH+kSXZNj+7tRgcrEz2pNE7Y6L gu39dMvfkTyBJjC9UAfKRnCTamMZPVS0RqVr/m4/oKa0s+oLvlRbRpZAX uAipZnmPjK0zllRqhctk/pkvUPg9sEBZH9wUKUXWWvk4SNFUVKpBBAwFG rdBWldzt9nido5G4pIqcYyPEi4/rAPufez+pquSgkqwdmTw+EY8hg8xZ8 A==; X-IronPort-AV: E=McAfee;i="6600,9927,10861"; a="382140854" X-IronPort-AV: E=Sophos;i="6.03,218,1694761200"; d="scan'208";a="382140854" Received: from fmsmga003.fm.intel.com ([10.253.24.29]) by fmsmga102.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 12 Oct 2023 05:24:57 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10861"; a="844979054" X-IronPort-AV: E=Sophos;i="6.03,218,1694761200"; d="scan'208";a="844979054" Received: from stinkpipe.fi.intel.com (HELO stinkbox) ([10.237.72.74]) by FMSMGA003.fm.intel.com with SMTP; 12 Oct 2023 05:24:55 -0700 Received: by stinkbox (sSMTP sendmail emulation); Thu, 12 Oct 2023 15:24:54 +0300 From: Ville Syrjala To: intel-gfx@lists.freedesktop.org Date: Thu, 12 Oct 2023 15:24:40 +0300 Message-ID: <20231012122442.15718-5-ville.syrjala@linux.intel.com> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20231012122442.15718-1-ville.syrjala@linux.intel.com> References: <20231012122442.15718-1-ville.syrjala@linux.intel.com> MIME-Version: 1.0 Subject: [Intel-gfx] [PATCH 4/6] drm/i915/pci: Clean up zero initializers X-BeenThere: intel-gfx@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Intel graphics driver community testing & development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: intel-gfx-bounces@lists.freedesktop.org Sender: "Intel-gfx" From: Ville Syrjälä 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ä --- drivers/gpu/drm/i915/i915_pci.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/i915/i915_pci.c b/drivers/gpu/drm/i915/i915_pci.c index df7c261410f7..454467cfa52b 100644 --- a/drivers/gpu/drm/i915/i915_pci.c +++ b/drivers/gpu/drm/i915/i915_pci.c @@ -923,7 +923,7 @@ static const struct pci_device_id pciidlist[] = { INTEL_DG2_IDS(&dg2_info), INTEL_ATS_M_IDS(&ats_m_info), INTEL_MTL_IDS(&mtl_info), - {0, 0, 0} + {} }; MODULE_DEVICE_TABLE(pci, pciidlist); From patchwork Thu Oct 12 12:24:41 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?b?VmlsbGUgU3lyasOkbMOk?= X-Patchwork-Id: 13419215 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 5FB70CDB47E for ; Thu, 12 Oct 2023 12:25:02 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id E9BCF10E4C9; Thu, 12 Oct 2023 12:25:01 +0000 (UTC) Received: from mgamail.intel.com (mgamail.intel.com [192.55.52.93]) by gabe.freedesktop.org (Postfix) with ESMTPS id 883F110E4C9 for ; Thu, 12 Oct 2023 12:25:00 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1697113500; x=1728649500; h=from:to:subject:date:message-id:in-reply-to:references: mime-version:content-transfer-encoding; bh=jo0z0ZdgeuC7yAPkPXQNUg2LXkblkM3rgd7g2cBzt40=; b=iCq+40SDT+g+ZTOfwnQDha/Iu61qOqOO85DVCklT1YRXJzyY0Vcvr2gh q6vnKScvWee7T3MJQXcFZcrK56WZhclYBx5noB9Y8vW04x1G2X/19aLQZ IB0tXDCYn95lOgDpQbk6HONcZukyxVGVEffmRDstEE3IuLeasKwgkwDDz RacD1NsPb/lS41PGVomLIngswrX3ES/FFhri5+zVucvEDO2HLgDMWHcWY chSEoAHkxhdBIjqbPXQijQ3jBCxSySFWnM3wCLPPAXwP+0ffT4GkJqrJS dZMzzkgPGs9oDFnqcPQhEKJ+so4/Vnr5EYZ51HU5tjVFy3B3MNf9zV0j4 Q==; X-IronPort-AV: E=McAfee;i="6600,9927,10861"; a="382140860" X-IronPort-AV: E=Sophos;i="6.03,218,1694761200"; d="scan'208";a="382140860" Received: from fmsmga003.fm.intel.com ([10.253.24.29]) by fmsmga102.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 12 Oct 2023 05:25:00 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10861"; a="844979071" X-IronPort-AV: E=Sophos;i="6.03,218,1694761200"; d="scan'208";a="844979071" Received: from stinkpipe.fi.intel.com (HELO stinkbox) ([10.237.72.74]) by FMSMGA003.fm.intel.com with SMTP; 12 Oct 2023 05:24:58 -0700 Received: by stinkbox (sSMTP sendmail emulation); Thu, 12 Oct 2023 15:24:57 +0300 From: Ville Syrjala To: intel-gfx@lists.freedesktop.org Date: Thu, 12 Oct 2023 15:24:41 +0300 Message-ID: <20231012122442.15718-6-ville.syrjala@linux.intel.com> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20231012122442.15718-1-ville.syrjala@linux.intel.com> References: <20231012122442.15718-1-ville.syrjala@linux.intel.com> MIME-Version: 1.0 Subject: [Intel-gfx] [PATCH 5/6] drm/i915/pxp: Clean up zero initializers X-BeenThere: intel-gfx@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Intel graphics driver community testing & development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: intel-gfx-bounces@lists.freedesktop.org Sender: "Intel-gfx" From: Ville Syrjälä 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ä --- drivers/gpu/drm/i915/pxp/intel_pxp_gsccs.c | 8 ++++---- drivers/gpu/drm/i915/pxp/intel_pxp_huc.c | 4 ++-- drivers/gpu/drm/i915/pxp/intel_pxp_tee.c | 8 ++++---- 3 files changed, 10 insertions(+), 10 deletions(-) diff --git a/drivers/gpu/drm/i915/pxp/intel_pxp_gsccs.c b/drivers/gpu/drm/i915/pxp/intel_pxp_gsccs.c index 27402ecf0457..75df959b0aa0 100644 --- a/drivers/gpu/drm/i915/pxp/intel_pxp_gsccs.c +++ b/drivers/gpu/drm/i915/pxp/intel_pxp_gsccs.c @@ -209,8 +209,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); @@ -247,8 +247,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; /* diff --git a/drivers/gpu/drm/i915/pxp/intel_pxp_huc.c b/drivers/gpu/drm/i915/pxp/intel_pxp_huc.c index 5eedce916942..0e609547bef8 100644 --- a/drivers/gpu/drm/i915/pxp/intel_pxp_huc.c +++ b/drivers/gpu/drm/i915/pxp/intel_pxp_huc.c @@ -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; diff --git a/drivers/gpu/drm/i915/pxp/intel_pxp_tee.c b/drivers/gpu/drm/i915/pxp/intel_pxp_tee.c index bb58fa9579b8..9327701da1b5 100644 --- a/drivers/gpu/drm/i915/pxp/intel_pxp_tee.c +++ b/drivers/gpu/drm/i915/pxp/intel_pxp_tee.c @@ -327,8 +327,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); @@ -365,8 +365,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: From patchwork Thu Oct 12 12:24:42 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?b?VmlsbGUgU3lyasOkbMOk?= X-Patchwork-Id: 13419216 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 2AA5ECDB47E for ; Thu, 12 Oct 2023 12:25:07 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id C69FD10E4CB; Thu, 12 Oct 2023 12:25:06 +0000 (UTC) Received: from mgamail.intel.com (mgamail.intel.com [192.55.52.93]) by gabe.freedesktop.org (Postfix) with ESMTPS id 49DB310E189 for ; Thu, 12 Oct 2023 12:25:04 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1697113504; x=1728649504; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=1dQPOQz1UhWUZyDEZjCHkB6/VWhW/MduLcKgI5RPrSU=; b=XpBXOHaR1kNdDJ+UgjX9OWr7WpXsC4cbxVf3a6AK2tuaUIaeQ4V+jhAa fHyMBuB33Vc8Z+rkGfIQYhoMkBOKbKZmLAR/RGLTyBDgKYMnFY0fOc7SY +HYSujTAPOW7CarGa2Y0b4n42/GQO/MMM+P2rNSqHvG+1Sk6EdKN5m0xz ccjLn2ZWzWT8n7PMUtyR5jFRbWtSjJBwe/3nYr9wipSyWRaah20Wbawn1 GJBAM4G3XaKKXOnriYvBMRwYGuf+K6O8hnksfS0ToTiE0FVjwZG3IVc4s G1iTvuTYmcMBWa5W5RS7TiyhCz1yfAXRtoOr7snCbMdvUSy5Fg+ttS0QA g==; X-IronPort-AV: E=McAfee;i="6600,9927,10861"; a="382140877" X-IronPort-AV: E=Sophos;i="6.03,218,1694761200"; d="scan'208";a="382140877" Received: from fmsmga003.fm.intel.com ([10.253.24.29]) by fmsmga102.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 12 Oct 2023 05:25:04 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10861"; a="844979172" X-IronPort-AV: E=Sophos;i="6.03,218,1694761200"; d="scan'208";a="844979172" Received: from stinkpipe.fi.intel.com (HELO stinkbox) ([10.237.72.74]) by FMSMGA003.fm.intel.com with SMTP; 12 Oct 2023 05:25:01 -0700 Received: by stinkbox (sSMTP sendmail emulation); Thu, 12 Oct 2023 15:25:00 +0300 From: Ville Syrjala To: intel-gfx@lists.freedesktop.org Date: Thu, 12 Oct 2023 15:24:42 +0300 Message-ID: <20231012122442.15718-7-ville.syrjala@linux.intel.com> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20231012122442.15718-1-ville.syrjala@linux.intel.com> References: <20231012122442.15718-1-ville.syrjala@linux.intel.com> MIME-Version: 1.0 Subject: [Intel-gfx] [PATCH 6/6] drm/i915/gvt: Clean up zero initializers X-BeenThere: intel-gfx@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Intel graphics driver community testing & development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: intel-gfx-bounces@lists.freedesktop.org Sender: "Intel-gfx" From: Ville Syrjälä Just use a simple {} to zero initialize arrays/structs instead of the hodgepodge of stuff we are using currently. Cc: Zhenyu Wang Cc: Zhi Wang Signed-off-by: Ville Syrjälä --- drivers/gpu/drm/i915/gvt/cmd_parser.c | 2 +- drivers/gpu/drm/i915/gvt/fb_decoder.c | 6 +++--- drivers/gpu/drm/i915/gvt/handlers.c | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/drivers/gpu/drm/i915/gvt/cmd_parser.c b/drivers/gpu/drm/i915/gvt/cmd_parser.c index 05f9348b7a9d..d4a3f3e093b0 100644 --- a/drivers/gpu/drm/i915/gvt/cmd_parser.c +++ b/drivers/gpu/drm/i915/gvt/cmd_parser.c @@ -3047,7 +3047,7 @@ static int shadow_indirect_ctx(struct intel_shadow_wa_ctx *wa_ctx) 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) diff --git a/drivers/gpu/drm/i915/gvt/fb_decoder.c b/drivers/gpu/drm/i915/gvt/fb_decoder.c index 835c3fde8a20..313efdabee57 100644 --- a/drivers/gpu/drm/i915/gvt/fb_decoder.c +++ b/drivers/gpu/drm/i915/gvt/fb_decoder.c @@ -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) diff --git a/drivers/gpu/drm/i915/gvt/handlers.c b/drivers/gpu/drm/i915/gvt/handlers.c index a9f7fa9b90bd..9c47b498c87e 100644 --- a/drivers/gpu/drm/i915/gvt/handlers.c +++ b/drivers/gpu/drm/i915/gvt/handlers.c @@ -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{} */