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-145-axboe@kernel.dk>
Date: Thu, 11 Apr 2024 09:14:44 -0600
From: Jens Axboe <axboe@...nel.dk>
To: linux-kernel@...r.kernel.org
Cc: Jens Axboe <axboe@...nel.dk>
Subject: [PATCH 144/437] drm/bridge: it6505: convert to read/write iterators

Signed-off-by: Jens Axboe <axboe@...nel.dk>
---
 drivers/gpu/drm/bridge/ite-it6505.c | 14 ++++++--------
 1 file changed, 6 insertions(+), 8 deletions(-)

diff --git a/drivers/gpu/drm/bridge/ite-it6505.c b/drivers/gpu/drm/bridge/ite-it6505.c
index 27334173e911..3f280f85d49d 100644
--- a/drivers/gpu/drm/bridge/ite-it6505.c
+++ b/drivers/gpu/drm/bridge/ite-it6505.c
@@ -3208,14 +3208,14 @@ static void it6505_parse_dt(struct it6505 *it6505)
 			     it6505->max_dpi_pixel_clock);
 }
 
-static ssize_t receive_timing_debugfs_show(struct file *file, char __user *buf,
-					   size_t len, loff_t *ppos)
+static ssize_t receive_timing_debugfs_show(struct kiocb *iocb,
+					   struct iov_iter *to)
 {
-	struct it6505 *it6505 = file->private_data;
+	struct it6505 *it6505 = iocb->ki_filp->private_data;
 	struct drm_display_mode *vid;
 	u8 read_buf[READ_BUFFER_SIZE];
 	u8 *str = read_buf, *end = read_buf + READ_BUFFER_SIZE;
-	ssize_t ret, count;
+	ssize_t count;
 
 	if (!it6505)
 		return -ENODEV;
@@ -3243,9 +3243,7 @@ static ssize_t receive_timing_debugfs_show(struct file *file, char __user *buf,
 			 vid->vtotal - vid->vsync_end);
 
 	count = str - read_buf;
-	ret = simple_read_from_buffer(buf, len, ppos, read_buf, count);
-
-	return ret;
+	return simple_copy_to_iter(read_buf, &iocb->ki_pos, count, to);
 }
 
 static int force_power_on_off_debugfs_write(void *data, u64 value)
@@ -3307,7 +3305,7 @@ static int enable_drv_hold_debugfs_write(void *data, u64 drv_hold)
 static const struct file_operations receive_timing_fops = {
 	.owner = THIS_MODULE,
 	.open = simple_open,
-	.read = receive_timing_debugfs_show,
+	.read_iter = receive_timing_debugfs_show,
 	.llseek = default_llseek,
 };
 
-- 
2.43.0


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ