This patch fixes following sparse warnings:
drivers/staging/gdm72xx/gdm_wimax.c:543:37: warning: incorrect type in argument 1 (different address spaces)
drivers/staging/gdm72xx/gdm_wimax.c:543:37: expected void [noderef] <asn:1>*to
drivers/staging/gdm72xx/gdm_wimax.c:543:37: got void *buf
drivers/staging/gdm72xx/gdm_wimax.c:566:41: warning: incorrect type in argument 2 (different address spaces)
drivers/staging/gdm72xx/gdm_wimax.c:566:41: expected void const [noderef] <asn:1>*from
drivers/staging/gdm72xx/gdm_wimax.c:566:41: got void *buf
Signed-off-by: Monam Agarwal <monamagarwal123@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
if (src->size) {
if (!dst->buf)
return -EINVAL;
- if (copy_to_user(dst->buf, src->buf, size))
+ if (copy_to_user((void __user *)dst->buf, src->buf, size))
return -EFAULT;
}
return 0;
return -ENOMEM;
}
- if (copy_from_user(dst->buf, src->buf, src->size)) {
+ if (copy_from_user(dst->buf, (void __user *)src->buf, src->size)) {
kdelete(&dst->buf);
return -EFAULT;
}