All of lore.kernel.org
 help / color / mirror / Atom feed
From: Rusty Russell <rusty@rustcorp.com.au>
To: Amit Shah <amit.shah@redhat.com>
Cc: "Michael S. Tsirkin" <mst@redhat.com>,
	"Linus Walleij" <linus.walleij@linaro.org>,
	linux-kernel@vger.kernel.org,
	virtualization@lists.linux-foundation.org,
	"Masami Hiramatsu" <masami.hiramatsu.pt@hitachi.com>,
	"Sjur Brændeland" <sjur.brandeland@stericsson.com>
Subject: Re: [PATCHv7 3/4] virtio_console: Merge struct buffer_token into struct port_buffer
Date: Tue, 23 Oct 2012 10:49:24 +1030	[thread overview]
Message-ID: <87fw56hwfn.fsf@rustcorp.com.au> (raw)
In-Reply-To: <1350287856-5284-4-git-send-email-sjur.brandeland@stericsson.com>

sjur.brandeland@stericsson.com writes:
> From: Sjur Brændeland <sjur.brandeland@stericsson.com>
>
> Refactoring the splice functionality by unifying the approach for
> sending scatter-lists and regular buffers. This simplifies
> buffer handling and reduces code size. Splice will now allocate
> a port_buffer and send_buf() and free_buf() can always be used
> for any buffer.
>
> Signed-off-by: Sjur Brændeland <sjur.brandeland@stericsson.com>

This looks sensible; a couple of extra blank lines inserted though.

Amit?

> @@ -1033,6 +1008,8 @@ static const struct file_operations port_fops = {
>  static int put_chars(u32 vtermno, const char *buf, int count)
>  {
>  	struct port *port;
> +	struct scatterlist sg[1];
> +
>  
>  	if (unlikely(early_put_chars))
>  		return early_put_chars(vtermno, buf, count);
> @@ -1041,7 +1018,9 @@ static int put_chars(u32 vtermno, const char *buf, int count)
>  	if (!port)
>  		return -EPIPE;
>  
> -	return send_buf(port, (void *)buf, count, false);
> +	sg_init_one(sg, buf, count);
> +	return __send_to_port(port, sg, 1, count, (void *)buf, false);
> +
>  }
>  
>  /*

Cheers,
Rusty.
_______________________________________________
Virtualization mailing list
Virtualization@lists.linux-foundation.org
https://lists.linuxfoundation.org/mailman/listinfo/virtualization

WARNING: multiple messages have this Message-ID (diff)
From: Rusty Russell <rusty@rustcorp.com.au>
To: sjur.brandeland@stericsson.com, Amit Shah <amit.shah@redhat.com>
Cc: "Michael S. Tsirkin" <mst@redhat.com>,
	"Linus Walleij" <linus.walleij@linaro.org>,
	"Masami Hiramatsu" <masami.hiramatsu.pt@hitachi.com>,
	"Ohad Ben-Cohen" <ohad@wizery.com>,
	linux-kernel@vger.kernel.org,
	virtualization@lists.linux-foundation.org, sjurbren@gmail.com,
	"Sjur Brændeland" <sjur.brandeland@stericsson.com>
Subject: Re: [PATCHv7 3/4] virtio_console: Merge struct buffer_token into struct port_buffer
Date: Tue, 23 Oct 2012 10:49:24 +1030	[thread overview]
Message-ID: <87fw56hwfn.fsf@rustcorp.com.au> (raw)
In-Reply-To: <1350287856-5284-4-git-send-email-sjur.brandeland@stericsson.com>

sjur.brandeland@stericsson.com writes:
> From: Sjur Brændeland <sjur.brandeland@stericsson.com>
>
> Refactoring the splice functionality by unifying the approach for
> sending scatter-lists and regular buffers. This simplifies
> buffer handling and reduces code size. Splice will now allocate
> a port_buffer and send_buf() and free_buf() can always be used
> for any buffer.
>
> Signed-off-by: Sjur Brændeland <sjur.brandeland@stericsson.com>

This looks sensible; a couple of extra blank lines inserted though.

Amit?

> @@ -1033,6 +1008,8 @@ static const struct file_operations port_fops = {
>  static int put_chars(u32 vtermno, const char *buf, int count)
>  {
>  	struct port *port;
> +	struct scatterlist sg[1];
> +
>  
>  	if (unlikely(early_put_chars))
>  		return early_put_chars(vtermno, buf, count);
> @@ -1041,7 +1018,9 @@ static int put_chars(u32 vtermno, const char *buf, int count)
>  	if (!port)
>  		return -EPIPE;
>  
> -	return send_buf(port, (void *)buf, count, false);
> +	sg_init_one(sg, buf, count);
> +	return __send_to_port(port, sg, 1, count, (void *)buf, false);
> +
>  }
>  
>  /*

Cheers,
Rusty.

  reply	other threads:[~2012-10-23  0:19 UTC|newest]

Thread overview: 40+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-10-15  7:57 [PATCHv7 0/4] virtio_console: Add rproc_serial driver sjur.brandeland
2012-10-15  7:57 ` sjur.brandeland
2012-10-15  7:57 ` [PATCHv7 1/4] virtio_console: Free buffer if splice fails sjur.brandeland
2012-10-23  0:12   ` Rusty Russell
2012-10-23  0:12     ` Rusty Russell
2012-10-15  7:57 ` sjur.brandeland
2012-10-15  7:57 ` [PATCHv7 2/4] virtio_console: Use kmalloc instead of kzalloc sjur.brandeland
2012-10-15  7:57   ` sjur.brandeland
2012-10-23  1:36   ` Rusty Russell
2012-10-23  1:36     ` Rusty Russell
2012-10-15  7:57 ` [PATCHv7 3/4] virtio_console: Merge struct buffer_token into struct port_buffer sjur.brandeland
2012-10-15  7:57   ` sjur.brandeland
2012-10-23  0:19   ` Rusty Russell [this message]
2012-10-23  0:19     ` Rusty Russell
2012-10-15  7:57 ` [PATCHv7 4/4] virtio_console: Add support for remoteproc serial sjur.brandeland
2012-10-15  7:57   ` sjur.brandeland
2012-10-23  1:47   ` Rusty Russell
2012-10-28 21:58     ` Sjur Brændeland
2012-10-28 21:58       ` Sjur Brændeland
2012-11-01  7:39     ` Amit Shah
2012-11-01  7:39     ` Amit Shah
2012-11-01 23:22       ` Rusty Russell
2012-11-01 23:22         ` Rusty Russell
2012-11-02 10:20         ` Amit Shah
2012-11-02 10:20           ` Amit Shah
2012-11-02 10:44           ` Sjur BRENDELAND
2012-11-02 10:44             ` Sjur BRENDELAND
2012-11-07 13:43           ` [PATCH resend] virtio_console: Free buffers from out-queue upon close sjur.brandeland
2012-11-07 13:43             ` sjur.brandeland
2012-11-07 23:58             ` Rusty Russell
2012-11-08  8:59               ` Amit Shah
2012-11-08  8:59                 ` Amit Shah
2012-11-08  9:25                 ` Sjur Brændeland
2012-11-08  9:25                   ` Sjur Brændeland
2012-11-07 23:58             ` Rusty Russell
2012-11-07 14:22           ` sjur.brandeland
2012-11-07 14:22             ` sjur.brandeland
2012-10-23  1:47   ` [PATCHv7 4/4] virtio_console: Add support for remoteproc serial Rusty Russell
2012-10-22 13:00 ` [PATCHv7 0/4] virtio_console: Add rproc_serial driver Amit Shah
2012-10-22 13:00   ` Amit Shah

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87fw56hwfn.fsf@rustcorp.com.au \
    --to=rusty@rustcorp.com.au \
    --cc=amit.shah@redhat.com \
    --cc=linus.walleij@linaro.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=masami.hiramatsu.pt@hitachi.com \
    --cc=mst@redhat.com \
    --cc=sjur.brandeland@stericsson.com \
    --cc=virtualization@lists.linux-foundation.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.