[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20240411153126.16201-132-axboe@kernel.dk>
Date: Thu, 11 Apr 2024 09:14:31 -0600
From: Jens Axboe <axboe@...nel.dk>
To: linux-kernel@...r.kernel.org
Cc: Jens Axboe <axboe@...nel.dk>
Subject: [PATCH 131/437] drivers/opp: convert to read/write iterators
Signed-off-by: Jens Axboe <axboe@...nel.dk>
---
drivers/opp/debugfs.c | 9 ++++-----
1 file changed, 4 insertions(+), 5 deletions(-)
diff --git a/drivers/opp/debugfs.c b/drivers/opp/debugfs.c
index 105de7c3274a..a755dacb2c61 100644
--- a/drivers/opp/debugfs.c
+++ b/drivers/opp/debugfs.c
@@ -33,10 +33,9 @@ void opp_debug_remove_one(struct dev_pm_opp *opp)
debugfs_remove_recursive(opp->dentry);
}
-static ssize_t bw_name_read(struct file *fp, char __user *userbuf,
- size_t count, loff_t *ppos)
+static ssize_t bw_name_read(struct kiocb *iocb, struct iov_iter *to)
{
- struct icc_path *path = fp->private_data;
+ struct icc_path *path = iocb->ki_filp->private_data;
const char *name = icc_get_name(path);
char buf[64];
int i = 0;
@@ -44,12 +43,12 @@ static ssize_t bw_name_read(struct file *fp, char __user *userbuf,
if (name)
i = scnprintf(buf, sizeof(buf), "%.62s\n", name);
- return simple_read_from_buffer(userbuf, count, ppos, buf, i);
+ return simple_copy_to_iter(buf, &iocb->ki_pos, i, to);
}
static const struct file_operations bw_name_fops = {
.open = simple_open,
- .read = bw_name_read,
+ .read_iter = bw_name_read,
.llseek = default_llseek,
};
--
2.43.0
Powered by blists - more mailing lists