[PATCH v2 38/60] staging: ced1401: fix ced_set_transfer()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Rename camel case arguments and locals in function ced_set_transfer()

Signed-off-by: Luca Ellero <luca.ellero@xxxxxxxxxxxxxxxx>
---
 drivers/staging/ced1401/ced_ioc.c |   19 +++++++++++--------
 drivers/staging/ced1401/usb1401.h |    3 ++-
 2 files changed, 13 insertions(+), 9 deletions(-)

diff --git a/drivers/staging/ced1401/ced_ioc.c b/drivers/staging/ced1401/ced_ioc.c
index 4609cb4..bba034c 100644
--- a/drivers/staging/ced1401/ced_ioc.c
+++ b/drivers/staging/ced1401/ced_ioc.c
@@ -775,26 +775,29 @@ error:
 ** unset it. Unsetting will fail if the area is booked, and a transfer to that
 ** area is in progress. Otherwise, we will release the area and re-assign it.
 ****************************************************************************/
-int ced_set_transfer(struct ced_data *ced, struct transfer_area_desc __user *pTD)
+int ced_set_transfer(struct ced_data *ced,
+		     struct transfer_area_desc __user *utd)
 {
-	int iReturn;
+	int ret;
 	struct transfer_area_desc td;
 
-	if (copy_from_user(&td, pTD, sizeof(td)))
+	if (copy_from_user(&td, utd, sizeof(td)))
 		return -EFAULT;
 
 	mutex_lock(&ced->io_mutex);
 	dev_dbg(&ced->interface->dev, "%s: area:%d, size:%08x\n",
 		__func__, td.wAreaNum, td.dwLength);
-	/*  The strange cast is done so that we don't get warnings in 32-bit linux about the size of the */
-	/*  pointer. The pointer is always passed as a 64-bit object so that we don't have problems using */
-	/*  a 32-bit program on a 64-bit system. unsigned long is 64-bits on a 64-bit system. */
-	iReturn =
+	/* The strange cast is done so that we don't get warnings in 32-bit  */
+	/* linux about the size of the pointer. The pointer is always passed */
+	/* as a 64-bit object so that we don't have problems using a 32-bit  */
+	/* program on a 64-bit system. unsigned long is 64-bits on a 64-bit  */
+	/* system.							     */
+	ret =
 	    ced_set_area(ced, td.wAreaNum,
 		    (char __user *)((unsigned long)td.lpvBuff), td.dwLength,
 		    false, false);
 	mutex_unlock(&ced->io_mutex);
-	return iReturn;
+	return ret;
 }
 
 /****************************************************************************
diff --git a/drivers/staging/ced1401/usb1401.h b/drivers/staging/ced1401/usb1401.h
index a5fc387..c8cb2c5 100644
--- a/drivers/staging/ced1401/usb1401.h
+++ b/drivers/staging/ced1401/usb1401.h
@@ -229,7 +229,8 @@ extern int ced_read_write_cancel(struct ced_data *ced);
 extern int ced_reset(struct ced_data *ced);
 extern int ced_get_char(struct ced_data *ced);
 extern int ced_get_string(struct ced_data *ced, char __user *user, int n);
-extern int ced_set_transfer(struct ced_data *ced, struct transfer_area_desc __user *pTD);
+extern int ced_set_transfer(struct ced_data *ced,
+			    struct transfer_area_desc __user *utd);
 extern int ced_unset_transfer(struct ced_data *ced, int nArea);
 extern int ced_set_event(struct ced_data *ced, struct transfer_event __user *pTE);
 extern int ced_stat_1401(struct ced_data *ced);
-- 
1.7.10.4

_______________________________________________
devel mailing list
devel@xxxxxxxxxxxxxxxxxxxxxx
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel




[Index of Archives]     [Linux Driver Backports]     [DMA Engine]     [Linux GPIO]     [Linux SPI]     [Video for Linux]     [Linux USB Devel]     [Linux Coverity]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]
  Powered by Linux