[PATCH 02/28] staging: most: rename variables

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

 



This patch renames some variables for better readability.

Signed-off-by: Christian Gromm <christian.gromm@xxxxxxxxxxxxx>
---
 drivers/staging/most/aim-cdev/cdev.c |   16 ++++++++--------
 1 file changed, 8 insertions(+), 8 deletions(-)

diff --git a/drivers/staging/most/aim-cdev/cdev.c b/drivers/staging/most/aim-cdev/cdev.c
index 6f70ed7..bff891f 100644
--- a/drivers/staging/most/aim-cdev/cdev.c
+++ b/drivers/staging/most/aim-cdev/cdev.c
@@ -221,8 +221,8 @@ error:
 static ssize_t
 aim_read(struct file *filp, char __user *buf, size_t count, loff_t *offset)
 {
-	ssize_t retval;
-	size_t not_copied, proc_len;
+	ssize_t copied;
+	size_t to_copy, not_copied;
 	struct mbo *mbo;
 	struct aim_channel *channel = filp->private_data;
 
@@ -247,17 +247,17 @@ start_copy:
 		return -EIO;
 	}
 
-	proc_len = min((int)count,
-		       (int)(mbo->processed_length - channel->mbo_offs));
+	to_copy = min((int)count,
+		      (int)(mbo->processed_length - channel->mbo_offs));
 
 	not_copied = copy_to_user(buf,
 				  mbo->virt_address + channel->mbo_offs,
-				  proc_len);
+				  to_copy);
 
-	retval = not_copied ? proc_len - not_copied : proc_len;
+	copied = not_copied ? to_copy - not_copied : to_copy;
 
 	if (count < mbo->processed_length) {
-		channel->mbo_offs = retval;
+		channel->mbo_offs = copied;
 		channel->stacked_mbo = mbo;
 	} else {
 		most_put_mbo(mbo);
@@ -265,7 +265,7 @@ start_copy:
 		channel->stacked_mbo = NULL;
 	}
 	mutex_unlock(&channel->io_mutex);
-	return retval;
+	return copied;
 }
 
 static inline bool __must_check IS_ERR_OR_FALSE(int x)
-- 
1.7.9.5

_______________________________________________
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