aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPierre-Louis Bossart2021-03-26 16:59:20 -0500
committerMark Brown2021-03-31 18:03:22 +0100
commit11033e51b31696fd7949f1abb558cba171ecf0f5 (patch)
tree57ebf55ddb8626725af2b64926d2dfa414ff0048
parent00a820086ddd8c6f3eeeca3a034d234cebf084ba (diff)
ASoC: stm: stm32_adfsdm: fix snprintf format string
cppcheck warning: sound/soc/stm/stm32_adfsdm.c:120:2: warning: %d in format string (no. 1) requires 'int' but the argument type is 'unsigned int'. [invalidPrintfArgType_sint] snprintf(str_freq, sizeof(str_freq), "%d\n", freq); ^ Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Link: https://lore.kernel.org/r/20210326215927.936377-11-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
-rw-r--r--sound/soc/stm/stm32_adfsdm.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/sound/soc/stm/stm32_adfsdm.c b/sound/soc/stm/stm32_adfsdm.c
index 47fae8dd20b4..e6078f50e508 100644
--- a/sound/soc/stm/stm32_adfsdm.c
+++ b/sound/soc/stm/stm32_adfsdm.c
@@ -117,7 +117,7 @@ static int stm32_adfsdm_set_sysclk(struct snd_soc_dai *dai, int clk_id,
/* Set IIO frequency if CODEC is master as clock comes from SPI_IN */
- snprintf(str_freq, sizeof(str_freq), "%d\n", freq);
+ snprintf(str_freq, sizeof(str_freq), "%u\n", freq);
size = iio_write_channel_ext_info(priv->iio_ch, "spi_clk_freq",
str_freq, sizeof(str_freq));
if (size != sizeof(str_freq)) {