diff options
author | Christian Gromm <christian.gromm@microchip.com> | 2015-12-22 09:52:45 (GMT) |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2016-02-08 01:34:58 (GMT) |
commit | 06e7ecf287e7d2414c381d5312d6c81e79a7520d (patch) | |
tree | a5eaf3ddc96f8701908e15056305acecf0f8ae16 /drivers | |
parent | 4aa575a91e637ab1c5e89c91bb59e91e518cb5f6 (diff) | |
download | linux-06e7ecf287e7d2414c381d5312d6c81e79a7520d.tar.xz |
staging: most: unify types
This patch unifies variable types to get less castings.
Signed-off-by: Christian Gromm <christian.gromm@microchip.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/staging/most/aim-cdev/cdev.c | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/drivers/staging/most/aim-cdev/cdev.c b/drivers/staging/most/aim-cdev/cdev.c index b293078..4bf0322 100644 --- a/drivers/staging/most/aim-cdev/cdev.c +++ b/drivers/staging/most/aim-cdev/cdev.c @@ -39,7 +39,7 @@ struct aim_channel { struct most_channel_config *cfg; unsigned int channel_id; dev_t devno; - unsigned int mbo_offs; + size_t mbo_offs; struct mbo *stacked_mbo; DECLARE_KFIFO_PTR(fifo, typeof(struct mbo *)); atomic_t access_ref; @@ -221,8 +221,7 @@ error: static ssize_t aim_read(struct file *filp, char __user *buf, size_t count, loff_t *offset) { - ssize_t copied; - size_t to_copy, not_copied; + size_t to_copy, not_copied, copied; struct mbo *mbo; struct aim_channel *channel = filp->private_data; @@ -247,8 +246,7 @@ start_copy: return -EIO; } - to_copy = min((int)count, - (int)(mbo->processed_length - channel->mbo_offs)); + to_copy = min(count, (size_t)mbo->processed_length - channel->mbo_offs); not_copied = copy_to_user(buf, mbo->virt_address + channel->mbo_offs, |