Skip to content

Commit f7fb24d

Browse files
lyakhlgirdwood
authored andcommitted
audio: module-adapter: (cosmetic) remove function names
Remove function names from logging and merge needlessly split lines. Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
1 parent b65865f commit f7fb24d

1 file changed

Lines changed: 24 additions & 34 deletions

File tree

src/audio/module_adapter/module_adapter.c

Lines changed: 24 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -66,17 +66,17 @@ struct comp_dev *module_adapter_new_ext(const struct comp_driver *drv,
6666
struct module_config *dst;
6767
const struct module_interface *const interface = drv->adapter_ops;
6868

69-
comp_cl_dbg(drv, "module_adapter_new() start");
69+
comp_cl_dbg(drv, "start");
7070

7171
if (!config) {
72-
comp_cl_err(drv, "module_adapter_new(), wrong input params! drv = %zx config = %zx",
72+
comp_cl_err(drv, "wrong input params! drv = %zx config = %zx",
7373
(size_t)drv, (size_t)config);
7474
return NULL;
7575
}
7676

7777
dev = comp_alloc(drv, sizeof(*dev));
7878
if (!dev) {
79-
comp_cl_err(drv, "module_adapter_new(), failed to allocate memory for comp_dev");
79+
comp_cl_err(drv, "failed to allocate memory for comp_dev");
8080
return NULL;
8181
}
8282
dev->ipc_config = *config;
@@ -92,7 +92,7 @@ struct comp_dev *module_adapter_new_ext(const struct comp_driver *drv,
9292

9393
mod = module_driver_heap_rzalloc(drv->user_heap, flags, sizeof(*mod));
9494
if (!mod) {
95-
comp_err(dev, "module_adapter_new(), failed to allocate memory for module");
95+
comp_err(dev, "failed to allocate memory for module");
9696
goto err;
9797
}
9898

@@ -106,7 +106,7 @@ struct comp_dev *module_adapter_new_ext(const struct comp_driver *drv,
106106

107107
ret = module_adapter_init_data(dev, dst, config, spec);
108108
if (ret) {
109-
comp_err(dev, "module_adapter_new() %d: module init data failed",
109+
comp_err(dev, "%d: module init data failed",
110110
ret);
111111
goto err;
112112
}
@@ -128,7 +128,7 @@ struct comp_dev *module_adapter_new_ext(const struct comp_driver *drv,
128128
/* Init processing module */
129129
ret = module_init(mod);
130130
if (ret) {
131-
comp_err(dev, "module_adapter_new() %d: module initialization failed",
131+
comp_err(dev, "%d: module initialization failed",
132132
ret);
133133
goto err;
134134
}
@@ -152,12 +152,12 @@ struct comp_dev *module_adapter_new_ext(const struct comp_driver *drv,
152152
*/
153153
ret = module_adapter_params(dev, &params);
154154
if (ret) {
155-
comp_err(dev, "module_adapter_new() %d: module params failed", ret);
155+
comp_err(dev, "%d: module params failed", ret);
156156
goto err;
157157
}
158158
#endif
159159

160-
comp_dbg(dev, "module_adapter_new() done");
160+
comp_dbg(dev, "done");
161161
return dev;
162162
err:
163163
#if CONFIG_IPC_MAJOR_4
@@ -213,7 +213,7 @@ int module_adapter_prepare(struct comp_dev *dev)
213213
int memory_flags;
214214
int i = 0;
215215

216-
comp_dbg(dev, "module_adapter_prepare() start");
216+
comp_dbg(dev, "start");
217217
#if CONFIG_IPC_MAJOR_4
218218
/*
219219
* if the stream_params are valid, just update the sink/source buffer params. If not,
@@ -249,8 +249,7 @@ int module_adapter_prepare(struct comp_dev *dev)
249249

250250
if (ret) {
251251
if (ret != PPL_STATUS_PATH_STOP)
252-
comp_err(dev, "module_adapter_prepare() error %x: module prepare failed",
253-
ret);
252+
comp_err(dev, "error %d: module prepare failed", ret);
254253
return ret;
255254
}
256255

@@ -484,7 +483,7 @@ int module_adapter_prepare(struct comp_dev *dev)
484483
}
485484
}
486485

487-
comp_dbg(dev, "module_adapter_prepare() done");
486+
comp_dbg(dev, "done");
488487

489488
return 0;
490489

@@ -564,9 +563,8 @@ EXPORT_SYMBOL(module_adapter_params);
564563
* @buff_size: size of the module input buffer
565564
* @bytes: number of bytes available in the source buffer
566565
*/
567-
static void
568-
ca_copy_from_source_to_module(const struct audio_stream *source,
569-
void *buff, uint32_t buff_size, size_t bytes)
566+
static void ca_copy_from_source_to_module(const struct audio_stream *source,
567+
void *buff, uint32_t buff_size, size_t bytes)
570568
{
571569
/* head_size - available data until end of source buffer */
572570
const int without_wrap = audio_stream_bytes_without_wrap(source,
@@ -592,9 +590,8 @@ ca_copy_from_source_to_module(const struct audio_stream *source,
592590
* @buff: pointer to the module output buffer
593591
* @bytes: number of bytes available in the module output buffer
594592
*/
595-
static void
596-
ca_copy_from_module_to_sink(const struct audio_stream *sink,
597-
void *buff, size_t bytes)
593+
static void ca_copy_from_module_to_sink(const struct audio_stream *sink,
594+
void *buff, size_t bytes)
598595
{
599596
/* head_size - free space until end of sink buffer */
600597
const int without_wrap = audio_stream_bytes_without_wrap(sink, audio_stream_get_wptr(sink));
@@ -723,10 +720,9 @@ static void module_adapter_process_output(struct comp_dev *dev)
723720
mod->total_data_produced += mod->output_buffers[0].size;
724721
}
725722

726-
static uint32_t
727-
module_single_sink_setup(struct comp_dev *dev,
728-
struct comp_buffer **source,
729-
struct comp_buffer **sinks)
723+
static uint32_t module_single_sink_setup(struct comp_dev *dev,
724+
struct comp_buffer **source,
725+
struct comp_buffer **sinks)
730726
{
731727
struct processing_module *mod = comp_mod(dev);
732728
struct list_item *blist;
@@ -764,10 +760,9 @@ module_single_sink_setup(struct comp_dev *dev,
764760
return num_input_buffers;
765761
}
766762

767-
static uint32_t
768-
module_single_source_setup(struct comp_dev *dev,
769-
struct comp_buffer **source,
770-
struct comp_buffer **sinks)
763+
static uint32_t module_single_source_setup(struct comp_dev *dev,
764+
struct comp_buffer **source,
765+
struct comp_buffer **sinks)
771766
{
772767
struct processing_module *mod = comp_mod(dev);
773768
struct list_item *blist;
@@ -911,9 +906,7 @@ static int module_adapter_audio_stream_type_copy(struct comp_dev *dev)
911906
mod->output_buffers, num_output_buffers);
912907
if (ret) {
913908
if (ret != -ENOSPC && ret != -ENODATA) {
914-
comp_err(dev,
915-
"module_adapter_audio_stream_type_copy() failed with error: %x",
916-
ret);
909+
comp_err(dev, "failed with error: %d", ret);
917910
goto out;
918911
}
919912

@@ -1052,8 +1045,7 @@ static int module_adapter_sink_source_copy(struct comp_dev *dev)
10521045
mod->sinks, mod->num_of_sinks);
10531046

10541047
if (ret)
1055-
comp_err(dev, "module_adapter_sink_source_copy() process failed with error: %d",
1056-
ret);
1048+
comp_err(dev, "process failed with error: %d", ret);
10571049

10581050
/* count number of processed data. To be removed in pipeline 2.0 */
10591051
for (i = 0; i < mod->num_of_sources; i++)
@@ -1114,9 +1106,7 @@ static int module_adapter_raw_data_type_copy(struct comp_dev *dev)
11141106
mod->output_buffers, mod->num_of_sinks);
11151107
if (ret) {
11161108
if (ret != -ENOSPC && ret != -ENODATA) {
1117-
comp_err(dev,
1118-
"module_adapter_raw_data_type_copy() %x: module processing failed",
1119-
ret);
1109+
comp_err(dev, "%d: module processing failed", ret);
11201110
goto out;
11211111
}
11221112

0 commit comments

Comments
 (0)