[PATCH v2 51/60] staging: ced1401: fix ced_dbg_ramp_data/addr()

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

 



Rename camel case arguments and locals in function ced_dbg_ramp_data() and
ced_dbg_ramp_addr()

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

diff --git a/drivers/staging/ced1401/ced_ioc.c b/drivers/staging/ced1401/ced_ioc.c
index adab1de..8c7bfe25 100644
--- a/drivers/staging/ced1401/ced_ioc.c
+++ b/drivers/staging/ced1401/ced_ioc.c
@@ -1256,31 +1256,31 @@ int ced_dbg_poke(struct ced_data *ced, TDBGBLOCK __user *udb)
 ** Execute the diagnostic ramp data operation. Parameters are in the CSBLOCK struct
 ** in order address, default, enable mask, size and repeats.
 ****************************************************************************/
-int ced_dbg_ramp_data(struct ced_data *ced, TDBGBLOCK __user *pDB)
+int ced_dbg_ramp_data(struct ced_data *ced, TDBGBLOCK __user *udb)
 {
-	int iReturn;
+	int ret;
 	TDBGBLOCK db;
 
-	if (copy_from_user(&db, pDB, sizeof(db)))
+	if (copy_from_user(&db, udb, sizeof(db)))
 		return -EFAULT;
 
 	mutex_lock(&ced->io_mutex);
 	dev_dbg(&ced->interface->dev, "%s: @ %08x\n", __func__, db.iAddr);
 
-	iReturn = ced_dbg_cmd(ced, DB_SETADD, db.iAddr);
-	if (iReturn == U14ERR_NOERROR)
-		iReturn = ced_dbg_cmd(ced, DB_SETDEF, db.iDefault);
-	if (iReturn == U14ERR_NOERROR)
-		iReturn = ced_dbg_cmd(ced, DB_SETMASK, db.iMask);
-	if (iReturn == U14ERR_NOERROR)
-		iReturn = ced_dbg_cmd(ced, DB_WIDTH, db.iWidth);
-	if (iReturn == U14ERR_NOERROR)
-		iReturn = ced_dbg_cmd(ced, DB_REPEATS, db.iRepeats);
-	if (iReturn == U14ERR_NOERROR)
-		iReturn = ced_dbg_cmd(ced, DB_RAMPD, 0);
+	ret = ced_dbg_cmd(ced, DB_SETADD, db.iAddr);
+	if (ret == U14ERR_NOERROR)
+		ret = ced_dbg_cmd(ced, DB_SETDEF, db.iDefault);
+	if (ret == U14ERR_NOERROR)
+		ret = ced_dbg_cmd(ced, DB_SETMASK, db.iMask);
+	if (ret == U14ERR_NOERROR)
+		ret = ced_dbg_cmd(ced, DB_WIDTH, db.iWidth);
+	if (ret == U14ERR_NOERROR)
+		ret = ced_dbg_cmd(ced, DB_REPEATS, db.iRepeats);
+	if (ret == U14ERR_NOERROR)
+		ret = ced_dbg_cmd(ced, DB_RAMPD, 0);
 	mutex_unlock(&ced->io_mutex);
 
-	return iReturn;
+	return ret;
 }
 
 /****************************************************************************
@@ -1288,29 +1288,29 @@ int ced_dbg_ramp_data(struct ced_data *ced, TDBGBLOCK __user *pDB)
 **
 ** Execute the diagnostic ramp address operation
 ****************************************************************************/
-int ced_dbg_ramp_addr(struct ced_data *ced, TDBGBLOCK __user *pDB)
+int ced_dbg_ramp_addr(struct ced_data *ced, TDBGBLOCK __user *udb)
 {
-	int iReturn;
+	int ret;
 	TDBGBLOCK db;
 
-	if (copy_from_user(&db, pDB, sizeof(db)))
+	if (copy_from_user(&db, udb, sizeof(db)))
 		return -EFAULT;
 
 	mutex_lock(&ced->io_mutex);
 	dev_dbg(&ced->interface->dev, "%s\n", __func__);
 
-	iReturn = ced_dbg_cmd(ced, DB_SETDEF, db.iDefault);
-	if (iReturn == U14ERR_NOERROR)
-		iReturn = ced_dbg_cmd(ced, DB_SETMASK, db.iMask);
-	if (iReturn == U14ERR_NOERROR)
-		iReturn = ced_dbg_cmd(ced, DB_WIDTH, db.iWidth);
-	if (iReturn == U14ERR_NOERROR)
-		iReturn = ced_dbg_cmd(ced, DB_REPEATS, db.iRepeats);
-	if (iReturn == U14ERR_NOERROR)
-		iReturn = ced_dbg_cmd(ced, DB_RAMPA, 0);
+	ret = ced_dbg_cmd(ced, DB_SETDEF, db.iDefault);
+	if (ret == U14ERR_NOERROR)
+		ret = ced_dbg_cmd(ced, DB_SETMASK, db.iMask);
+	if (ret == U14ERR_NOERROR)
+		ret = ced_dbg_cmd(ced, DB_WIDTH, db.iWidth);
+	if (ret == U14ERR_NOERROR)
+		ret = ced_dbg_cmd(ced, DB_REPEATS, db.iRepeats);
+	if (ret == U14ERR_NOERROR)
+		ret = ced_dbg_cmd(ced, DB_RAMPA, 0);
 	mutex_unlock(&ced->io_mutex);
 
-	return iReturn;
+	return ret;
 }
 
 /****************************************************************************
diff --git a/drivers/staging/ced1401/usb1401.h b/drivers/staging/ced1401/usb1401.h
index 2e3a1c6..77d8614 100644
--- a/drivers/staging/ced1401/usb1401.h
+++ b/drivers/staging/ced1401/usb1401.h
@@ -247,8 +247,8 @@ extern int ced_type_of_1401(struct ced_data *ced);
 extern int ced_transfer_flags(struct ced_data *ced);
 extern int ced_dbg_peek(struct ced_data *ced, TDBGBLOCK __user *udb);
 extern int ced_dbg_poke(struct ced_data *ced, TDBGBLOCK __user *udb);
-extern int ced_dbg_ramp_data(struct ced_data *ced, TDBGBLOCK __user *pDB);
-extern int ced_dbg_ramp_addr(struct ced_data *ced, TDBGBLOCK __user *pDB);
+extern int ced_dbg_ramp_data(struct ced_data *ced, TDBGBLOCK __user *udb);
+extern int ced_dbg_ramp_addr(struct ced_data *ced, TDBGBLOCK __user *udb);
 extern int ced_dbg_get_data(struct ced_data *ced, TDBGBLOCK __user *pDB);
 extern int ced_dbg_stop_loop(struct ced_data *ced);
 extern int ced_set_circular(struct ced_data *ced, struct transfer_area_desc __user *pTD);
-- 
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