[PATCH 01/11] net: change len parameter type for memcpy_[to|from]_msg

LABBE Corentin
2015-10-23T12:11:29Z

The len parameter is only used with copy_from_iter() who wait for a
size_t and then compared to return type of copy_from_iter() which is
size_t also. So len must be set as size_t

Signed-off-by: LABBE Corentin <clabbe.montjoie@gmail.com>
---
include/linux/skbuff.h | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/include/linux/skbuff.h b/include/linux/skbuff.h
index 4398411..109a127 100644
--- a/include/linux/skbuff.h
+++ b/include/linux/skbuff.h
@@ -2827,12 +2827,12 @@ int skb_ensure_writable(struct sk_buff *skb, int write_len);
int skb_vlan_pop(struct sk_buff *skb);
int skb_vlan_push(struct sk_buff *skb, __be16 vlan_proto, u16 vlan_tci);

-static inline int memcpy_from_msg(void *data, struct msghdr *msg, int len)
+static inline int memcpy_from_msg(void *data, struct msghdr *msg, size_t len)
{
return copy_from_iter(data, len, &msg->msg_iter) == len ? 0 : -EFAULT;
}

-static inline int memcpy_to_msg(struct msghdr *msg, void *data, int len)
+static inline int memcpy_to_msg(struct msghdr *msg, void *data, size_t len)
{
return copy_to_iter(data, len, &msg->msg_iter) == len ? 0 : -EFAULT;
}
--
2.4.10