Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

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 <ddadap@nvidia.com>
Link: https://patch.msgid.link/aC3lbOTYxWvYR9dl@ddadap-lakeline.nvidia.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>

authored by

Daniel Dadap and committed by
Takashi Iwai
c597ce56 4b214c9b

+2 -2
+2 -2
sound/pci/hda/hda_tegra.c
··· 384 384 } 385 385 386 386 /* driver name */ 387 - strscpy(card->driver, drv_name, sizeof(card->driver)); 387 + strscpy(card->driver, drv_name); 388 388 /* shortname for card */ 389 389 sname = of_get_property(np, "nvidia,model", NULL); 390 390 if (!sname) 391 391 sname = drv_name; 392 392 if (strlen(sname) > sizeof(card->shortname)) 393 393 dev_info(card->dev, "truncating shortname for card\n"); 394 - strscpy(card->shortname, sname, sizeof(card->shortname)); 394 + strscpy(card->shortname, sname); 395 395 396 396 /* longname for card */ 397 397 snprintf(card->longname, sizeof(card->longname),