mirror of
https://github.com/FEX-Emu/linux.git
synced 2025-01-11 11:56:48 +00:00
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>
This commit is contained in:
parent
92ab7d7ff4
commit
e543d2eaa8
@ -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;
|
||||
|
Loading…
x
Reference in New Issue
Block a user