mirror of
https://github.com/alsa-project/alsa-lib.git
synced 2025-11-07 13:30:07 -05:00
topology: cleanup the SNDERR() calls
- remove the wrong new lines - remove error/warning prefixes (error is error) Signed-off-by: Jaroslav Kysela <perex@perex.cz>
This commit is contained in:
parent
0793ef064a
commit
f42b2c088a
8 changed files with 99 additions and 112 deletions
|
|
@ -61,7 +61,7 @@ struct snd_soc_tplg_private *get_priv_data(struct tplg_elem *elem)
|
|||
priv = &elem->pcm->priv;
|
||||
break;
|
||||
default:
|
||||
SNDERR("error: '%s': no support for private data for type %d\n",
|
||||
SNDERR("'%s': no support for private data for type %d",
|
||||
elem->id, elem->type);
|
||||
}
|
||||
|
||||
|
|
@ -95,7 +95,7 @@ int tplg_parse_refs(snd_config_t *cfg, struct tplg_elem *elem,
|
|||
}
|
||||
|
||||
if (cfg_type != SND_CONFIG_TYPE_COMPOUND) {
|
||||
SNDERR("error: compound type expected for %s", elem->id);
|
||||
SNDERR("compound type expected for %s", elem->id);
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
|
|
@ -183,8 +183,7 @@ static int tplg_parse_data_file(snd_config_t *cfg, struct tplg_elem *elem)
|
|||
|
||||
fp = fopen(filename, "r");
|
||||
if (fp == NULL) {
|
||||
SNDERR("error: invalid data file path '%s'\n",
|
||||
filename);
|
||||
SNDERR("invalid data file path '%s'", filename);
|
||||
return -errno;
|
||||
}
|
||||
|
||||
|
|
@ -192,12 +191,12 @@ static int tplg_parse_data_file(snd_config_t *cfg, struct tplg_elem *elem)
|
|||
size = ftell(fp);
|
||||
fseek(fp, 0L, SEEK_SET);
|
||||
if (size <= 0) {
|
||||
SNDERR("error: invalid data file size %zu\n", size);
|
||||
SNDERR("invalid data file size %zu", size);
|
||||
ret = -EINVAL;
|
||||
goto err;
|
||||
}
|
||||
if (size > TPLG_MAX_PRIV_SIZE) {
|
||||
SNDERR("error: data file too big %zu\n", size);
|
||||
SNDERR("data file too big %zu", size);
|
||||
ret = -EINVAL;
|
||||
goto err;
|
||||
}
|
||||
|
|
@ -350,7 +349,7 @@ static int get_uuid(const char *str, unsigned char *uuid_le)
|
|||
if ((errno == ERANGE && val == ULONG_MAX)
|
||||
|| (errno != 0 && val == 0)
|
||||
|| (val > UCHAR_MAX)) {
|
||||
SNDERR("error: invalid value for uuid\n");
|
||||
SNDERR("invalid value for uuid");
|
||||
ret = -EINVAL;
|
||||
goto out;
|
||||
}
|
||||
|
|
@ -365,7 +364,7 @@ static int get_uuid(const char *str, unsigned char *uuid_le)
|
|||
}
|
||||
|
||||
if (values < 16) {
|
||||
SNDERR("error: less than 16 integers for uuid\n");
|
||||
SNDERR("less than 16 integers for uuid");
|
||||
ret = -EINVAL;
|
||||
}
|
||||
|
||||
|
|
@ -446,7 +445,7 @@ static int tplg_parse_data_hex(snd_config_t *cfg, struct tplg_elem *elem,
|
|||
|
||||
num = get_hex_num(value);
|
||||
if (num <= 0) {
|
||||
SNDERR("error: malformed hex variable list %s\n", value);
|
||||
SNDERR("malformed hex variable list %s", value);
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
|
|
@ -454,7 +453,7 @@ static int tplg_parse_data_hex(snd_config_t *cfg, struct tplg_elem *elem,
|
|||
priv = elem->data;
|
||||
|
||||
if (size > TPLG_MAX_PRIV_SIZE) {
|
||||
SNDERR("error: data too big %d\n", size);
|
||||
SNDERR("data too big %d", size);
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
|
|
@ -492,7 +491,7 @@ static int get_token_value(const char *token_id,
|
|||
return tokens->token[i].value;
|
||||
}
|
||||
|
||||
SNDERR("error: cannot find token id '%s'\n", token_id);
|
||||
SNDERR("cannot find token id '%s'", token_id);
|
||||
return -1;
|
||||
}
|
||||
|
||||
|
|
@ -579,7 +578,7 @@ static int copy_tuples(struct tplg_elem *elem,
|
|||
* tuple_set->num_tuples;
|
||||
size += set_size;
|
||||
if (size > TPLG_MAX_PRIV_SIZE) {
|
||||
SNDERR("error: data too big %d\n", size);
|
||||
SNDERR("data too big %d", size);
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
|
|
@ -662,13 +661,13 @@ static int build_tuples(snd_tplg_t *tplg, struct tplg_elem *elem)
|
|||
ref->id, SND_TPLG_TYPE_TUPLE, elem->index);
|
||||
tuples = ref->elem;
|
||||
if (!tuples) {
|
||||
SNDERR("error: cannot find tuples %s\n", ref->id);
|
||||
SNDERR("cannot find tuples %s", ref->id);
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
tokens = get_tokens(tplg, tuples);
|
||||
if (!tokens) {
|
||||
SNDERR("error: cannot find token for %s\n", ref->id);
|
||||
SNDERR("cannot find token for %s", ref->id);
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
|
|
@ -762,7 +761,7 @@ static int parse_tuple_set(snd_config_t *cfg,
|
|||
|
||||
type = get_tuple_type(id);
|
||||
if (type < 0) {
|
||||
SNDERR("error: invalid tuple type '%s'", id);
|
||||
SNDERR("invalid tuple type '%s'", id);
|
||||
return type;
|
||||
}
|
||||
|
||||
|
|
@ -819,7 +818,7 @@ static int parse_tuple_set(snd_config_t *cfg,
|
|||
case SND_SOC_TPLG_TUPLE_TYPE_WORD:
|
||||
ival = tplg_get_unsigned(n, &tuple_val, 0);
|
||||
if (ival < 0) {
|
||||
SNDERR("error: tuple %s: %s\n", id, snd_strerror(ival));
|
||||
SNDERR("tuple %s: %s", id, snd_strerror(ival));
|
||||
goto err;
|
||||
}
|
||||
|
||||
|
|
@ -829,7 +828,7 @@ static int parse_tuple_set(snd_config_t *cfg,
|
|||
&& tuple_val > USHRT_MAX)
|
||||
|| (type == SND_SOC_TPLG_TUPLE_TYPE_BYTE
|
||||
&& tuple_val > UCHAR_MAX)) {
|
||||
SNDERR("error: tuple %s: invalid value\n", id);
|
||||
SNDERR("tuple %s: invalid value", id);
|
||||
goto err;
|
||||
}
|
||||
|
||||
|
|
@ -941,7 +940,7 @@ static int parse_tuple_sets(snd_config_t *cfg,
|
|||
|
||||
if (snd_config_get_type(cfg) != SND_CONFIG_TYPE_COMPOUND) {
|
||||
if (snd_config_get_id(cfg, &id) >= 0)
|
||||
SNDERR("error: compound type expected for %s", id);
|
||||
SNDERR("compound type expected for %s", id);
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
|
|
@ -959,8 +958,8 @@ static int parse_tuple_sets(snd_config_t *cfg,
|
|||
snd_config_for_each(i, next, cfg) {
|
||||
n = snd_config_iterator_entry(i);
|
||||
if (snd_config_get_type(n) != SND_CONFIG_TYPE_COMPOUND) {
|
||||
SNDERR("error: compound type expected for %s, is %d",
|
||||
id, snd_config_get_type(n));
|
||||
SNDERR("compound type expected for %s, is %d",
|
||||
id, snd_config_get_type(n));
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
|
|
@ -1169,7 +1168,7 @@ int tplg_parse_manifest_data(snd_tplg_t *tplg, snd_config_t *cfg,
|
|||
int err;
|
||||
|
||||
if (!list_empty(&tplg->manifest_list)) {
|
||||
SNDERR("error: already has manifest data\n");
|
||||
SNDERR("already has manifest data");
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
|
|
@ -1326,7 +1325,7 @@ int tplg_parse_data(snd_tplg_t *tplg, snd_config_t *cfg,
|
|||
if (strcmp(id, "file") == 0) {
|
||||
err = tplg_parse_data_file(n, elem);
|
||||
if (err < 0) {
|
||||
SNDERR("error: failed to parse data file\n");
|
||||
SNDERR("failed to parse data file");
|
||||
return err;
|
||||
}
|
||||
continue;
|
||||
|
|
@ -1335,7 +1334,7 @@ int tplg_parse_data(snd_tplg_t *tplg, snd_config_t *cfg,
|
|||
if (strcmp(id, "bytes") == 0) {
|
||||
err = tplg_parse_data_hex(n, elem, 1);
|
||||
if (err < 0) {
|
||||
SNDERR("error: failed to parse data bytes\n");
|
||||
SNDERR("failed to parse data bytes");
|
||||
return err;
|
||||
}
|
||||
continue;
|
||||
|
|
@ -1344,7 +1343,7 @@ int tplg_parse_data(snd_tplg_t *tplg, snd_config_t *cfg,
|
|||
if (strcmp(id, "shorts") == 0) {
|
||||
err = tplg_parse_data_hex(n, elem, 2);
|
||||
if (err < 0) {
|
||||
SNDERR("error: failed to parse data shorts\n");
|
||||
SNDERR("failed to parse data shorts");
|
||||
return err;
|
||||
}
|
||||
continue;
|
||||
|
|
@ -1353,7 +1352,7 @@ int tplg_parse_data(snd_tplg_t *tplg, snd_config_t *cfg,
|
|||
if (strcmp(id, "words") == 0) {
|
||||
err = tplg_parse_data_hex(n, elem, 4);
|
||||
if (err < 0) {
|
||||
SNDERR("error: failed to parse data words\n");
|
||||
SNDERR("failed to parse data words");
|
||||
return err;
|
||||
}
|
||||
continue;
|
||||
|
|
@ -1470,8 +1469,8 @@ int tplg_copy_data(snd_tplg_t *tplg, struct tplg_elem *elem,
|
|||
ref_elem = tplg_elem_lookup(&tplg->pdata_list,
|
||||
ref->id, SND_TPLG_TYPE_DATA, elem->index);
|
||||
if (!ref_elem) {
|
||||
SNDERR("error: cannot find data '%s' referenced by"
|
||||
" element '%s'\n", ref->id, elem->id);
|
||||
SNDERR("cannot find data '%s' referenced by"
|
||||
" element '%s'", ref->id, elem->id);
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue