Commit f9f24870 authored by Christian Gromm's avatar Christian Gromm Committed by Greg Kroah-Hartman

staging: most: rename variables

This patch renames some variables for better readability.
Signed-off-by: default avatarChristian Gromm <christian.gromm@microchip.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent a1911764
...@@ -221,8 +221,8 @@ static ssize_t aim_write(struct file *filp, const char __user *buf, ...@@ -221,8 +221,8 @@ static ssize_t aim_write(struct file *filp, const char __user *buf,
static ssize_t static ssize_t
aim_read(struct file *filp, char __user *buf, size_t count, loff_t *offset) aim_read(struct file *filp, char __user *buf, size_t count, loff_t *offset)
{ {
ssize_t retval; ssize_t copied;
size_t not_copied, proc_len; size_t to_copy, not_copied;
struct mbo *mbo; struct mbo *mbo;
struct aim_channel *channel = filp->private_data; struct aim_channel *channel = filp->private_data;
...@@ -247,17 +247,17 @@ aim_read(struct file *filp, char __user *buf, size_t count, loff_t *offset) ...@@ -247,17 +247,17 @@ aim_read(struct file *filp, char __user *buf, size_t count, loff_t *offset)
return -EIO; return -EIO;
} }
proc_len = min((int)count, to_copy = min((int)count,
(int)(mbo->processed_length - channel->mbo_offs)); (int)(mbo->processed_length - channel->mbo_offs));
not_copied = copy_to_user(buf, not_copied = copy_to_user(buf,
mbo->virt_address + channel->mbo_offs, 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) { if (count < mbo->processed_length) {
channel->mbo_offs = retval; channel->mbo_offs = copied;
channel->stacked_mbo = mbo; channel->stacked_mbo = mbo;
} else { } else {
most_put_mbo(mbo); most_put_mbo(mbo);
...@@ -265,7 +265,7 @@ aim_read(struct file *filp, char __user *buf, size_t count, loff_t *offset) ...@@ -265,7 +265,7 @@ aim_read(struct file *filp, char __user *buf, size_t count, loff_t *offset)
channel->stacked_mbo = NULL; channel->stacked_mbo = NULL;
} }
mutex_unlock(&channel->io_mutex); mutex_unlock(&channel->io_mutex);
return retval; return copied;
} }
static inline bool __must_check IS_ERR_OR_FALSE(int x) static inline bool __must_check IS_ERR_OR_FALSE(int x)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment