[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20240411153126.16201-191-axboe@kernel.dk>
Date: Thu, 11 Apr 2024 09:15:30 -0600
From: Jens Axboe <axboe@...nel.dk>
To: linux-kernel@...r.kernel.org
Cc: Jens Axboe <axboe@...nel.dk>
Subject: [PATCH 190/437] scsi: megaraid: convert to read/write iterators
Signed-off-by: Jens Axboe <axboe@...nel.dk>
---
drivers/scsi/megaraid/megaraid_sas_debugfs.c | 9 ++++-----
1 file changed, 4 insertions(+), 5 deletions(-)
diff --git a/drivers/scsi/megaraid/megaraid_sas_debugfs.c b/drivers/scsi/megaraid/megaraid_sas_debugfs.c
index c69760775efa..d0b8626eebd8 100644
--- a/drivers/scsi/megaraid/megaraid_sas_debugfs.c
+++ b/drivers/scsi/megaraid/megaraid_sas_debugfs.c
@@ -45,15 +45,14 @@
struct dentry *megasas_debugfs_root;
static ssize_t
-megasas_debugfs_read(struct file *filp, char __user *ubuf, size_t cnt,
- loff_t *ppos)
+megasas_debugfs_read(struct kiocb *iocb, struct iov_iter *to)
{
- struct megasas_debugfs_buffer *debug = filp->private_data;
+ struct megasas_debugfs_buffer *debug = iocb->ki_filp->private_data;
if (!debug || !debug->buf)
return 0;
- return simple_read_from_buffer(ubuf, cnt, ppos, debug->buf, debug->len);
+ return simple_copy_to_iter(debug->buf, &iocb->ki_pos, debug->len, to);
}
static int
@@ -92,7 +91,7 @@ megasas_debugfs_release(struct inode *inode, struct file *file)
static const struct file_operations megasas_debugfs_raidmap_fops = {
.owner = THIS_MODULE,
.open = megasas_debugfs_raidmap_open,
- .read = megasas_debugfs_read,
+ .read_iter = megasas_debugfs_read,
.release = megasas_debugfs_release,
};
--
2.43.0
Powered by blists - more mailing lists