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-62-axboe@kernel.dk>
Date: Thu, 11 Apr 2024 09:13:21 -0600
From: Jens Axboe <axboe@...nel.dk>
To: linux-kernel@...r.kernel.org
Cc: Jens Axboe <axboe@...nel.dk>
Subject: [PATCH 061/437] ASoC: fsl: convert to read/write iterators

Signed-off-by: Jens Axboe <axboe@...nel.dk>
---
 sound/soc/fsl/imx-audmux.c | 11 ++++-------
 1 file changed, 4 insertions(+), 7 deletions(-)

diff --git a/sound/soc/fsl/imx-audmux.c b/sound/soc/fsl/imx-audmux.c
index 747ab2f1aae3..479fd59e329c 100644
--- a/sound/soc/fsl/imx-audmux.c
+++ b/sound/soc/fsl/imx-audmux.c
@@ -53,12 +53,11 @@ static const char *audmux_port_string(int port)
 	}
 }
 
-static ssize_t audmux_read_file(struct file *file, char __user *user_buf,
-				size_t count, loff_t *ppos)
+static ssize_t audmux_read_file(struct kiocb *iocb, struct iov_iter *to)
 {
 	ssize_t ret;
 	char *buf;
-	uintptr_t port = (uintptr_t)file->private_data;
+	uintptr_t port = (uintptr_t)iocb->ki_filp->private_data;
 	u32 pdcr, ptcr;
 
 	ret = clk_prepare_enable(audmux_clk);
@@ -119,16 +118,14 @@ static ssize_t audmux_read_file(struct file *file, char __user *user_buf,
 			"\nData received from %s\n",
 			audmux_port_string((pdcr >> 13) & 0x7));
 
-	ret = simple_read_from_buffer(user_buf, count, ppos, buf, ret);
-
+	ret = simple_copy_to_iter(buf, &iocb->ki_pos, ret, to);
 	kfree(buf);
-
 	return ret;
 }
 
 static const struct file_operations audmux_debugfs_fops = {
 	.open = simple_open,
-	.read = audmux_read_file,
+	.read_iter = audmux_read_file,
 	.llseek = default_llseek,
 };
 
-- 
2.43.0


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ