qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Gerd Hoffmann <kraxel@redhat.com>
To: Hans de Goede <hdegoede@redhat.com>
Cc: Jan Kiszka <jan.kiszka@siemens.com>, qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [PATCH] uhci: Use an intermediate buffer for usb packet data
Date: Fri, 26 Apr 2013 14:32:12 +0200	[thread overview]
Message-ID: <517A73CC.8040205@redhat.com> (raw)
In-Reply-To: <1366885267-9694-1-git-send-email-hdegoede@redhat.com>

  Hi,

> +    if (max_len <= sizeof(async->static_buf)) {
> +        async->buf = async->static_buf;
> +    } else {
> +        async->buf = g_malloc(max_len);
> +    }

Do we need this?  I think we should simply make the static buffer big
enough for the maximum allowed packet size (isn't that big on usb 1.1,
isn't it?) or allocate dynamically unconditionally.

> +    qemu_iovec_add(&async->packet.iov, async->buf, max_len);

There is usb_packet_addbuf() ...

Looks good otherwise.

cheers,
  Gerd

  reply	other threads:[~2013-04-26 12:32 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-04-25 10:21 [Qemu-devel] [PATCH] uhci: Use an intermediate buffer for usb packet data Hans de Goede
2013-04-26 12:32 ` Gerd Hoffmann [this message]
2013-04-26 14:01   ` Hans de Goede
  -- strict thread matches above, loose matches on Subject: below --
2013-05-06  8:48 [Qemu-devel] [PATCH v2 0/1] " Hans de Goede
2013-05-06  8:48 ` [Qemu-devel] [PATCH] " Hans de Goede
2013-05-07 13:36   ` Gerd Hoffmann

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=517A73CC.8040205@redhat.com \
    --to=kraxel@redhat.com \
    --cc=hdegoede@redhat.com \
    --cc=jan.kiszka@siemens.com \
    --cc=qemu-devel@nongnu.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 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).