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: <20240411153126.16201-365-axboe@kernel.dk>
Date: Thu, 11 Apr 2024 09:18:24 -0600
From: Jens Axboe <axboe@...nel.dk>
To: linux-kernel@...r.kernel.org
Cc: Jens Axboe <axboe@...nel.dk>
Subject: [PATCH 364/437] hwmon: max20730: convert to read/write iterators

Signed-off-by: Jens Axboe <axboe@...nel.dk>
---
 drivers/hwmon/pmbus/max20730.c | 10 ++++------
 1 file changed, 4 insertions(+), 6 deletions(-)

diff --git a/drivers/hwmon/pmbus/max20730.c b/drivers/hwmon/pmbus/max20730.c
index d56ec24764fd..9b0c6084cf12 100644
--- a/drivers/hwmon/pmbus/max20730.c
+++ b/drivers/hwmon/pmbus/max20730.c
@@ -104,11 +104,10 @@ struct max20730_debugfs_data {
 			struct max20730_debugfs_data, debugfs_entries[(y)])
 
 #ifdef CONFIG_DEBUG_FS
-static ssize_t max20730_debugfs_read(struct file *file, char __user *buf,
-				     size_t count, loff_t *ppos)
+static ssize_t max20730_debugfs_read(struct kiocb *iocb, struct iov_iter *to)
 {
 	int ret, len;
-	int *idxp = file->private_data;
+	int *idxp = iocb->ki_filp->private_data;
 	int idx = *idxp;
 	struct max20730_debugfs_data *psu = to_psu(idxp, idx);
 	const struct pmbus_driver_info *info;
@@ -292,13 +291,12 @@ static ssize_t max20730_debugfs_read(struct file *file, char __user *buf,
 	}
 
 	len = strlen(result);
-	return simple_read_from_buffer(buf, count, ppos, result, len);
+	return simple_copy_to_iter(result, &iocb->ki_pos, len, to);
 }
 
 static const struct file_operations max20730_fops = {
 	.llseek = noop_llseek,
-	.read = max20730_debugfs_read,
-	.write = NULL,
+	.read_iter = max20730_debugfs_read,
 	.open = simple_open,
 };
 
-- 
2.43.0


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ