Commit 864d9664 authored by Paolo Abeni's avatar Paolo Abeni Committed by David S. Miller

net/socket: fix type in assignment and trim long line

The commit ffb07550 ("copy_msghdr_from_user(): get rid of
field-by-field copyin") introduce a new sparse warning:

net/socket.c:1919:27: warning: incorrect type in assignment (different address spaces)
net/socket.c:1919:27:    expected void *msg_control
net/socket.c:1919:27:    got void [noderef] <asn:1>*[addressable] msg_control

and a line above 80 chars, let's fix them

Fixes: ffb07550 ("copy_msghdr_from_user(): get rid of field-by-field copyin")
Signed-off-by: default avatarPaolo Abeni <pabeni@redhat.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 490198ea
...@@ -1916,7 +1916,7 @@ static int copy_msghdr_from_user(struct msghdr *kmsg, ...@@ -1916,7 +1916,7 @@ static int copy_msghdr_from_user(struct msghdr *kmsg,
if (copy_from_user(&msg, umsg, sizeof(*umsg))) if (copy_from_user(&msg, umsg, sizeof(*umsg)))
return -EFAULT; return -EFAULT;
kmsg->msg_control = msg.msg_control; kmsg->msg_control = (void __force *)msg.msg_control;
kmsg->msg_controllen = msg.msg_controllen; kmsg->msg_controllen = msg.msg_controllen;
kmsg->msg_flags = msg.msg_flags; kmsg->msg_flags = msg.msg_flags;
...@@ -1935,7 +1935,8 @@ static int copy_msghdr_from_user(struct msghdr *kmsg, ...@@ -1935,7 +1935,8 @@ static int copy_msghdr_from_user(struct msghdr *kmsg,
if (msg.msg_name && kmsg->msg_namelen) { if (msg.msg_name && kmsg->msg_namelen) {
if (!save_addr) { if (!save_addr) {
err = move_addr_to_kernel(msg.msg_name, kmsg->msg_namelen, err = move_addr_to_kernel(msg.msg_name,
kmsg->msg_namelen,
kmsg->msg_name); kmsg->msg_name);
if (err < 0) if (err < 0)
return err; return err;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment