summaryrefslogtreecommitdiff
path: root/drivers/usb/gadget/legacy/inode.c
diff options
context:
space:
mode:
authorJens Axboe <axboe@kernel.dk>2021-10-21 18:22:35 +0300
committerJens Axboe <axboe@kernel.dk>2021-10-25 19:36:24 +0300
commit6b19b766e8f077f29cdb47da5003469a85bbfb9c (patch)
tree8ae1c68714c880a644ac05094491b74d86e9f590 /drivers/usb/gadget/legacy/inode.c
parent4c3d8accdce26afa8089609593aa92965b500f72 (diff)
downloadlinux-6b19b766e8f077f29cdb47da5003469a85bbfb9c.tar.xz
fs: get rid of the res2 iocb->ki_complete argument
The second argument was only used by the USB gadget code, yet everyone pays the overhead of passing a zero to be passed into aio, where it ends up being part of the aio res2 value. Now that everybody is passing in zero, kill off the extra argument. Reviewed-by: Darrick J. Wong <djwong@kernel.org> Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'drivers/usb/gadget/legacy/inode.c')
-rw-r--r--drivers/usb/gadget/legacy/inode.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/drivers/usb/gadget/legacy/inode.c b/drivers/usb/gadget/legacy/inode.c
index 28d3d4e71182..78be94750232 100644
--- a/drivers/usb/gadget/legacy/inode.c
+++ b/drivers/usb/gadget/legacy/inode.c
@@ -469,7 +469,7 @@ static void ep_user_copy_worker(struct work_struct *work)
ret = -EFAULT;
/* completing the iocb can drop the ctx and mm, don't touch mm after */
- iocb->ki_complete(iocb, ret, 0);
+ iocb->ki_complete(iocb, ret);
kfree(priv->buf);
kfree(priv->to_free);
@@ -497,8 +497,7 @@ static void ep_aio_complete(struct usb_ep *ep, struct usb_request *req)
kfree(priv);
iocb->private = NULL;
iocb->ki_complete(iocb,
- req->actual ? req->actual : (long)req->status,
- 0);
+ req->actual ? req->actual : (long)req->status);
} else {
/* ep_copy_to_user() won't report both; we hide some faults */
if (unlikely(0 != req->status))