[PATCH 5/6] staging: kpc2000_dma: removed aio cancel call-back.

Jeremy Sowden jeremy at azazel.net
Tue Jun 11 19:51:03 UTC 2019


The AIO cancel call-back doesn't do anything.  Removed it.

Cc: Matt Sickler <matt.sickler at daktronics.com>
Signed-off-by: Jeremy Sowden <jeremy at azazel.net>
---
 drivers/staging/kpc2000/kpc_dma/fileops.c | 14 --------------
 1 file changed, 14 deletions(-)

diff --git a/drivers/staging/kpc2000/kpc_dma/fileops.c b/drivers/staging/kpc2000/kpc_dma/fileops.c
index 1e8f8c41f82a..a738e553ddc4 100644
--- a/drivers/staging/kpc2000/kpc_dma/fileops.c
+++ b/drivers/staging/kpc2000/kpc_dma/fileops.c
@@ -310,16 +310,6 @@ int  kpc_dma_close(struct inode *inode, struct file *filp)
 }
 
 #ifdef CONFIG_KPC2000_DMA_AIO
-static int kpc_dma_aio_cancel(struct kiocb *kcb)
-{
-	struct dev_private_data *priv = kcb->ki_filp->private_data;
-
-	dev_dbg(&priv->ldev->pldev->dev,
-		"%s(kcb = [%p]) priv = [%p], ldev = [%p]\n",
-		__func__, kcb, priv, priv->ldev);
-	return 0;
-}
-
 static ssize_t kpc_dma_read_iter(struct kiocb *kcb, struct iov_iter *to)
 {
 	struct dev_private_data *priv = kcb->ki_filp->private_data;
@@ -339,8 +329,6 @@ static ssize_t kpc_dma_read_iter(struct kiocb *kcb, struct iov_iter *to)
 
 	iov = iov_iter_iovec(to);
 
-	if (!is_sync_kiocb(kcb))
-		kiocb_set_cancel_fn(kcb, kpc_dma_aio_cancel);
 	return kpc_dma_transfer(priv, kcb, (unsigned long)iov.iov_base,
 				iov.iov_len);
 }
@@ -364,8 +352,6 @@ static ssize_t kpc_dma_write_iter(struct kiocb *kcb, struct iov_iter *from)
 
 	iov = iov_iter_iovec(from);
 
-	if (!is_sync_kiocb(kcb))
-		kiocb_set_cancel_fn(kcb, kpc_dma_aio_cancel);
 	return kpc_dma_transfer(priv, kcb, (unsigned long)iov.iov_base,
 				iov.iov_len);
 }
-- 
2.20.1



More information about the devel mailing list