All of lore.kernel.org
 help / color / mirror / Atom feed
From: Takashi Sakamoto <o-takashi@sakamocchi.jp>
To: Clemens Ladisch <clemens@ladisch.de>
Cc: tiwai@suse.de, alsa-devel@alsa-project.org, ffado-devel@lists.sf.net
Subject: Re: [PATCH] ALSA: firewire-lib: drop skip argument from helper functions to queue a packet
Date: Thu, 12 May 2016 01:14:53 +0900	[thread overview]
Message-ID: <57335A7D.4020207@sakamocchi.jp> (raw)
In-Reply-To: <5732E3C7.2030604@ladisch.de>

Hi Clemens,

On May 11 2016 16:48, Clemens Ladisch wrote:
> Takashi Sakamoto wrote:
>> On most of audio and music units on IEEE 1394 bus which ALSA firewire stack
>> supports (or plans to support), CIP with two quadlets header is used.
>> Thus, there's no cases to queue packets with blank payload. If such packets
>> are going to be queued, it means that they're for skips of the cycle.
>>
>> This commit simplifies helper functions to queue a packet.
> 
>> @@ -383,8 +382,10 @@ static int queue_packet(struct amdtp_stream *s,
>>  	p.tag = TAG_CIP;
>>  	p.header_length = header_length;
>> -	p.payload_length = (!skip) ? payload_length : 0;
>> -	p.skip = skip;
>> +	if (payload_length > 0)
>> +		p.payload_length = payload_length;
>> +	else
>> +		p.skip = true;
> 
> This can be simplified to:
> 	p.payload_length = payload_length;
> 	p.skip = payload_length == 0;

Yep, but I prefer to split assignment from evaluation in different
lines, just from my taste.

> Acked-by: Clemens Ladisch <clemens@ladisch.de>


Thanks

Takashi Sakamoto

  reply	other threads:[~2016-05-11 16:14 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-05-10 22:35 [PATCH] ALSA: firewire-lib: drop skip argument from helper functions to queue a packet Takashi Sakamoto
2016-05-11  7:48 ` Clemens Ladisch
2016-05-11 16:14   ` Takashi Sakamoto [this message]
2016-05-11 18:37     ` Takashi Iwai

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=57335A7D.4020207@sakamocchi.jp \
    --to=o-takashi@sakamocchi.jp \
    --cc=alsa-devel@alsa-project.org \
    --cc=clemens@ladisch.de \
    --cc=ffado-devel@lists.sf.net \
    --cc=tiwai@suse.de \
    /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.