diff options
| author | Takashi Iwai <tiwai@suse.de> | 2024-11-30 10:00:08 +0100 |
|---|---|---|
| committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2025-01-09 13:31:53 +0100 |
| commit | d4eb5b3c115d5a95bd0b8d4a584a93941b882b4d (patch) | |
| tree | a9302860bf620fd92363816686195506ff9f1fef /sound | |
| parent | 8b2e38f2a9b71af39f5697c30113136d4a5cae1a (diff) | |
| download | linux-d4eb5b3c115d5a95bd0b8d4a584a93941b882b4d.tar.gz linux-d4eb5b3c115d5a95bd0b8d4a584a93941b882b4d.tar.bz2 linux-d4eb5b3c115d5a95bd0b8d4a584a93941b882b4d.zip | |
ALSA: ump: Shut up truncated string warning
[ Upstream commit ed990c07af70d286f5736021c6e25d8df6f2f7b0 ]
The recent change for the legacy substream name update brought a
compile warning for some compilers due to the nature of snprintf().
Use scnprintf() to shut up the warning since the truncation is
intentional.
Fixes: e29e504e7890 ("ALSA: ump: Indicate the inactive group in legacy substream names")
Reported-by: kernel test robot <lkp@intel.com>
Closes: https://lore.kernel.org/oe-kbuild-all/202411300103.FrGuTAYp-lkp@intel.com/
Link: https://patch.msgid.link/20241130090009.19849-1-tiwai@suse.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Diffstat (limited to 'sound')
| -rw-r--r-- | sound/core/ump.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/sound/core/ump.c b/sound/core/ump.c index 4aec90dac07e..32d27e58416a 100644 --- a/sound/core/ump.c +++ b/sound/core/ump.c @@ -1251,9 +1251,9 @@ static void fill_substream_names(struct snd_ump_endpoint *ump, name = ump->groups[idx].name; if (!*name) name = ump->info.name; - snprintf(s->name, sizeof(s->name), "Group %d (%.16s)%s", - idx + 1, name, - ump->groups[idx].active ? "" : " [Inactive]"); + scnprintf(s->name, sizeof(s->name), "Group %d (%.16s)%s", + idx + 1, name, + ump->groups[idx].active ? "" : " [Inactive]"); } } |
