]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
wifi: ath10k: Prefer {} to {0} in initializers
authorJeff Johnson <jeff.johnson@oss.qualcomm.com>
Sun, 20 Jul 2025 14:46:15 +0000 (07:46 -0700)
committerJeff Johnson <jeff.johnson@oss.qualcomm.com>
Mon, 21 Jul 2025 21:34:01 +0000 (14:34 -0700)
Prefer {} to {0} in initializers since {} works even when the first
member is not a scalar.

Generated using:
sed -i 's/{[[:space:]]*0[[:space:]]*}/{}/g' drivers/net/wireless/ath/ath10k/*

Compile tested only.

Link: https://patch.msgid.link/20250720-ath10k-zero-brace-v1-1-c1ee818d6238@oss.qualcomm.com
Signed-off-by: Jeff Johnson <jeff.johnson@oss.qualcomm.com>
drivers/net/wireless/ath/ath10k/core.c
drivers/net/wireless/ath/ath10k/debug.c
drivers/net/wireless/ath/ath10k/debugfs_sta.c
drivers/net/wireless/ath/ath10k/htt_rx.c
drivers/net/wireless/ath/ath10k/htt_tx.c
drivers/net/wireless/ath/ath10k/mac.c
drivers/net/wireless/ath/ath10k/pci.c

index 9c6c07598b3a12fd544d33c3cb893766c36eebc9..6f78f1752cd6ffcf8eb56621ba0e4978ac23e696 100644 (file)
@@ -1565,7 +1565,7 @@ static int ath10k_core_create_board_name(struct ath10k *ar, char *name,
                                         bool with_chip_id)
 {
        /* strlen(',variant=') + strlen(ar->id.bdf_ext) */
-       char variant[9 + ATH10K_SMBIOS_BDF_EXT_STR_LENGTH] = { 0 };
+       char variant[9 + ATH10K_SMBIOS_BDF_EXT_STR_LENGTH] = {};
 
        if (with_variant && ar->id.bdf_ext[0] != '\0')
                scnprintf(variant, sizeof(variant), ",variant=%s",
index 6410d3961e76ca2b4191052277c2072638db4b8d..b7520220465a838ba700bb10bee2325ccc324d20 100644 (file)
@@ -547,7 +547,7 @@ static ssize_t ath10k_write_simulate_fw_crash(struct file *file,
                                              size_t count, loff_t *ppos)
 {
        struct ath10k *ar = file->private_data;
-       char buf[32] = {0};
+       char buf[32] = {};
        ssize_t rc;
        int ret;
 
@@ -983,7 +983,7 @@ static ssize_t ath10k_write_htt_max_amsdu_ampdu(struct file *file,
 {
        struct ath10k *ar = file->private_data;
        int res;
-       char buf[64] = {0};
+       char buf[64] = {};
        unsigned int amsdu, ampdu;
 
        res = simple_write_to_buffer(buf, sizeof(buf) - 1, ppos,
@@ -1039,7 +1039,7 @@ static ssize_t ath10k_write_fw_dbglog(struct file *file,
 {
        struct ath10k *ar = file->private_data;
        int ret;
-       char buf[96] = {0};
+       char buf[96] = {};
        unsigned int log_level;
        u64 mask;
 
index 0f6de862c3a9ba8995a72ef451e90371dce0a978..b9fb192e0b48456cc21b281fec47ce607913ab02 100644 (file)
@@ -3,6 +3,7 @@
  * Copyright (c) 2014-2017 Qualcomm Atheros, Inc.
  * Copyright (c) 2018, The Linux Foundation. All rights reserved.
  * Copyright (c) 2022 Qualcomm Innovation Center, Inc. All rights reserved.
+ * Copyright (c) Qualcomm Technologies, Inc. and/or its subsidiaries.
  */
 
 #include "core.h"
@@ -244,7 +245,7 @@ static ssize_t ath10k_dbg_sta_write_addba(struct file *file,
        struct ath10k *ar = arsta->arvif->ar;
        u32 tid, buf_size;
        int ret;
-       char buf[64] = {0};
+       char buf[64] = {};
 
        ret = simple_write_to_buffer(buf, sizeof(buf) - 1, ppos,
                                     user_buf, count);
@@ -295,7 +296,7 @@ static ssize_t ath10k_dbg_sta_write_addba_resp(struct file *file,
        struct ath10k *ar = arsta->arvif->ar;
        u32 tid, status;
        int ret;
-       char buf[64] = {0};
+       char buf[64] = {};
 
        ret = simple_write_to_buffer(buf, sizeof(buf) - 1, ppos,
                                     user_buf, count);
@@ -345,7 +346,7 @@ static ssize_t ath10k_dbg_sta_write_delba(struct file *file,
        struct ath10k *ar = arsta->arvif->ar;
        u32 tid, initiator, reason;
        int ret;
-       char buf[64] = {0};
+       char buf[64] = {};
 
        ret = simple_write_to_buffer(buf, sizeof(buf) - 1, ppos,
                                     user_buf, count);
index f12243d6bee171eeccf4a57e8001cbddfd26733c..d7e429041065ad21ed699a7e75809817ba719830 100644 (file)
@@ -1884,7 +1884,7 @@ static bool ath10k_htt_rx_h_frag_pn_check(struct ath10k *ar,
                                          enum htt_rx_mpdu_encrypt_type enctype)
 {
        struct ath10k_peer *peer;
-       union htt_rx_pn_t *last_pn, new_pn = {0};
+       union htt_rx_pn_t *last_pn, new_pn = {};
        struct ieee80211_hdr *hdr;
        u8 tid, frag_number;
        u32 seq;
@@ -2402,7 +2402,7 @@ static bool ath10k_htt_rx_pn_check_replay_hl(struct ath10k *ar,
        bool last_pn_valid, pn_invalid = false;
        enum htt_txrx_sec_cast_type sec_index;
        enum htt_security_types sec_type;
-       union htt_rx_pn_t new_pn = {0};
+       union htt_rx_pn_t new_pn = {};
        struct htt_hl_rx_desc *rx_desc;
        union htt_rx_pn_t *last_pn;
        u32 rx_desc_info, tid;
@@ -2465,7 +2465,7 @@ static bool ath10k_htt_rx_proc_rx_ind_hl(struct ath10k_htt *htt,
        struct fw_rx_desc_hl *fw_desc;
        enum htt_txrx_sec_cast_type sec_index;
        enum htt_security_types sec_type;
-       union htt_rx_pn_t new_pn = {0};
+       union htt_rx_pn_t new_pn = {};
        struct htt_hl_rx_desc *rx_desc;
        struct ieee80211_hdr *hdr;
        struct ieee80211_rx_status *rx_status;
@@ -2767,7 +2767,7 @@ static bool ath10k_htt_rx_proc_rx_frag_ind_hl(struct ath10k_htt *htt,
        struct htt_rx_indication_hl *rx_hl;
        enum htt_security_types sec_type;
        u32 tid, frag, seq, rx_desc_info;
-       union htt_rx_pn_t new_pn = {0};
+       union htt_rx_pn_t new_pn = {};
        struct htt_hl_rx_desc *rx_desc;
        u16 peer_id, sc, hdr_space;
        union htt_rx_pn_t *last_pn;
index c1ddd761af3e9ff987fcfd3a55b8747e48783b9e..d6f1d85ba8713d4343605082d91b96ea0df900e7 100644 (file)
@@ -510,7 +510,7 @@ static int ath10k_htt_tx_clean_up_pending(int msdu_id, void *skb, void *ctx)
 {
        struct ath10k *ar = ctx;
        struct ath10k_htt *htt = &ar->htt;
-       struct htt_tx_done tx_done = {0};
+       struct htt_tx_done tx_done = {};
 
        ath10k_dbg(ar, ATH10K_DBG_HTT, "force cleanup msdu_id %u\n", msdu_id);
 
@@ -560,7 +560,7 @@ void ath10k_htt_op_ep_tx_credits(struct ath10k *ar)
 void ath10k_htt_htc_tx_complete(struct ath10k *ar, struct sk_buff *skb)
 {
        struct ath10k_htt *htt = &ar->htt;
-       struct htt_tx_done tx_done = {0};
+       struct htt_tx_done tx_done = {};
        struct htt_cmd_hdr *htt_hdr;
        struct htt_data_tx_desc *desc_hdr = NULL;
        u16 flags1 = 0;
index 11569c18204c01c0d8d27ab731ce3c122d78f168..24dd794e31ea2ccd2f8c0481cda395dacce80ed5 100644 (file)
@@ -3385,7 +3385,7 @@ static int ath10k_update_channel_list(struct ath10k *ar)
        struct ieee80211_supported_band **bands;
        enum nl80211_band band;
        struct ieee80211_channel *channel;
-       struct wmi_scan_chan_list_arg arg = {0};
+       struct wmi_scan_chan_list_arg arg = {};
        struct wmi_channel_arg *ch;
        bool passive;
        int len;
@@ -4885,7 +4885,7 @@ static int ath10k_mac_get_vht_cap_bf_sound_dim(struct ath10k *ar)
 
 static struct ieee80211_sta_vht_cap ath10k_create_vht_cap(struct ath10k *ar)
 {
-       struct ieee80211_sta_vht_cap vht_cap = {0};
+       struct ieee80211_sta_vht_cap vht_cap = {};
        struct ath10k_hw_params *hw = &ar->hw_params;
        u16 mcs_map;
        u32 val;
@@ -4943,7 +4943,7 @@ static struct ieee80211_sta_vht_cap ath10k_create_vht_cap(struct ath10k *ar)
 static struct ieee80211_sta_ht_cap ath10k_get_ht_cap(struct ath10k *ar)
 {
        int i;
-       struct ieee80211_sta_ht_cap ht_cap = {0};
+       struct ieee80211_sta_ht_cap ht_cap = {};
 
        if (!(ar->ht_cap_info & WMI_HT_CAP_ENABLED))
                return ht_cap;
@@ -5175,7 +5175,7 @@ static int ath10k_start(struct ieee80211_hw *hw)
        struct ath10k *ar = hw->priv;
        u32 param;
        int ret = 0;
-       struct wmi_bb_timing_cfg_arg bb_timing = {0};
+       struct wmi_bb_timing_cfg_arg bb_timing = {};
 
        /*
         * This makes sense only when restarting hw. It is harmless to call
index 1e6d43285138ece619b9d7dc49f113a439e2085d..97b49bf4ad80916dd139acd5f5744922317191aa 100644 (file)
@@ -3,6 +3,7 @@
  * Copyright (c) 2005-2011 Atheros Communications Inc.
  * Copyright (c) 2011-2017 Qualcomm Atheros, Inc.
  * Copyright (c) 2022-2024 Qualcomm Innovation Center, Inc. All rights reserved.
+ * Copyright (c) Qualcomm Technologies, Inc. and/or its subsidiaries.
  */
 
 #include <linux/pci.h>
@@ -63,7 +64,7 @@ static const struct pci_device_id ath10k_pci_id_table[] = {
        { PCI_VDEVICE(ATHEROS, QCA9984_1_0_DEVICE_ID) }, /* PCI-E QCA9984 V1 */
        { PCI_VDEVICE(ATHEROS, QCA9377_1_0_DEVICE_ID) }, /* PCI-E QCA9377 V1 */
        { PCI_VDEVICE(ATHEROS, QCA9887_1_0_DEVICE_ID) }, /* PCI-E QCA9887 */
-       {0}
+       {}
 };
 
 static const struct ath10k_pci_supp_chip ath10k_pci_supp_chips[] = {