This change fixes the warnings and errors returned by checkpatch.pl in source code files eq_fir.c, eq_iir.c, fir.h, and tone.c.
Signed-off-by: Seppo Ingalsuo seppo.ingalsuo@linux.intel.com --- src/audio/eq_fir.c | 3 +-- src/audio/eq_iir.c | 6 +++--- src/audio/fir.h | 11 +++++++---- src/audio/tone.c | 8 ++++---- 4 files changed, 15 insertions(+), 13 deletions(-)
diff --git a/src/audio/eq_fir.c b/src/audio/eq_fir.c index df87323..ae87f92 100644 --- a/src/audio/eq_fir.c +++ b/src/audio/eq_fir.c @@ -483,8 +483,7 @@ static int eq_fir_reset(struct comp_dev *dev)
struct comp_driver comp_eq_fir = { .type = SOF_COMP_EQ_FIR, - .ops = - { + .ops = { .new = eq_fir_new, .free = eq_fir_free, .params = eq_fir_params, diff --git a/src/audio/eq_iir.c b/src/audio/eq_iir.c index 714202a..c5932af 100644 --- a/src/audio/eq_iir.c +++ b/src/audio/eq_iir.c @@ -352,7 +352,8 @@ static int eq_iir_cmd(struct comp_dev *dev, int cmd, void *data)
memcpy(cd->config, blob->data, bs); /* Initialize all channels, the actual number of channels may - * not be set yet. */ + * not be set yet. + */ ret = eq_iir_setup(cd->iir, cd->config, PLATFORM_MAX_CHANNELS);
/* Print trace information */ @@ -497,8 +498,7 @@ static int eq_iir_reset(struct comp_dev *dev)
struct comp_driver comp_eq_iir = { .type = SOF_COMP_EQ_IIR, - .ops = - { + .ops = { .new = eq_iir_new, .free = eq_iir_free, .params = eq_iir_params, diff --git a/src/audio/fir.h b/src/audio/fir.h index 9e9b544..a99bcde 100644 --- a/src/audio/fir.h +++ b/src/audio/fir.h @@ -103,14 +103,17 @@ static inline int32_t fir_32x16(struct fir_state_32x16 *fir, int32_t x) * calculate before circular wrap need. */ n1 = fir->rwi + 1; - tmp_ri = (fir->rwi)++; /* Point to newest sample and advance read index */ + /* Point to newest sample and advance read index */ + tmp_ri = (fir->rwi)++; if (fir->rwi == fir->delay_size) fir->rwi = 0;
if (n1 > fir->length) { /* No need to un-wrap fir read index, make sure ri - * is >= 0 after FIR computation */ - fir_part_32x16(&y, fir->length, fir->coef, &i, fir->delay, &tmp_ri); + * is >= 0 after FIR computation. + */ + fir_part_32x16(&y, fir->length, fir->coef, &i, fir->delay, + &tmp_ri); } else { n2 = fir->length - n1; /* Part 1, loop n1 times, fir_ri becomes -1 */ @@ -126,5 +129,5 @@ static inline int32_t fir_32x16(struct fir_state_32x16 *fir, int32_t x) if (fir->mute) return 0; else - return(int32_t) y; + return (int32_t)y; } diff --git a/src/audio/tone.c b/src/audio/tone.c index 5d88a5f..9aa795f 100644 --- a/src/audio/tone.c +++ b/src/audio/tone.c @@ -91,7 +91,7 @@ static void tone_s32_default(struct comp_dev *dev, struct comp_buffer *sink, { struct comp_data *cd = comp_get_drvdata(dev); int32_t sine_sample; - int32_t *dest = (int32_t*) sink->w_ptr; + int32_t *dest = (int32_t *) sink->w_ptr; int i, n, n_wrap_dest; int nch = sink->params.pcm->channels;
@@ -152,7 +152,7 @@ static int32_t tonegen(struct tone_state *sg) if (sg->mute) return 0; else - return(int32_t) sine; /* Q1.31 no saturation need */ + return (int32_t) sine; /* Q1.31 no saturation need */ }
static void tonegen_control(struct tone_state *sg) @@ -420,6 +420,7 @@ static int tone_cmd(struct comp_dev *dev, int cmd, void *data) { struct comp_data *cd = comp_get_drvdata(dev); struct sof_ipc_comp_tone *ct; + trace_tone("TCm");
switch (cmd) { @@ -554,8 +555,7 @@ static int tone_reset(struct comp_dev *dev)
struct comp_driver comp_tone = { .type = SOF_COMP_TONE, - .ops = - { + .ops = { .new = tone_new, .free = tone_free, .params = tone_params,