From: Michael S. Tsirkin Date: Mon, 1 Dec 2014 11:31:45 +0000 (+0200) Subject: virtio_console: fix sparse warnings X-Git-Tag: omap-for-v3.19/fixes-rc1~129^2~18 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=48b36066b48025b7cd7d46c9a879f2f72fd9086a;p=pandora-kernel.git virtio_console: fix sparse warnings CHECK drivers/char/virtio_console.c drivers/char/virtio_console.c:687:36: warning: incorrect type in argument 1 (different address spaces) drivers/char/virtio_console.c:687:36: expected void [noderef] *to drivers/char/virtio_console.c:687:36: got char *out_buf drivers/char/virtio_console.c:790:35: warning: incorrect type in argument 2 (different address spaces) drivers/char/virtio_console.c:790:35: expected char *out_buf drivers/char/virtio_console.c:790:35: got char [noderef] *ubuf fill_readbuf is reused with both kernel and userspace pointers, depending on value of to_user flag. Tag address parameter as __user, and cast to/from regular pointer type when we know it's safe. Signed-off-by: Michael S. Tsirkin --- Reading git-diff-tree failed