lib/string_helpers: Introduce parse_int_array_user()
authorCezary Rojewski <cezary.rojewski@intel.com>
Sun, 4 Sep 2022 10:28:39 +0000 (12:28 +0200)
committerMark Brown <broonie@kernel.org>
Mon, 5 Sep 2022 13:51:46 +0000 (14:51 +0100)
commitf0b933236ec97de5ee49c60aae57a9c5c4dadc87
tree1f3e94f35580aa828fc576a32f5c075968c79b97
parent376be51caf8871419bbcbb755e1e615d30dc3153
lib/string_helpers: Introduce parse_int_array_user()

Add new helper function to allow for splitting specified user string
into a sequence of integers. Internally it makes use of get_options() so
the returned sequence contains the integers extracted plus an additional
element that begins the sequence and specifies the integers count.

Suggested-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Signed-off-by: Cezary Rojewski <cezary.rojewski@intel.com>
Link: https://lore.kernel.org/r/20220904102840.862395-2-cezary.rojewski@intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
include/linux/string_helpers.h
lib/string_helpers.c