Skip to contentSkip to conversation

HSI: cmt_speech: fix wrong printf format

PATCH Applied Rosen Penev 2 participants 2 messages Mar 21 – Mar 25 HSI

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 HSI: cmt_speech: fix wrong printf format

sizeof returns size_t. Use the zu specifier for it. Fixes on x86-64:

error: format ‘%u’ expects argument of type ‘unsigned int’, but argument 5 has type ‘long unsigned int’ [-Werror=format=]

---
 drivers/hsi/clients/cmt_speech.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/hsi/clients/cmt_speech.c +1 -1
index d5aa87833768..7226677ebde7 100644
@@ -892,7 +892,7 @@ static void cs_hsi_data_enable(struct cs_hsi_iface *hi,
 
 	data_start = L1_CACHE_ALIGN(sizeof(*hi->mmap_cfg));
 	dev_dbg(&hi->cl->device,
-			"setting data start at %u, cfg block %u, align %u\n",
+			"setting data start at %u, cfg block %zu, align %u\n",
 			data_start, sizeof(*hi->mmap_cfg), L1_CACHE_BYTES);
 
 	for (i = 0; i < hi->mmap_cfg->rx_bufs; i++) {
Signature · 1 line
2.53.0
#1 lore raw
Quoted 6 lines · Rosen Penev

sizeof returns size_t. Use the zu specifier for it. Fixes on x86-64:

error: format ‘%u’ expects argument of type ‘unsigned int’, but argument 5 has type ‘long unsigned int’ [-Werror=format=]

Applied, thanks!

[1/1] HSI: cmt_speech: fix wrong printf format

      commit: 59b026da003831babb77d5155e82342bce226079

Best regards,

Signature · 1 line
Sebastian Reichel <[email protected]>