Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit e543d2ea authored by Peng Tao's avatar Peng Tao Committed by Greg Kroah-Hartman
Browse files

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: default avatarDan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: default avatarPeng Tao <tao.peng@emc.com>
Signed-off-by: default avatarAndreas Dilger <andreas.dilger@intel.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 92ab7d7f
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -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;