linux-bluetooth.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Luiz Augusto von Dentz <luiz.dentz@gmail.com>
To: Lucas De Marchi <lucas.demarchi@profusion.mobi>
Cc: linux-bluetooth@vger.kernel.org
Subject: Re: [PATCH BlueZ] AVCTP: Make use of sendmsg to avoid copying data
Date: Thu, 19 Jul 2012 15:01:06 +0300	[thread overview]
Message-ID: <CABBYNZKE27TCUBw=HeHBgAn01BR7hGa21tmEnczVR03yWZFUtg@mail.gmail.com> (raw)
In-Reply-To: <CAMOw1v7Z1VTw2Q=y15O+iB7pCWip_HvNWQe7sM3YKtVReM4V=A@mail.gmail.com>

Hi Lucas,

On Thu, Jul 19, 2012 at 2:36 PM, Lucas De Marchi
<lucas.demarchi@profusion.mobi> wrote:
> Hi Luiz,
>
> On Thu, Jul 19, 2012 at 7:49 AM, Luiz Augusto von Dentz
> <luiz.dentz@gmail.com> wrote:
>> From: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
>>
>> This use sendmsg to send headers and operands in separated buffers
>> avoiding memcpy.
>> ---
>
> Nice...  only a small issue
>
>>  audio/avctp.c |   21 ++++++++++++---------
>>  1 file changed, 12 insertions(+), 9 deletions(-)
>>
>> diff --git a/audio/avctp.c b/audio/avctp.c
>> index e3e5275..9ef6161 100644
>> --- a/audio/avctp.c
>> +++ b/audio/avctp.c
>> @@ -929,23 +929,20 @@ static int avctp_send(struct avctp *session, uint8_t transaction, uint8_t cr,
>>                                 uint8_t code, uint8_t subunit, uint8_t opcode,
>>                                 uint8_t *operands, size_t operand_count)
>>  {
>> -       uint8_t *buf;
>> +       uint8_t buf[AVCTP_HEADER_LENGTH + AVC_HEADER_LENGTH];
>
> you need to zero-out this, or set all the fields below.

It should be now fixed, thanks.


-- 
Luiz Augusto von Dentz

      reply	other threads:[~2012-07-19 12:01 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-07-19 10:49 [PATCH BlueZ] AVCTP: Make use of sendmsg to avoid copying data Luiz Augusto von Dentz
2012-07-19 11:22 ` Johan Hedberg
2012-07-19 11:36 ` Lucas De Marchi
2012-07-19 12:01   ` Luiz Augusto von Dentz [this message]

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='CABBYNZKE27TCUBw=HeHBgAn01BR7hGa21tmEnczVR03yWZFUtg@mail.gmail.com' \
    --to=luiz.dentz@gmail.com \
    --cc=linux-bluetooth@vger.kernel.org \
    --cc=lucas.demarchi@profusion.mobi \
    /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).