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-383-axboe@kernel.dk>
Date: Thu, 11 Apr 2024 09:18:42 -0600
From: Jens Axboe <axboe@...nel.dk>
To: linux-kernel@...r.kernel.org
Cc: Jens Axboe <axboe@...nel.dk>
Subject: [PATCH 382/437] iio: gyro/adis16136: convert to read/write iterators

Signed-off-by: Jens Axboe <axboe@...nel.dk>
---
 drivers/iio/gyro/adis16136.c | 9 ++++-----
 1 file changed, 4 insertions(+), 5 deletions(-)

diff --git a/drivers/iio/gyro/adis16136.c b/drivers/iio/gyro/adis16136.c
index c95cf41be34b..3fa17f582444 100644
--- a/drivers/iio/gyro/adis16136.c
+++ b/drivers/iio/gyro/adis16136.c
@@ -65,10 +65,9 @@ struct adis16136 {
 
 #ifdef CONFIG_DEBUG_FS
 
-static ssize_t adis16136_show_serial(struct file *file,
-		char __user *userbuf, size_t count, loff_t *ppos)
+static ssize_t adis16136_show_serial(struct kiocb *iocb, struct iov_iter *to)
 {
-	struct adis16136 *adis16136 = file->private_data;
+	struct adis16136 *adis16136 = iocb->ki_filp->private_data;
 	uint16_t lot1, lot2, lot3, serial;
 	char buf[20];
 	size_t len;
@@ -94,12 +93,12 @@ static ssize_t adis16136_show_serial(struct file *file,
 	len = snprintf(buf, sizeof(buf), "%.4x%.4x%.4x-%.4x\n", lot1, lot2,
 		lot3, serial);
 
-	return simple_read_from_buffer(userbuf, count, ppos, buf, len);
+	return simple_copy_to_iter(buf, &iocb->ki_pos, len, to);
 }
 
 static const struct file_operations adis16136_serial_fops = {
 	.open = simple_open,
-	.read = adis16136_show_serial,
+	.read_iter = adis16136_show_serial,
 	.llseek = default_llseek,
 	.owner = THIS_MODULE,
 };
-- 
2.43.0


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ