[PATCH 2/2] staging/lustre/libcfs: cleanup libcfs_kkuc_msg_put a bit
Peng Tao
bergwolf at gmail.com
Thu Jun 6 15:04:07 UTC 2013
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 at oracle.com>
Signed-off-by: Peng Tao <tao.peng at emc.com>
Signed-off-by: Andreas Dilger <andreas.dilger at intel.com>
---
.../lustre/lustre/libcfs/kernel_user_comm.c | 4 ++--
1 file 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 8084ada..d6d3b2e 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;
--
1.7.9.5
More information about the devel
mailing list