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

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

diff --git a/drivers/hwmon/asus_atk0110.c b/drivers/hwmon/asus_atk0110.c
index d778a2aaefec..bd6eabfd7d73 100644
--- a/drivers/hwmon/asus_atk0110.c
+++ b/drivers/hwmon/asus_atk0110.c
@@ -764,13 +764,12 @@ static int atk_debugfs_ggrp_open(struct inode *inode, struct file *file)
 	return nonseekable_open(inode, file);
 }
 
-static ssize_t atk_debugfs_ggrp_read(struct file *file, char __user *buf,
-		size_t count, loff_t *pos)
+static ssize_t atk_debugfs_ggrp_read(struct kiocb *iocb, struct iov_iter *to)
 {
-	char *str = file->private_data;
+	char *str = iocb->ki_filp->private_data;
 	size_t len = strlen(str);
 
-	return simple_read_from_buffer(buf, count, pos, str, len);
+	return simple_copy_to_iter(str, &iocb->ki_pos, len, to);
 }
 
 static int atk_debugfs_ggrp_release(struct inode *inode, struct file *file)
@@ -780,7 +779,7 @@ static int atk_debugfs_ggrp_release(struct inode *inode, struct file *file)
 }
 
 static const struct file_operations atk_debugfs_ggrp_fops = {
-	.read		= atk_debugfs_ggrp_read,
+	.read_iter	= atk_debugfs_ggrp_read,
 	.open		= atk_debugfs_ggrp_open,
 	.release	= atk_debugfs_ggrp_release,
 	.llseek		= no_llseek,
-- 
2.43.0


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ