Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

ASoC: SOF: sof-audio: pcm_id is __le32

The pcm_id value is __le32 so convert it before passing to the dev_dbg
function to be printed. Also fixup some other uses of __le32 data and
a couple of places where %u should have been used instead of %d

Picked up by sparse prototype for variadic and printf
function checking. Fixes a large number of sparse warnings, such as:

sound/soc/sof/pcm.c:84:25: warning: incorrect type in argument 4 (different base types)
sound/soc/sof/pcm.c:84:25: expected unsigned int
sound/soc/sof/pcm.c:84:25: got restricted __le32 [usertype] pcm_id

Signed-off-by: Ben Dooks <ben.dooks@codethink.co.uk>
Acked-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com>
Link: https://patch.msgid.link/20260324133403.107708-1-ben.dooks@codethink.co.uk
Signed-off-by: Mark Brown <broonie@kernel.org>

authored by

Ben Dooks and committed by
Mark Brown
44788863 141efa53

+8 -8
+1 -1
sound/soc/sof/compress.c
··· 247 247 ret = snd_sof_set_stream_data_offset(sdev, &spcm->stream[cstream->direction], 248 248 ipc_params_reply.posn_offset); 249 249 if (ret < 0) { 250 - dev_err(component->dev, "Invalid stream data offset for Compr %d\n", 250 + dev_err(component->dev, "Invalid stream data offset for Compr %u\n", 251 251 le32_to_cpu(spcm->pcm.pcm_id)); 252 252 goto out; 253 253 }
+1 -1
sound/soc/sof/pcm.c
··· 360 360 platform_params = &spcm->platform_params[substream->stream]; 361 361 ret = sof_widget_list_setup(sdev, spcm, params, platform_params, dir); 362 362 if (ret < 0) { 363 - dev_err(sdev->dev, "failed widget list set up for pcm %d dir %d\n", 363 + dev_err(sdev->dev, "failed widget list set up for pcm %d dir %u\n", 364 364 le32_to_cpu(spcm->pcm.pcm_id), dir); 365 365 spcm->stream[dir].list = NULL; 366 366 snd_soc_dapm_dai_free_widgets(&list);
+6 -6
sound/soc/sof/topology.c
··· 775 775 array); 776 776 break; 777 777 default: 778 - dev_err(scomp->dev, "error: unknown token type %d\n", 778 + dev_err(scomp->dev, "error: unknown token type %u\n", 779 779 le32_to_cpu(array->type)); 780 780 return -EINVAL; 781 781 } ··· 880 880 ARRAY_SIZE(led_tokens), mc->priv.array, 881 881 le32_to_cpu(mc->priv.size)); 882 882 if (ret != 0) { 883 - dev_err(scomp->dev, "error: parse led tokens failed %d\n", 883 + dev_err(scomp->dev, "error: parse led tokens failed %u\n", 884 884 le32_to_cpu(mc->priv.size)); 885 885 goto err; 886 886 } ··· 970 970 struct snd_sof_control *scontrol; 971 971 int ret; 972 972 973 - dev_dbg(scomp->dev, "tplg: load control type %d name : %s\n", 973 + dev_dbg(scomp->dev, "tplg: load control type %u name : %s\n", 974 974 le32_to_cpu(hdr->type), hdr->name); 975 975 976 976 scontrol = kzalloc_obj(*scontrol); ··· 1015 1015 case SND_SOC_TPLG_DAPM_CTL_ENUM_VALUE: 1016 1016 case SND_SOC_TPLG_DAPM_CTL_PIN: 1017 1017 default: 1018 - dev_warn(scomp->dev, "control type not supported %d:%d:%d\n", 1018 + dev_warn(scomp->dev, "control type not supported %u:%u:%u\n", 1019 1019 le32_to_cpu(hdr->ops.get), 1020 1020 le32_to_cpu(hdr->ops.put), 1021 1021 le32_to_cpu(hdr->ops.info)); ··· 1525 1525 break; 1526 1526 case snd_soc_dapm_pga: 1527 1527 if (!le32_to_cpu(tw->num_kcontrols)) { 1528 - dev_err(scomp->dev, "invalid kcontrol count %d for volume\n", 1528 + dev_err(scomp->dev, "invalid kcontrol count %u for volume\n", 1529 1529 le32_to_cpu(tw->num_kcontrols)); 1530 1530 ret = -EINVAL; 1531 1531 break; ··· 1774 1774 ARRAY_SIZE(stream_tokens), private->array, 1775 1775 le32_to_cpu(private->size)); 1776 1776 if (ret) { 1777 - dev_err(scomp->dev, "error: parse stream tokens failed %d\n", 1777 + dev_err(scomp->dev, "error: parse stream tokens failed %u\n", 1778 1778 le32_to_cpu(private->size)); 1779 1779 return ret; 1780 1780 }