ASoC: fsl: fsl_qmc_audio: Fix issues detected by checkpatch
./scripts/checkpatch.pl --strict --codespell detected several issues when running on the fsl_qmc_audio.c file: - CHECK: spaces preferred around that '*' (ctx:VxV) - CHECK: Alignment should match open parenthesis - CHECK: Comparison to NULL could be written "!prtd" - CHECK: spaces preferred around that '/' (ctx:VxV) - CHECK: Lines should not end with a '(' - CHECK: Please don't use multiple blank lines Some of them are present several times. Fix all of these issues without any functional changes. Signed-off-by: Herve Codina <herve.codina@bootlin.com> Link: https://patch.msgid.link/20240701113038.55144-3-herve.codina@bootlin.com Signed-off-by: Mark Brown <broonie@kernel.org>
This commit is contained in:
parent
e625999023
commit
86dd725b57
@ -54,7 +54,7 @@ static int qmc_audio_pcm_construct(struct snd_soc_component *component,
|
|||||||
return ret;
|
return ret;
|
||||||
|
|
||||||
snd_pcm_set_managed_buffer_all(rtd->pcm, SNDRV_DMA_TYPE_DEV, card->dev,
|
snd_pcm_set_managed_buffer_all(rtd->pcm, SNDRV_DMA_TYPE_DEV, card->dev,
|
||||||
64*1024, 64*1024);
|
64 * 1024, 64 * 1024);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -245,10 +245,10 @@ static const struct snd_pcm_hardware qmc_audio_pcm_hardware = {
|
|||||||
SNDRV_PCM_INFO_INTERLEAVED |
|
SNDRV_PCM_INFO_INTERLEAVED |
|
||||||
SNDRV_PCM_INFO_PAUSE,
|
SNDRV_PCM_INFO_PAUSE,
|
||||||
.period_bytes_min = 32,
|
.period_bytes_min = 32,
|
||||||
.period_bytes_max = 64*1024,
|
.period_bytes_max = 64 * 1024,
|
||||||
.periods_min = 2,
|
.periods_min = 2,
|
||||||
.periods_max = 2*1024,
|
.periods_max = 2 * 1024,
|
||||||
.buffer_bytes_max = 64*1024,
|
.buffer_bytes_max = 64 * 1024,
|
||||||
};
|
};
|
||||||
|
|
||||||
static int qmc_audio_pcm_open(struct snd_soc_component *component,
|
static int qmc_audio_pcm_open(struct snd_soc_component *component,
|
||||||
@ -266,7 +266,7 @@ static int qmc_audio_pcm_open(struct snd_soc_component *component,
|
|||||||
return ret;
|
return ret;
|
||||||
|
|
||||||
prtd = kzalloc(sizeof(*prtd), GFP_KERNEL);
|
prtd = kzalloc(sizeof(*prtd), GFP_KERNEL);
|
||||||
if (prtd == NULL)
|
if (!prtd)
|
||||||
return -ENOMEM;
|
return -ENOMEM;
|
||||||
|
|
||||||
runtime->private_data = prtd;
|
runtime->private_data = prtd;
|
||||||
@ -329,13 +329,13 @@ static int qmc_dai_hw_rule_channels_by_format(struct qmc_dai *qmc_dai,
|
|||||||
ch.max = nb_ts;
|
ch.max = nb_ts;
|
||||||
break;
|
break;
|
||||||
case 16:
|
case 16:
|
||||||
ch.max = nb_ts/2;
|
ch.max = nb_ts / 2;
|
||||||
break;
|
break;
|
||||||
case 32:
|
case 32:
|
||||||
ch.max = nb_ts/4;
|
ch.max = nb_ts / 4;
|
||||||
break;
|
break;
|
||||||
case 64:
|
case 64:
|
||||||
ch.max = nb_ts/8;
|
ch.max = nb_ts / 8;
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
dev_err(qmc_dai->dev, "format physical width %u not supported\n",
|
dev_err(qmc_dai->dev, "format physical width %u not supported\n",
|
||||||
@ -356,8 +356,7 @@ static int qmc_dai_hw_rule_playback_channels_by_format(struct snd_pcm_hw_params
|
|||||||
return qmc_dai_hw_rule_channels_by_format(qmc_dai, params, qmc_dai->nb_tx_ts);
|
return qmc_dai_hw_rule_channels_by_format(qmc_dai, params, qmc_dai->nb_tx_ts);
|
||||||
}
|
}
|
||||||
|
|
||||||
static int qmc_dai_hw_rule_capture_channels_by_format(
|
static int qmc_dai_hw_rule_capture_channels_by_format(struct snd_pcm_hw_params *params,
|
||||||
struct snd_pcm_hw_params *params,
|
|
||||||
struct snd_pcm_hw_rule *rule)
|
struct snd_pcm_hw_rule *rule)
|
||||||
{
|
{
|
||||||
struct qmc_dai *qmc_dai = rule->private;
|
struct qmc_dai *qmc_dai = rule->private;
|
||||||
@ -394,8 +393,7 @@ static int qmc_dai_hw_rule_format_by_channels(struct qmc_dai *qmc_dai,
|
|||||||
return snd_mask_refine(f_old, &f_new);
|
return snd_mask_refine(f_old, &f_new);
|
||||||
}
|
}
|
||||||
|
|
||||||
static int qmc_dai_hw_rule_playback_format_by_channels(
|
static int qmc_dai_hw_rule_playback_format_by_channels(struct snd_pcm_hw_params *params,
|
||||||
struct snd_pcm_hw_params *params,
|
|
||||||
struct snd_pcm_hw_rule *rule)
|
struct snd_pcm_hw_rule *rule)
|
||||||
{
|
{
|
||||||
struct qmc_dai *qmc_dai = rule->private;
|
struct qmc_dai *qmc_dai = rule->private;
|
||||||
@ -403,8 +401,7 @@ static int qmc_dai_hw_rule_playback_format_by_channels(
|
|||||||
return qmc_dai_hw_rule_format_by_channels(qmc_dai, params, qmc_dai->nb_tx_ts);
|
return qmc_dai_hw_rule_format_by_channels(qmc_dai, params, qmc_dai->nb_tx_ts);
|
||||||
}
|
}
|
||||||
|
|
||||||
static int qmc_dai_hw_rule_capture_format_by_channels(
|
static int qmc_dai_hw_rule_capture_format_by_channels(struct snd_pcm_hw_params *params,
|
||||||
struct snd_pcm_hw_params *params,
|
|
||||||
struct snd_pcm_hw_rule *rule)
|
struct snd_pcm_hw_rule *rule)
|
||||||
{
|
{
|
||||||
struct qmc_dai *qmc_dai = rule->private;
|
struct qmc_dai *qmc_dai = rule->private;
|
||||||
@ -587,7 +584,8 @@ static u64 qmc_audio_formats(u8 nb_ts)
|
|||||||
}
|
}
|
||||||
|
|
||||||
static int qmc_audio_dai_parse(struct qmc_audio *qmc_audio, struct device_node *np,
|
static int qmc_audio_dai_parse(struct qmc_audio *qmc_audio, struct device_node *np,
|
||||||
struct qmc_dai *qmc_dai, struct snd_soc_dai_driver *qmc_soc_dai_driver)
|
struct qmc_dai *qmc_dai,
|
||||||
|
struct snd_soc_dai_driver *qmc_soc_dai_driver)
|
||||||
{
|
{
|
||||||
struct qmc_chan_info info;
|
struct qmc_chan_info info;
|
||||||
u32 val;
|
u32 val;
|
||||||
@ -704,7 +702,6 @@ static int qmc_audio_probe(struct platform_device *pdev)
|
|||||||
i++;
|
i++;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
platform_set_drvdata(pdev, qmc_audio);
|
platform_set_drvdata(pdev, qmc_audio);
|
||||||
|
|
||||||
ret = devm_snd_soc_register_component(qmc_audio->dev,
|
ret = devm_snd_soc_register_component(qmc_audio->dev,
|
||||||
|
Loading…
Reference in New Issue
Block a user