[PATCH v2 50/60] staging: ced1401: fix ced_dbg_peek/poke()

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

 



Rename camel case arguments and locals in function ced_dbg_peek() and
ced_dbg_poke()

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

diff --git a/drivers/staging/ced1401/ced_ioc.c b/drivers/staging/ced1401/ced_ioc.c
index 46cc293..adab1de 100644
--- a/drivers/staging/ced1401/ced_ioc.c
+++ b/drivers/staging/ced1401/ced_ioc.c
@@ -1198,27 +1198,27 @@ static int ced_dbg_cmd(struct ced_data *ced, unsigned char cmd,
 **
 ** Execute the diagnostic peek operation. Uses address, width and repeats.
 ****************************************************************************/
-int ced_dbg_peek(struct ced_data *ced, TDBGBLOCK __user *pDB)
+int ced_dbg_peek(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_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_PEEK, 0);
+	ret = ced_dbg_cmd(ced, DB_SETADD, db.iAddr);
+	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_PEEK, 0);
 	mutex_unlock(&ced->io_mutex);
 
-	return iReturn;
+	return ret;
 }
 
 /****************************************************************************
@@ -1227,27 +1227,27 @@ int ced_dbg_peek(struct ced_data *ced, TDBGBLOCK __user *pDB)
 ** Execute the diagnostic poke operation. Parameters are in the CSBLOCK struct
 ** in order address, size, repeats and value to poke.
 ****************************************************************************/
-int ced_dbg_poke(struct ced_data *ced, TDBGBLOCK __user *pDB)
+int ced_dbg_poke(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_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_POKE, db.iData);
+	ret = ced_dbg_cmd(ced, DB_SETADD, db.iAddr);
+	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_POKE, db.iData);
 	mutex_unlock(&ced->io_mutex);
 
-	return iReturn;
+	return ret;
 }
 
 /****************************************************************************
diff --git a/drivers/staging/ced1401/usb1401.h b/drivers/staging/ced1401/usb1401.h
index e1f1c54..2e3a1c6 100644
--- a/drivers/staging/ced1401/usb1401.h
+++ b/drivers/staging/ced1401/usb1401.h
@@ -245,8 +245,8 @@ extern int ced_check_self_test(struct ced_data *ced,
 			       TGET_SELFTEST __user *ugst);
 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 *pDB);
-extern int ced_dbg_poke(struct ced_data *ced, TDBGBLOCK __user *pDB);
+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_get_data(struct ced_data *ced, TDBGBLOCK __user *pDB);
-- 
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