@@ -1353,12 +1353,12 @@ void *ib_get_client_data(struct ib_device *device, struct ib_client *client);
void ib_set_client_data(struct ib_device *device, struct ib_client *client,
void *data);
-static inline int ib_copy_from_udata(void *dest, struct ib_udata *udata, size_t len)
+static inline int ib_copy_from_udata(void *dest, const struct ib_udata *udata, size_t len)
{
return copy_from_user(dest, udata->inbuf, len) ? -EFAULT : 0;
}
-static inline int ib_copy_to_udata(struct ib_udata *udata, void *src, size_t len)
+static inline int ib_copy_to_udata(struct ib_udata *udata, const void *src, size_t len)
{
return copy_to_user(udata->outbuf, src, len) ? -EFAULT : 0;
}
Source buffers are not modified, let them be 'const'. Signed-off-by: Yann Droneaud <ydroneaud@opteya.com> Link: http://mid.gmane.org/cover.1376847403.git.ydroneaud@opteya.com --- include/rdma/ib_verbs.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)