lkml.org 
[lkml]   [2024]   [Apr]   [11]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH 191/437] scsi: mpt3sas: convert to read/write iterators
Date
Signed-off-by: Jens Axboe <axboe@kernel.dk>
---
drivers/scsi/mpt3sas/mpt3sas_debugfs.c | 10 ++++------
1 file changed, 4 insertions(+), 6 deletions(-)

diff --git a/drivers/scsi/mpt3sas/mpt3sas_debugfs.c b/drivers/scsi/mpt3sas/mpt3sas_debugfs.c
index a6ab1db81167..2cb768bcf5c2 100644
--- a/drivers/scsi/mpt3sas/mpt3sas_debugfs.c
+++ b/drivers/scsi/mpt3sas/mpt3sas_debugfs.c
@@ -36,17 +36,15 @@ static struct dentry *mpt3sas_debugfs_root;
* @ppos: Offset in the file
*/

-static ssize_t
-_debugfs_iocdump_read(struct file *filp, char __user *ubuf, size_t cnt,
- loff_t *ppos)
+static ssize_t _debugfs_iocdump_read(struct kiocb *iocb, struct iov_iter *to)

{
- struct mpt3sas_debugfs_buffer *debug = filp->private_data;
+ struct mpt3sas_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);
}

/*
@@ -89,7 +87,7 @@ _debugfs_iocdump_release(struct inode *inode, struct file *file)
static const struct file_operations mpt3sas_debugfs_iocdump_fops = {
.owner = THIS_MODULE,
.open = _debugfs_iocdump_open,
- .read = _debugfs_iocdump_read,
+ .read_iter = _debugfs_iocdump_read,
.release = _debugfs_iocdump_release,
};

--
2.43.0

\
 
 \ /
  Last update: 2024-05-27 16:36    [W:1.136 / U:2.876 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site