summaryrefslogtreecommitdiffstats
path: root/sound/isa
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2023-09-15 10:27:56 +0200
committerTakashi Iwai <tiwai@suse.de>2023-09-15 13:21:33 +0200
commit1e97acf3a6609c1329e23c2bf1e703c012bec848 (patch)
tree4ecda75b4ee512e8fb6c9efee8ae4bc532c6f788 /sound/isa
parent399245d3046d7182a9ae97cb0671fc9ed8a579a6 (diff)
downloadlinux-stable-1e97acf3a6609c1329e23c2bf1e703c012bec848.tar.gz
linux-stable-1e97acf3a6609c1329e23c2bf1e703c012bec848.tar.bz2
linux-stable-1e97acf3a6609c1329e23c2bf1e703c012bec848.zip
ALSA: es1688: Fix -Wformat-truncation warning
The filling of card->longname can be gracefully truncated, as it's only informative. Use scnprintf() and suppress the superfluous compile warning with -Wformat-truncation. Link: https://lore.kernel.org/r/20230915082802.28684-8-tiwai@suse.de Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/isa')
-rw-r--r--sound/isa/es1688/es1688.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/sound/isa/es1688/es1688.c b/sound/isa/es1688/es1688.c
index f935b56eeec7..97728bf45474 100644
--- a/sound/isa/es1688/es1688.c
+++ b/sound/isa/es1688/es1688.c
@@ -130,9 +130,9 @@ static int snd_es1688_probe(struct snd_card *card, unsigned int n)
strscpy(card->driver, "ES1688", sizeof(card->driver));
strscpy(card->shortname, chip->pcm->name, sizeof(card->shortname));
- snprintf(card->longname, sizeof(card->longname),
- "%s at 0x%lx, irq %i, dma %i", chip->pcm->name, chip->port,
- chip->irq, chip->dma8);
+ scnprintf(card->longname, sizeof(card->longname),
+ "%s at 0x%lx, irq %i, dma %i", chip->pcm->name, chip->port,
+ chip->irq, chip->dma8);
if (fm_port[n] == SNDRV_AUTO_PORT)
fm_port[n] = port[n]; /* share the same port */