summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2026-02-27 18:57:00 +0300
committerTakashi Iwai <tiwai@suse.de>2026-02-28 11:31:13 +0300
commitd4d5633d8b19b0e745a7910aea49956b3b47900d (patch)
tree097c7917af58c958a391fd461075afd4aaee2db4
parent05ac3846ffe53fc63e454eb195ce8a6bab7a6a88 (diff)
downloadlinux-d4d5633d8b19b0e745a7910aea49956b3b47900d.tar.xz
ALSA: firewire: dice: Fix printf warning with W=1
The use of snprintf() may cause a warning with W=1 due to the possibly truncated string. As the truncation doesn't really matter (and won't happen practically) in the case of dice driver, just shut it up by replacing with scnprintf(). Link: https://patch.msgid.link/20260227155705.1557224-1-tiwai@suse.de Signed-off-by: Takashi Iwai <tiwai@suse.de>
-rw-r--r--sound/firewire/dice/dice.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/sound/firewire/dice/dice.c b/sound/firewire/dice/dice.c
index 85d265c7d544..f7a50bae4b55 100644
--- a/sound/firewire/dice/dice.c
+++ b/sound/firewire/dice/dice.c
@@ -122,7 +122,7 @@ static void dice_card_strings(struct snd_dice *dice)
fw_csr_string(dev->config_rom + 5, CSR_VENDOR, vendor, sizeof(vendor));
strscpy(model, "?");
fw_csr_string(dice->unit->directory, CSR_MODEL, model, sizeof(model));
- snprintf(card->longname, sizeof(card->longname),
+ scnprintf(card->longname, sizeof(card->longname),
"%s %s (serial %u) at %s, S%d",
vendor, model, dev->config_rom[4] & 0x3fffff,
dev_name(&dice->unit->device), 100 << dev->max_speed);