aboutsummaryrefslogtreecommitdiff
path: root/drivers/staging/lustre/lustre
diff options
context:
space:
mode:
authorPeng Tao <bergwolf@gmail.com>2013-06-06 23:04:07 +0800
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2013-06-06 11:44:39 -0700
commite543d2eaa8db8cdf14f9d91b6c2469e75d8fc0c0 (patch)
tree56b07e46a3ddb96b238b0f11e7bef2b361ce8d73 /drivers/staging/lustre/lustre
parent92ab7d7ff427e77ad554a426a3ac7bec3cfaae9e (diff)
staging/lustre/libcfs: cleanup libcfs_kkuc_msg_put a bit
No need to cast count since it is already ssize_t. No need to cast payload to const, but need __force instead to avoid Sparse complaining. Reported-and-Suggested-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Peng Tao <tao.peng@emc.com> Signed-off-by: Andreas Dilger <andreas.dilger@intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging/lustre/lustre')
-rw-r--r--drivers/staging/lustre/lustre/libcfs/kernel_user_comm.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/staging/lustre/lustre/libcfs/kernel_user_comm.c b/drivers/staging/lustre/lustre/libcfs/kernel_user_comm.c
index 8084ada4a6a..d6d3b2e0f30 100644
--- a/drivers/staging/lustre/lustre/libcfs/kernel_user_comm.c
+++ b/drivers/staging/lustre/lustre/libcfs/kernel_user_comm.c
@@ -170,8 +170,8 @@ int libcfs_kkuc_msg_put(struct file *filp, void *payload)
fs = get_fs();
set_fs(KERNEL_DS);
- while ((ssize_t)count > 0) {
- rc = vfs_write(filp, (const void __user *)payload,
+ while (count > 0) {
+ rc = vfs_write(filp, (void __force __user *)payload,
count, &offset);
if (rc < 0)
break;