[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <1445602236-24130-2-git-send-email-clabbe.montjoie@gmail.com>
Date: Fri, 23 Oct 2015 14:10:26 +0200
From: LABBE Corentin <clabbe.montjoie@...il.com>
To: alexander.h.duyck@...hat.com, davem@...emloft.net,
edumazet@...gle.com, fw@...len.de, hannes@...essinduktion.org,
jiri@...nulli.us, pablo@...filter.org, tom@...bertland.com,
viro@...iv.linux.org.uk
Cc: LABBE Corentin <clabbe.montjoie@...il.com>,
linux-kernel@...r.kernel.org
Subject: [PATCH 01/11] net: change len parameter type for memcpy_[to|from]_msg
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@...il.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
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists