Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit f9a21a3f authored by Elise Lennion's avatar Elise Lennion Committed by Greg Kroah-Hartman
Browse files

staging: greybus: audio_manager_sysfs: Replace sscanf with kstrto* to single variable conversion.



Fix checkpatch warning:

WARNING: Prefer kstrto<type> to single variable sscanf

kstrto* is designed to convert string to numerical value and makes
it easier to understand what the code does.

Signed-off-by: default avatarElise Lennion <elise.lennion@gmail.com>
Reviewed-by: default avatarMark Greer <mgreer@animalcreek.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 5bc45c9d
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -44,7 +44,7 @@ static ssize_t manager_sysfs_remove_store(
{
	int id;

	int num = sscanf(buf, "%d", &id);
	int num = kstrtoint(buf, 10, &id);

	if (num != 1)
		return -EINVAL;
@@ -65,7 +65,7 @@ static ssize_t manager_sysfs_dump_store(
{
	int id;

	int num = sscanf(buf, "%d", &id);
	int num = kstrtoint(buf, 10, &id);

	if (num == 1) {
		num = gb_audio_manager_dump_module(id);