Skip to content

Commit 886b7ee

Browse files
lyakhlgirdwood
authored andcommitted
pipeline: (cosmetic) use bool type, adjust line lengths
Use bool type for boolean flags, split some too long lines, merge some needlessly split lines. Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
1 parent e879e95 commit 886b7ee

File tree

1 file changed

+10
-8
lines changed

1 file changed

+10
-8
lines changed

src/audio/pipeline/pipeline-stream.c

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -64,23 +64,24 @@ static int pipeline_comp_trigger(struct comp_dev *current,
6464
struct pipeline_walk_context *ctx, int dir)
6565
{
6666
struct pipeline_data *ppl_data = ctx->comp_data;
67-
int is_single_ppl = comp_is_single_pipeline(current, ppl_data->start);
68-
int is_same_sched =
67+
bool is_single_ppl = comp_is_single_pipeline(current, ppl_data->start);
68+
bool is_same_sched =
6969
pipeline_is_same_sched_comp(current->pipeline,
7070
ppl_data->start->pipeline);
7171
int err;
7272

73-
pipe_dbg(current->pipeline, "pipeline_comp_trigger(), current->comp.id = %u, dir = %u",
73+
pipe_dbg(current->pipeline,
74+
"pipeline_comp_trigger(), current->comp.id = %u, dir = %u",
7475
dev_comp_id(current), dir);
7576

7677
/* trigger should propagate to the connected pipelines,
7778
* which need to be scheduled together
7879
*/
7980
if (!is_single_ppl && !is_same_sched) {
80-
pipe_dbg(current->pipeline, "pipeline_comp_trigger(), current is from another pipeline");
81+
pipe_dbg(current->pipeline,
82+
"pipeline_comp_trigger(), current is from another pipeline");
8183

82-
if (pipeline_should_report_enodata_on_trigger(current, ctx,
83-
dir))
84+
if (pipeline_should_report_enodata_on_trigger(current, ctx, dir))
8485
return -ENODATA;
8586

8687
return 0;
@@ -101,14 +102,15 @@ static int pipeline_comp_copy(struct comp_dev *current,
101102
struct pipeline_walk_context *ctx, int dir)
102103
{
103104
struct pipeline_data *ppl_data = ctx->comp_data;
104-
int is_single_ppl = comp_is_single_pipeline(current, ppl_data->start);
105+
bool is_single_ppl = comp_is_single_pipeline(current, ppl_data->start);
105106
int err;
106107

107108
pipe_dbg(current->pipeline, "pipeline_comp_copy(), current->comp.id = %u, dir = %u",
108109
dev_comp_id(current), dir);
109110

110111
if (!is_single_ppl) {
111-
pipe_dbg(current->pipeline, "pipeline_comp_copy(), current is from another pipeline and can't be scheduled together");
112+
pipe_dbg(current->pipeline,
113+
"pipeline_comp_copy(), current is from another pipeline and can't be scheduled together");
112114
return 0;
113115
}
114116

0 commit comments

Comments
 (0)