[PATCH 2/6] staging: kpc2000_dma: removed casts of void pointers.

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


The AIO call-backs assigned void pointers to local variables and used
superfluous casts in the process.  Removed the casts.

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

diff --git a/drivers/staging/kpc2000/kpc_dma/fileops.c b/drivers/staging/kpc2000/kpc_dma/fileops.c
index ee382dee01ca..b77fa5c34dc2 100644
--- a/drivers/staging/kpc2000/kpc_dma/fileops.c
+++ b/drivers/staging/kpc2000/kpc_dma/fileops.c
@@ -312,7 +312,7 @@ int  kpc_dma_close(struct inode *inode, struct file *filp)
 static
 int  kpc_dma_aio_cancel(struct kiocb *kcb)
 {
-	struct dev_private_data *priv = (struct dev_private_data *)kcb->ki_filp->private_data;
+	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;
@@ -321,7 +321,7 @@ int  kpc_dma_aio_cancel(struct kiocb *kcb)
 static
 ssize_t   kpc_dma_aio_read(struct kiocb *kcb, const struct iovec *iov, unsigned long iov_count, loff_t pos)
 {
-	struct dev_private_data *priv = (struct dev_private_data *)kcb->ki_filp->private_data;
+	struct dev_private_data *priv = kcb->ki_filp->private_data;
 
 	if (priv->ldev->dir != DMA_FROM_DEVICE)
 		return -EMEDIUMTYPE;
@@ -339,7 +339,7 @@ ssize_t   kpc_dma_aio_read(struct kiocb *kcb, const struct iovec *iov, unsigned
 static
 ssize_t  kpc_dma_aio_write(struct kiocb *kcb, const struct iovec *iov, unsigned long iov_count, loff_t pos)
 {
-	struct dev_private_data *priv = (struct dev_private_data *)kcb->ki_filp->private_data;
+	struct dev_private_data *priv = kcb->ki_filp->private_data;
 
 	if (priv->ldev->dir != DMA_TO_DEVICE)
 		return -EMEDIUMTYPE;
-- 
2.20.1



More information about the devel mailing list