lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20251030130023.1836808-2-zhongqiu.han@oss.qualcomm.com>
Date: Thu, 30 Oct 2025 21:00:22 +0800
From: Zhongqiu Han <zhongqiu.han@....qualcomm.com>
To: jjohnson@...nel.org
Cc: ath10k@...ts.infradead.org, linux-wireless@...r.kernel.org,
        linux-kernel@...r.kernel.org, zhongqiu.han@....qualcomm.com
Subject: [PATCH 1/2] wifi: ath10k: use = {} to initialize pm_qos_request instead of memset

Initialize the pm_qos_request structure using = {} instead of memset() in
ath10k_download_fw(). This ensures the structure is properly zeroed before
passing it to cpu_latency_qos_add_request(), and improves efficiency by
avoiding an explicit runtime memset.

Signed-off-by: Zhongqiu Han <zhongqiu.han@....qualcomm.com>
---
 drivers/net/wireless/ath/ath10k/core.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/drivers/net/wireless/ath/ath10k/core.c b/drivers/net/wireless/ath/ath10k/core.c
index 9ae3595fb698..670c31a52a12 100644
--- a/drivers/net/wireless/ath/ath10k/core.c
+++ b/drivers/net/wireless/ath/ath10k/core.c
@@ -1186,7 +1186,7 @@ static int ath10k_download_fw(struct ath10k *ar)
 	u32 address, data_len;
 	const void *data;
 	int ret;
-	struct pm_qos_request latency_qos;
+	struct pm_qos_request latency_qos = {};
 
 	address = ar->hw_params.patch_load_addr;
 
@@ -1220,7 +1220,6 @@ static int ath10k_download_fw(struct ath10k *ar)
 			    ret);
 	}
 
-	memset(&latency_qos, 0, sizeof(latency_qos));
 	cpu_latency_qos_add_request(&latency_qos, 0);
 
 	ret = ath10k_bmi_fast_download(ar, address, data, data_len);
-- 
2.43.0


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ