Unverified Commit 4894c364 authored by Andy Shevchenko's avatar Andy Shevchenko Committed by Ilpo Järvinen
Browse files

platform/x86: thinkpad_acpi: Use 2-argument strscpy()



Use 2-argument strscpy(), which is not only shorter but also provides
an additional check that destination buffer is an array.

Signed-off-by: default avatarAndy Shevchenko <andy.shevchenko@gmail.com>
Link: https://lore.kernel.org/r/20240602090244.1666360-7-andy.shevchenko@gmail.com


Reviewed-by: default avatarHans de Goede <hdegoede@redhat.com>
Reviewed-by: default avatarIlpo Järvinen <ilpo.jarvinen@linux.intel.com>
Signed-off-by: default avatarIlpo Järvinen <ilpo.jarvinen@linux.intel.com>
parent 31edc07e
Loading
Loading
Loading
Loading
+2 −4
Original line number Diff line number Diff line
@@ -7416,10 +7416,8 @@ static int __init volume_create_alsa_mixer(void)
	data = card->private_data;
	data->card = card;

	strscpy(card->driver, TPACPI_ALSA_DRVNAME,
		sizeof(card->driver));
	strscpy(card->shortname, TPACPI_ALSA_SHRTNAME,
		sizeof(card->shortname));
	strscpy(card->driver, TPACPI_ALSA_DRVNAME);
	strscpy(card->shortname, TPACPI_ALSA_SHRTNAME);
	snprintf(card->mixername, sizeof(card->mixername), "ThinkPad EC %s",
		 (thinkpad_id.ec_version_str) ?
			thinkpad_id.ec_version_str : "(unknown)");