* [PATCH] ALSA: hda/tegra: Switch to two-argument strscpy()
@ 2025-05-21 14:38 Daniel Dadap
2025-05-21 20:17 ` Takashi Iwai
0 siblings, 1 reply; 2+ messages in thread
From: Daniel Dadap @ 2025-05-21 14:38 UTC (permalink / raw)
To: linux-sound; +Cc: tiwai
strscpy() is used in this driver with char[] struct member destinations,
so it is possible to use the simplified two-argument variant which was
added by commit e6584c3964f2 ("string: Allow 2-argument strscpy()").
Signed-off-by: Daniel Dadap <ddadap@nvidia.com>
---
sound/pci/hda/hda_tegra.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/sound/pci/hda/hda_tegra.c b/sound/pci/hda/hda_tegra.c
index a590d431c5ff..c23da6ebef50 100644
--- a/sound/pci/hda/hda_tegra.c
+++ b/sound/pci/hda/hda_tegra.c
@@ -377,14 +377,14 @@ static int hda_tegra_first_init(struct azx *chip, struct platform_device *pdev)
}
/* driver name */
- strscpy(card->driver, drv_name, sizeof(card->driver));
+ strscpy(card->driver, drv_name);
/* shortname for card */
sname = of_get_property(np, "nvidia,model", NULL);
if (!sname)
sname = drv_name;
if (strlen(sname) > sizeof(card->shortname))
dev_info(card->dev, "truncating shortname for card\n");
- strscpy(card->shortname, sname, sizeof(card->shortname));
+ strscpy(card->shortname, sname);
/* longname for card */
snprintf(card->longname, sizeof(card->longname),
--
2.39.5
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] ALSA: hda/tegra: Switch to two-argument strscpy()
2025-05-21 14:38 [PATCH] ALSA: hda/tegra: Switch to two-argument strscpy() Daniel Dadap
@ 2025-05-21 20:17 ` Takashi Iwai
0 siblings, 0 replies; 2+ messages in thread
From: Takashi Iwai @ 2025-05-21 20:17 UTC (permalink / raw)
To: Daniel Dadap; +Cc: linux-sound, tiwai
On Wed, 21 May 2025 16:38:36 +0200,
Daniel Dadap wrote:
>
> strscpy() is used in this driver with char[] struct member destinations,
> so it is possible to use the simplified two-argument variant which was
> added by commit e6584c3964f2 ("string: Allow 2-argument strscpy()").
>
> Signed-off-by: Daniel Dadap <ddadap@nvidia.com>
Applied now. Thanks.
Takashi
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2025-05-21 20:17 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-05-21 14:38 [PATCH] ALSA: hda/tegra: Switch to two-argument strscpy() Daniel Dadap
2025-05-21 20:17 ` Takashi Iwai
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.