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: <20250812133226.258318-5-rongqianfeng@vivo.com>
Date: Tue, 12 Aug 2025 21:32:17 +0800
From: Qianfeng Rong <rongqianfeng@...o.com>
To: Jiri Slaby <jirislaby@...nel.org>,
	Nick Kossifidis <mickflemm@...il.com>,
	Luis Chamberlain <mcgrof@...nel.org>,
	linux-wireless@...r.kernel.org (open list:ATHEROS ATH5K WIRELESS DRIVER),
	linux-kernel@...r.kernel.org (open list)
Cc: Qianfeng Rong <rongqianfeng@...o.com>
Subject: [PATCH 4/5] wifi: ath5k: use vmalloc_array() to simplify code

Remove array_size() calls and replace vmalloc() with vmalloc_array() to
simplify the code.

Signed-off-by: Qianfeng Rong <rongqianfeng@...o.com>
---
 drivers/net/wireless/ath/ath5k/debug.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/wireless/ath/ath5k/debug.c b/drivers/net/wireless/ath/ath5k/debug.c
index ec130510aeb2..91736f335210 100644
--- a/drivers/net/wireless/ath/ath5k/debug.c
+++ b/drivers/net/wireless/ath/ath5k/debug.c
@@ -912,7 +912,7 @@ static int open_file_eeprom(struct inode *inode, struct file *file)
 
 	/* Create buffer and read in eeprom */
 
-	buf = vmalloc(array_size(eesize, 2));
+	buf = vmalloc_array(2, eesize);
 	if (!buf) {
 		ret = -ENOMEM;
 		goto err;
-- 
2.34.1


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ