virtualization.lists.linux-foundation.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 52/56] drivers/char/virtio: support compiling out splice
       [not found] <1415913813-362-1-git-send-email-pieter@boesman.nl>
@ 2014-11-13 21:23 ` Pieter Smith
       [not found] ` <1415913813-362-53-git-send-email-pieter@boesman.nl>
  1 sibling, 0 replies; 2+ messages in thread
From: Pieter Smith @ 2014-11-13 21:23 UTC (permalink / raw)
  To: pieter
  Cc: Arnd Bergmann, Greg Kroah-Hartman, open list, Josh Triplett,
	Amit Shah, open list:VIRTIO CONSOLE DR...

Compile out splice support from virtio character driver when the splice-family
of syscalls is not supported by the system (i.e. CONFIG_SYSCALL_SPLICE is
undefined).

Signed-off-by: Pieter Smith <pieter@boesman.nl>
---
 drivers/char/virtio_console.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/drivers/char/virtio_console.c b/drivers/char/virtio_console.c
index b585b47..de5e2cb 100644
--- a/drivers/char/virtio_console.c
+++ b/drivers/char/virtio_console.c
@@ -870,6 +870,7 @@ struct sg_list {
 	struct scatterlist *sg;
 };
 
+#ifdef CONFIG_SYSCALL_SPLICE
 static int pipe_to_sg(struct pipe_inode_info *pipe, struct pipe_buffer *buf,
 			struct splice_desc *sd)
 {
@@ -976,6 +977,7 @@ error_out:
 	pipe_unlock(pipe);
 	return ret;
 }
+#endif /* #ifdef CONFIG_SYSCALL_SPLICE */
 
 static unsigned int port_fops_poll(struct file *filp, poll_table *wait)
 {
@@ -1109,7 +1111,7 @@ static const struct file_operations port_fops = {
 	.open  = port_fops_open,
 	.read  = port_fops_read,
 	.write = port_fops_write,
-	.splice_write = port_fops_splice_write,
+	SPLICE_WRITE_INIT(port_fops_splice_write)
 	.poll  = port_fops_poll,
 	.release = port_fops_release,
 	.fasync = port_fops_fasync,
-- 
1.9.1

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH 52/56] drivers/char/virtio: support compiling out splice
       [not found] ` <1415913813-362-53-git-send-email-pieter@boesman.nl>
@ 2014-11-13 22:09   ` Greg Kroah-Hartman
  0 siblings, 0 replies; 2+ messages in thread
From: Greg Kroah-Hartman @ 2014-11-13 22:09 UTC (permalink / raw)
  To: Pieter Smith
  Cc: Amit Shah, open list, Josh Triplett, Arnd Bergmann,
	open list:VIRTIO CONSOLE DR...

On Thu, Nov 13, 2014 at 10:23:29PM +0100, Pieter Smith wrote:
> Compile out splice support from virtio character driver when the splice-family
> of syscalls is not supported by the system (i.e. CONFIG_SYSCALL_SPLICE is
> undefined).
> 
> Signed-off-by: Pieter Smith <pieter@boesman.nl>
> ---
>  drivers/char/virtio_console.c | 4 +++-
>  1 file changed, 3 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/char/virtio_console.c b/drivers/char/virtio_console.c
> index b585b47..de5e2cb 100644
> --- a/drivers/char/virtio_console.c
> +++ b/drivers/char/virtio_console.c
> @@ -870,6 +870,7 @@ struct sg_list {
>  	struct scatterlist *sg;
>  };
>  
> +#ifdef CONFIG_SYSCALL_SPLICE
>  static int pipe_to_sg(struct pipe_inode_info *pipe, struct pipe_buffer *buf,
>  			struct splice_desc *sd)
>  {
> @@ -976,6 +977,7 @@ error_out:
>  	pipe_unlock(pipe);
>  	return ret;
>  }
> +#endif /* #ifdef CONFIG_SYSCALL_SPLICE */

Not worth the #ifdef mess.

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2014-11-13 22:09 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <1415913813-362-1-git-send-email-pieter@boesman.nl>
2014-11-13 21:23 ` [PATCH 52/56] drivers/char/virtio: support compiling out splice Pieter Smith
     [not found] ` <1415913813-362-53-git-send-email-pieter@boesman.nl>
2014-11-13 22:09   ` Greg Kroah-Hartman

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).