diff options
author | Takashi Sakamoto <o-takashi@sakamocchi.jp> | 2019-07-07 21:07:59 +0900 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2019-07-08 14:50:42 +0200 |
commit | 0dcb4efb1095d0a1f5f681c2b94e98b009cc5d77 (patch) | |
tree | b9683f0adc626c3d2791bbbe34b30147f18c794d /sound | |
parent | 02394af3e00df73c3674de0783d3a31c8162c840 (diff) |
ALSA: firewire-lib: code refactoring for local variablessound-5.3-rc1
It's better to use int type for loop index. For consistency, the name
of local variable for the number of data block should be plural.
Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound')
-rw-r--r-- | sound/firewire/amdtp-stream.c | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/sound/firewire/amdtp-stream.c b/sound/firewire/amdtp-stream.c index 5e0346e272aa..4d71d74707cf 100644 --- a/sound/firewire/amdtp-stream.c +++ b/sound/firewire/amdtp-stream.c @@ -700,7 +700,8 @@ static void out_stream_callback(struct fw_iso_context *context, u32 tstamp, { struct amdtp_stream *s = private_data; const __be32 *ctx_header = header; - unsigned int i, packets = header_length / sizeof(*ctx_header); + unsigned int packets = header_length / sizeof(*ctx_header); + int i; if (s->packet_index < 0) return; @@ -708,7 +709,7 @@ static void out_stream_callback(struct fw_iso_context *context, u32 tstamp, for (i = 0; i < packets; ++i) { u32 cycle; unsigned int syt; - unsigned int data_block; + unsigned int data_blocks; __be32 *buffer; unsigned int pcm_frames; struct { @@ -719,12 +720,13 @@ static void out_stream_callback(struct fw_iso_context *context, u32 tstamp, cycle = compute_it_cycle(*ctx_header); syt = calculate_syt(s, cycle); - data_block = calculate_data_blocks(s, syt); + data_blocks = calculate_data_blocks(s, syt); buffer = s->buffer.packets[s->packet_index].buffer; - pcm_frames = s->process_data_blocks(s, buffer, data_block, &syt); + pcm_frames = s->process_data_blocks(s, buffer, data_blocks, + &syt); - build_it_pkt_header(s, cycle, &template.params, data_block, syt, - i); + build_it_pkt_header(s, cycle, &template.params, data_blocks, + syt, i); if (queue_out_packet(s, &template.params) < 0) { cancel_stream(s); |