ALSA: hda/tegra: Switch to two-argument strscpy()
Subsystems (2)
PATCH 1/1 ALSA: hda/tegra: Switch to two-argument strscpy()
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 <[email protected]>
--- sound/pci/hda/hda_tegra.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
sound/pci/hda/hda_tegra.c +2 -2
@@ -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),
Signature · 1 line
2.39.5
Quoted 6 lines · Daniel Dadap
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 commite6584c3964f2("string: Allow 2-argumentstrscpy()").Signed-off-by Daniel Dadap <[email protected]>
Applied now. Thanks.
Takashi