mirror of
https://github.com/torvalds/linux.git
synced 2026-09-24 06:24:02 +02:00
ASoC: fsl: Drop __force casts
Now that the bitwise parameter definitions are gone for PCM parameters, we don't have to cast with ugly __force prefix. Simply drop those superfluous casts. Reviewed-by: Shengjiu Wang <shengjiu.wang@gmail.com> Acked-by: Mark Brown <broonie@kernel.org> Reviewed-by: Cezary Rojewski <cezary.rojewski@intel.com> Signed-off-by: Takashi Iwai <tiwai@suse.de> Link: https://patch.msgid.link/20260812060557.80445-12-tiwai@suse.de
This commit is contained in:
parent
920b514c43
commit
fde65373cb
|
|
@ -1118,7 +1118,7 @@ static int fsl_asoc_card_probe(struct platform_device *pdev)
|
|||
}
|
||||
|
||||
ret = of_property_read_u32(asrc_np, "fsl,asrc-format", &asrc_fmt);
|
||||
priv->asrc_format = (__force snd_pcm_format_t)asrc_fmt;
|
||||
priv->asrc_format = asrc_fmt;
|
||||
if (ret) {
|
||||
/* Fallback to old binding; translate to asrc_format */
|
||||
ret = of_property_read_u32(asrc_np, "fsl,asrc-width",
|
||||
|
|
|
|||
|
|
@ -1358,7 +1358,7 @@ static int fsl_asrc_probe(struct platform_device *pdev)
|
|||
}
|
||||
|
||||
ret = of_property_read_u32(np, "fsl,asrc-format", &asrc_fmt);
|
||||
asrc->asrc_format = (__force snd_pcm_format_t)asrc_fmt;
|
||||
asrc->asrc_format = asrc_fmt;
|
||||
if (ret) {
|
||||
ret = of_property_read_u32(np, "fsl,asrc-width", &width);
|
||||
if (ret) {
|
||||
|
|
|
|||
|
|
@ -367,13 +367,13 @@ static int fsl_asrc_m2m_comp_set_params(struct snd_compr_stream *stream,
|
|||
if (ret)
|
||||
return -EINVAL;
|
||||
|
||||
if (pcm_format_to_bits((__force snd_pcm_format_t)params->codec.format) & cap.fmt_in)
|
||||
pair->sample_format[IN] = (__force snd_pcm_format_t)params->codec.format;
|
||||
if (pcm_format_to_bits(params->codec.format) & cap.fmt_in)
|
||||
pair->sample_format[IN] = params->codec.format;
|
||||
else
|
||||
return -EINVAL;
|
||||
|
||||
if (pcm_format_to_bits((__force snd_pcm_format_t)params->codec.pcm_format) & cap.fmt_out)
|
||||
pair->sample_format[OUT] = (__force snd_pcm_format_t)params->codec.pcm_format;
|
||||
if (pcm_format_to_bits(params->codec.pcm_format) & cap.fmt_out)
|
||||
pair->sample_format[OUT] = params->codec.pcm_format;
|
||||
else
|
||||
return -EINVAL;
|
||||
|
||||
|
|
@ -600,7 +600,7 @@ static int fsl_asrc_m2m_fill_codec_caps(struct fsl_asrc *asrc,
|
|||
cap.rate_in,
|
||||
cap.rate_in_count * sizeof(__u32));
|
||||
codec->descriptor[j].num_sample_rates = cap.rate_in_count;
|
||||
codec->descriptor[j].formats = (__force __u32)k;
|
||||
codec->descriptor[j].formats = k;
|
||||
codec->descriptor[j].pcm_formats = cap.fmt_out;
|
||||
codec->descriptor[j].src.out_sample_rate_min = cap.rate_out[0];
|
||||
codec->descriptor[j].src.out_sample_rate_max =
|
||||
|
|
|
|||
|
|
@ -2227,7 +2227,7 @@ static int fsl_easrc_probe(struct platform_device *pdev)
|
|||
}
|
||||
|
||||
ret = of_property_read_u32(np, "fsl,asrc-format", &asrc_fmt);
|
||||
easrc->asrc_format = (__force snd_pcm_format_t)asrc_fmt;
|
||||
easrc->asrc_format = asrc_fmt;
|
||||
if (ret) {
|
||||
dev_err(dev, "failed to asrc format\n");
|
||||
return ret;
|
||||
|
|
|
|||
|
|
@ -503,8 +503,8 @@ static int qmc_dai_constraints_interleaved(struct snd_pcm_substream *substream,
|
|||
return ret;
|
||||
}
|
||||
|
||||
access = 1ULL << (__force int)SNDRV_PCM_ACCESS_MMAP_INTERLEAVED |
|
||||
1ULL << (__force int)SNDRV_PCM_ACCESS_RW_INTERLEAVED;
|
||||
access = 1ULL << SNDRV_PCM_ACCESS_MMAP_INTERLEAVED |
|
||||
1ULL << SNDRV_PCM_ACCESS_RW_INTERLEAVED;
|
||||
ret = snd_pcm_hw_constraint_mask64(substream->runtime, SNDRV_PCM_HW_PARAM_ACCESS,
|
||||
access);
|
||||
if (ret) {
|
||||
|
|
@ -532,8 +532,8 @@ static int qmc_dai_constraints_noninterleaved(struct snd_pcm_substream *substrea
|
|||
return ret;
|
||||
}
|
||||
|
||||
access = 1ULL << (__force int)SNDRV_PCM_ACCESS_MMAP_NONINTERLEAVED |
|
||||
1ULL << (__force int)SNDRV_PCM_ACCESS_RW_NONINTERLEAVED;
|
||||
access = 1ULL << SNDRV_PCM_ACCESS_MMAP_NONINTERLEAVED |
|
||||
1ULL << SNDRV_PCM_ACCESS_RW_NONINTERLEAVED;
|
||||
ret = snd_pcm_hw_constraint_mask64(substream->runtime, SNDRV_PCM_HW_PARAM_ACCESS,
|
||||
access);
|
||||
if (ret) {
|
||||
|
|
|
|||
|
|
@ -531,7 +531,7 @@ static int be_hw_params_fixup(struct snd_soc_pcm_runtime *rtd,
|
|||
|
||||
mask = hw_param_mask(params, SNDRV_PCM_HW_PARAM_FORMAT);
|
||||
snd_mask_none(mask);
|
||||
snd_mask_set(mask, (__force unsigned int)data->asrc_format);
|
||||
snd_mask_set(mask, data->asrc_format);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
|
@ -684,7 +684,7 @@ static int imx_card_parse_of(struct imx_card_data *data)
|
|||
}
|
||||
|
||||
ret = of_property_read_u32(args.np, "fsl,asrc-format", &asrc_fmt);
|
||||
data->asrc_format = (__force snd_pcm_format_t)asrc_fmt;
|
||||
data->asrc_format = asrc_fmt;
|
||||
if (ret) {
|
||||
/* Fallback to old binding; translate to asrc_format */
|
||||
ret = of_property_read_u32(args.np, "fsl,asrc-width", &width);
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user