mirror of
git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2025-09-04 20:19:47 +08:00
wifi: ath10k: Prefer {} to {0} in initializers
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>
This commit is contained in:
parent
d29591d5b5
commit
f0b72d1526
@ -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",
|
||||
|
@ -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;
|
||||
|
||||
|
@ -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);
|
||||
|
@ -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;
|
||||
|
@ -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;
|
||||
|
@ -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
|
||||
|
@ -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[] = {
|
||||
|
Loading…
Reference in New Issue
Block a user