remove extra trailing new line in SNDMSG and SNDERR calls

Signed-off-by: Jaroslav Kysela <perex@perex.cz>
This commit is contained in:
Jaroslav Kysela 2023-06-06 13:46:53 +02:00
parent 325210acc8
commit cbdb428ab9
13 changed files with 40 additions and 40 deletions

View file

@ -1321,7 +1321,7 @@ int snd_ctl_wait(snd_ctl_t *ctl, int timeout)
npfds = snd_ctl_poll_descriptors_count(ctl);
if (npfds <= 0 || npfds >= 16) {
SNDERR("Invalid poll_fds %d\n", npfds);
SNDERR("Invalid poll_fds %d", npfds);
return -EIO;
}
pfd = alloca(sizeof(*pfd) * npfds);
@ -1329,7 +1329,7 @@ int snd_ctl_wait(snd_ctl_t *ctl, int timeout)
if (err < 0)
return err;
if (err != npfds) {
SNDMSG("invalid poll descriptors %d\n", err);
SNDMSG("invalid poll descriptors %d", err);
return -EIO;
}
for (;;) {

View file

@ -712,7 +712,7 @@ int snd_ctl_ext_create(snd_ctl_ext_t *ext, const char *name, int mode)
if (ext->version < SNDRV_PROTOCOL_VERSION(1, 0, 0) ||
ext->version > SND_CTL_EXT_VERSION) {
SNDERR("ctl_ext: Plugin version mismatch\n");
SNDERR("ctl_ext: Plugin version mismatch");
return -ENXIO;
}

View file

@ -348,7 +348,7 @@ static int snd_ctl_hw_read(snd_ctl_t *handle, snd_ctl_event_t *event)
if (res <= 0)
return -errno;
if (CHECK_SANITY(res != sizeof(*event))) {
SNDMSG("snd_ctl_hw_read: read size error (req:%d, got:%d)\n",
SNDMSG("snd_ctl_hw_read: read size error (req:%d, got:%d)",
sizeof(*event), res);
return -EINVAL;
}

View file

@ -53,7 +53,7 @@ int __snd_pcm_info_eld_fixup(snd_pcm_info_t * info)
ret = snd_ctl_hw_open(&ctl, NULL, info->card, 0);
if (ret < 0) {
SYSMSG("Cannot open the associated CTL\n");
SYSMSG("Cannot open the associated CTL");
return ret;
}
@ -66,7 +66,7 @@ int __snd_pcm_info_eld_fixup(snd_pcm_info_t * info)
if (ret == -ENOENT || cinfo.type != SND_CTL_ELEM_TYPE_BYTES || cinfo.count == 0)
return 0;
if (ret < 0) {
SYSMSG("Cannot read ELD\n");
SYSMSG("Cannot read ELD");
return ret;
}
/* decode connected HDMI device name */
@ -78,7 +78,7 @@ int __snd_pcm_info_eld_fixup(snd_pcm_info_t * info)
/* no monitor name detected */
goto __present;
if (l > 16 || 20 + l > cinfo.count) {
SNDERR("ELD decode failed, using old HDMI output names\n");
SNDERR("ELD decode failed, using old HDMI output names");
return 0;
}
s = alloca(l + 1);

View file

@ -680,7 +680,7 @@ int snd_hctl_wait(snd_hctl_t *hctl, int timeout)
npfds = snd_hctl_poll_descriptors_count(hctl);
if (npfds <= 0 || npfds >= 16) {
SNDERR("Invalid poll_fds %d\n", npfds);
SNDERR("Invalid poll_fds %d", npfds);
return -EIO;
}
pfd = alloca(sizeof(*pfd) * npfds);
@ -689,7 +689,7 @@ int snd_hctl_wait(snd_hctl_t *hctl, int timeout)
if (err < 0)
return err;
if (err != npfds) {
SNDMSG("invalid poll descriptors %d\n", err);
SNDMSG("invalid poll descriptors %d", err);
return -EIO;
}
do {

View file

@ -311,7 +311,7 @@ static int snd_config_get_ctl_elem_value(snd_config_t *conf,
unsigned int idx = 0;
if (len % 2 != 0 || len > count * 2) {
_bad_content:
SNDERR("bad value content\n");
SNDERR("bad value content");
return -EINVAL;
}
while (*buf) {

View file

@ -2916,7 +2916,7 @@ int snd_pcm_wait_nocheck(snd_pcm_t *pcm, int timeout)
npfds = __snd_pcm_poll_descriptors_count(pcm);
if (npfds <= 0 || npfds >= 16) {
SNDERR("Invalid poll_fds %d\n", npfds);
SNDERR("Invalid poll_fds %d", npfds);
return -EIO;
}
pfd = alloca(sizeof(*pfd) * npfds);
@ -2924,7 +2924,7 @@ int snd_pcm_wait_nocheck(snd_pcm_t *pcm, int timeout)
if (err < 0)
return err;
if (err != npfds) {
SNDMSG("invalid poll descriptors %d\n", err);
SNDMSG("invalid poll descriptors %d", err);
return -EIO;
}
if (timeout == SND_PCM_WAIT_IO)
@ -2932,7 +2932,7 @@ int snd_pcm_wait_nocheck(snd_pcm_t *pcm, int timeout)
else if (timeout == SND_PCM_WAIT_DRAIN)
timeout = __snd_pcm_wait_drain_timeout(pcm);
else if (timeout < -1)
SNDMSG("invalid snd_pcm_wait timeout argument %d\n", timeout);
SNDMSG("invalid snd_pcm_wait timeout argument %d", timeout);
do {
__snd_pcm_unlock(pcm->fast_op_arg);
err_poll = poll(pfd, npfds, timeout);
@ -6399,7 +6399,7 @@ int snd_pcm_sw_params_set_start_mode(snd_pcm_t *pcm, snd_pcm_sw_params_t *params
params->start_threshold = pcm->boundary;
break;
default:
SNDMSG("invalid start mode value %d\n", val);
SNDMSG("invalid start mode value %d", val);
return -EINVAL;
}
return 0;
@ -6447,7 +6447,7 @@ int snd_pcm_sw_params_set_xrun_mode(snd_pcm_t *pcm, snd_pcm_sw_params_t *params,
params->stop_threshold = pcm->boundary;
break;
default:
SNDMSG("invalid xrun mode value %d\n", val);
SNDMSG("invalid xrun mode value %d", val);
return -EINVAL;
}
return 0;

View file

@ -1741,7 +1741,7 @@ int snd_pcm_direct_parse_bindings(snd_pcm_direct_t *dmix,
continue;
err = safe_strtol(id, &cchannel);
if (err < 0 || cchannel < 0) {
SNDERR("invalid client channel in binding: %s\n", id);
SNDERR("invalid client channel in binding: %s", id);
return -EINVAL;
}
if ((unsigned)cchannel >= count)
@ -1766,7 +1766,7 @@ int snd_pcm_direct_parse_bindings(snd_pcm_direct_t *dmix,
continue;
safe_strtol(id, &cchannel);
if (snd_config_get_integer(n, &schannel) < 0) {
SNDERR("unable to get slave channel (should be integer type) in binding: %s\n", id);
SNDERR("unable to get slave channel (should be integer type) in binding: %s", id);
free(bindings);
return -EINVAL;
}
@ -1870,11 +1870,11 @@ static int _snd_pcm_direct_get_slave_ipc_offset(snd_config_t *root,
if (strcmp(id, "type") == 0) {
err = snd_config_get_string(n, &str);
if (err < 0) {
SNDERR("Invalid value for PCM type definition\n");
SNDERR("Invalid value for PCM type definition");
return -EINVAL;
}
if (strcmp(str, "hw")) {
SNDERR("Invalid type '%s' for slave PCM\n", str);
SNDERR("Invalid type '%s' for slave PCM", str);
return -EINVAL;
}
continue;

View file

@ -690,7 +690,7 @@ int snd_pcm_extplug_create(snd_pcm_extplug_t *extplug, const char *name,
/* We support 1.0.0 to current */
if (extplug->version < 0x010000 ||
extplug->version > SND_PCM_EXTPLUG_VERSION) {
SNDERR("extplug: Plugin version mismatch: 0x%x\n",
SNDERR("extplug: Plugin version mismatch: 0x%x",
extplug->version);
return -ENXIO;
}

View file

@ -547,7 +547,7 @@ static int snd_pcm_hw_sw_params(snd_pcm_t *pcm, snd_pcm_sw_params_t * params)
SND_PCM_TSTAMP_TYPE_MONOTONIC;
if (ioctl(fd, SNDRV_PCM_IOCTL_TSTAMP, &on) < 0) {
err = -errno;
SNDMSG("TSTAMP failed\n");
SNDMSG("TSTAMP failed");
goto out;
}
}
@ -1156,7 +1156,7 @@ static int snd_pcm_hw_close(snd_pcm_t *pcm)
int err = 0;
if (close(hw->fd)) {
err = -errno;
SYSMSG("close failed (%i)\n", err);
SYSMSG("close failed (%i)", err);
}
unmap_status_and_control_data(hw);
@ -1279,7 +1279,7 @@ snd_pcm_query_chmaps_from_hw(int card, int dev, int subdev,
ret = snd_ctl_hw_open(&ctl, NULL, card, 0);
if (ret < 0) {
SYSMSG("Cannot open the associated CTL\n");
SYSMSG("Cannot open the associated CTL");
return NULL;
}
@ -1287,7 +1287,7 @@ snd_pcm_query_chmaps_from_hw(int card, int dev, int subdev,
ret = snd_ctl_elem_tlv_read(ctl, &id, tlv, sizeof(tlv));
snd_ctl_close(ctl);
if (ret < 0) {
SYSMSG("Cannot read Channel Map TLV\n");
SYSMSG("Cannot read Channel Map TLV");
return NULL;
}
@ -1301,7 +1301,7 @@ snd_pcm_query_chmaps_from_hw(int card, int dev, int subdev,
type = tlv[SNDRV_CTL_TLVO_TYPE];
if (type != SND_CTL_TLVT_CONTAINER) {
if (!is_chmap_type(type)) {
SYSMSG("Invalid TLV type %d\n", type);
SYSMSG("Invalid TLV type %d", type);
return NULL;
}
start = tlv;
@ -1314,7 +1314,7 @@ snd_pcm_query_chmaps_from_hw(int card, int dev, int subdev,
nums = 0;
for (p = start; size > 0; ) {
if (!is_chmap_type(p[0])) {
SYSMSG("Invalid TLV type %d\n", p[0]);
SYSMSG("Invalid TLV type %d", p[0]);
return NULL;
}
nums++;
@ -1405,7 +1405,7 @@ static snd_pcm_chmap_t *snd_pcm_hw_get_chmap(snd_pcm_t *pcm)
case SNDRV_PCM_STATE_SUSPENDED:
break;
default:
SYSMSG("Invalid PCM state for chmap_get: %s\n",
SYSMSG("Invalid PCM state for chmap_get: %s",
snd_pcm_state_name(FAST_PCM_STATE(hw)));
return NULL;
}
@ -1416,7 +1416,7 @@ static snd_pcm_chmap_t *snd_pcm_hw_get_chmap(snd_pcm_t *pcm)
ret = snd_ctl_hw_open(&ctl, NULL, hw->card, 0);
if (ret < 0) {
free(map);
SYSMSG("Cannot open the associated CTL\n");
SYSMSG("Cannot open the associated CTL");
chmap_caps_set_error(hw, CHMAP_CTL_GET);
return NULL;
}
@ -1426,7 +1426,7 @@ static snd_pcm_chmap_t *snd_pcm_hw_get_chmap(snd_pcm_t *pcm)
snd_ctl_close(ctl);
if (ret < 0) {
free(map);
SYSMSG("Cannot read Channel Map ctl\n");
SYSMSG("Cannot read Channel Map ctl");
chmap_caps_set_error(hw, CHMAP_CTL_GET);
return NULL;
}
@ -1452,17 +1452,17 @@ static int snd_pcm_hw_set_chmap(snd_pcm_t *pcm, const snd_pcm_chmap_t *map)
return -ENXIO;
if (map->channels > 128) {
SYSMSG("Invalid number of channels %d\n", map->channels);
SYSMSG("Invalid number of channels %d", map->channels);
return -EINVAL;
}
if (FAST_PCM_STATE(hw) != SNDRV_PCM_STATE_PREPARED) {
SYSMSG("Invalid PCM state for chmap_set: %s\n",
SYSMSG("Invalid PCM state for chmap_set: %s",
snd_pcm_state_name(FAST_PCM_STATE(hw)));
return -EBADFD;
}
ret = snd_ctl_hw_open(&ctl, NULL, hw->card, 0);
if (ret < 0) {
SYSMSG("Cannot open the associated CTL\n");
SYSMSG("Cannot open the associated CTL");
chmap_caps_set_error(hw, CHMAP_CTL_SET);
return ret;
}
@ -1480,7 +1480,7 @@ static int snd_pcm_hw_set_chmap(snd_pcm_t *pcm, const snd_pcm_chmap_t *map)
ret = -ENXIO;
}
if (ret < 0)
SYSMSG("Cannot write Channel Map ctl\n");
SYSMSG("Cannot write Channel Map ctl");
return ret;
}
@ -1644,7 +1644,7 @@ int snd_pcm_hw_open_fd(snd_pcm_t **pcmp, const char *name, int fd,
unsigned int user_ver = SNDRV_PCM_VERSION;
if (ioctl(fd, SNDRV_PCM_IOCTL_USER_PVERSION, &user_ver) < 0) {
ret = -errno;
SNDMSG("USER_PVERSION failed\n");
SNDMSG("USER_PVERSION failed");
return ret;
}
}
@ -1656,7 +1656,7 @@ int snd_pcm_hw_open_fd(snd_pcm_t **pcmp, const char *name, int fd,
int on = SNDRV_PCM_TSTAMP_TYPE_MONOTONIC;
if (ioctl(fd, SNDRV_PCM_IOCTL_TTSTAMP, &on) < 0) {
ret = -errno;
SNDMSG("TTSTAMP failed\n");
SNDMSG("TTSTAMP failed");
return ret;
}
tstamp_type = SND_PCM_TSTAMP_TYPE_MONOTONIC;
@ -1667,7 +1667,7 @@ int snd_pcm_hw_open_fd(snd_pcm_t **pcmp, const char *name, int fd,
int on = 1;
if (ioctl(fd, SNDRV_PCM_IOCTL_TSTAMP, &on) < 0) {
ret = -errno;
SNDMSG("TSTAMP failed\n");
SNDMSG("TSTAMP failed");
return ret;
}
}

View file

@ -1086,7 +1086,7 @@ int snd_pcm_ioplug_create(snd_pcm_ioplug_t *ioplug, const char *name,
/* We support 1.0.0 to current */
if (ioplug->version < 0x010000 ||
ioplug->version > SND_PCM_IOPLUG_VERSION) {
SNDERR("ioplug: Plugin version mismatch: 0x%x\n",
SNDERR("ioplug: Plugin version mismatch: 0x%x",
ioplug->version);
return -ENXIO;
}

View file

@ -1303,7 +1303,7 @@ int _snd_pcm_multi_open(snd_pcm_t **pcmp, const char *name,
++slaves_count;
}
if (master_slave < 0 || master_slave >= (long)slaves_count) {
SNDERR("Master slave is out of range (0-%u)\n", slaves_count-1);
SNDERR("Master slave is out of range (0-%u)", slaves_count-1);
return -EINVAL;
}
snd_config_for_each(i, inext, bindings) {

View file

@ -1479,7 +1479,7 @@ int tplg_parse_hw_config(snd_tplg_t *tplg, snd_config_t *cfg,
provider_legacy = false;
if (strcmp(id, "bclk_master") == 0) {
SNDERR("deprecated option %s, please use 'bclk'\n", id);
SNDERR("deprecated option %s, please use 'bclk'", id);
provider_legacy = true;
}
@ -1531,7 +1531,7 @@ int tplg_parse_hw_config(snd_tplg_t *tplg, snd_config_t *cfg,
provider_legacy = false;
if (strcmp(id, "fsync_master") == 0) {
SNDERR("deprecated option %s, please use 'fsync'\n", id);
SNDERR("deprecated option %s, please use 'fsync'", id);
provider_legacy = true;
}