All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v3 0/2] lib/string_helpers: Introduce tokenize_user_input()
@ 2022-09-01 17:50 ` Cezary Rojewski
  0 siblings, 0 replies; 16+ messages in thread
From: Cezary Rojewski @ 2022-09-01 17:50 UTC (permalink / raw)
  To: alsa-devel, broonie
  Cc: andy, Cezary Rojewski, kai.vehmanen, yung-chuan.liao, tiwai,
	pierre-louis.bossart, willy, lgirdwood, hdegoede,
	ranjani.sridharan, amadeuszx.slawinski, peter.ujfalusi,
	linux-kernel

Continuation of recent upstream discussion [1] regarding user string
tokenization.

First, tokenize_user_input() is introduced to allow for splitting
specified user string into a sequence of integers. Makes use of
get_options() internally so the parsing logic is not duplicated.

With that done, redundant parts of the sound driver are removed.

Originally similar functionality was added for the SOF sound driver. As
more users are on the horizon, it is desirable to update existing
string_helpers code and provide a unified solution.


Changes in v3:
- relocated tokenize_user_input() implementation to string_helpers as
  requested by Matthew

Changes in v2:
- reused get_options() so no parsing logic is duplicated
- simplified __user variant with help of memdup_user_nul()
  Both suggested by Andy, thanks for thourough review


[1]: https://lore.kernel.org/alsa-devel/20220707091301.1282291-1-cezary.rojewski@intel.com/


Cezary Rojewski (2):
  lib/string_helpers: Introduce tokenize_user_input()
  ASoC: SOF: Remove strsplit_u32() and tokenize_input()

 include/linux/string_helpers.h    |  2 +
 lib/string_helpers.c              | 45 +++++++++++++++
 sound/soc/sof/sof-client-probes.c | 93 ++++---------------------------
 3 files changed, 59 insertions(+), 81 deletions(-)

-- 
2.25.1


^ permalink raw reply	[flat|nested] 16+ messages in thread

end of thread, other threads:[~2022-09-02 11:52 UTC | newest]

Thread overview: 16+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-09-01 17:50 [PATCH v3 0/2] lib/string_helpers: Introduce tokenize_user_input() Cezary Rojewski
2022-09-01 17:50 ` Cezary Rojewski
2022-09-01 17:50 ` [PATCH v3 1/2] " Cezary Rojewski
2022-09-01 17:50   ` Cezary Rojewski
2022-09-01 19:34   ` Andy Shevchenko
2022-09-01 19:34     ` Andy Shevchenko
2022-09-02  7:46     ` Cezary Rojewski
2022-09-02  7:46       ` Cezary Rojewski
2022-09-02  9:04       ` Andy Shevchenko
2022-09-02  9:04         ` Andy Shevchenko
2022-09-01 17:50 ` [PATCH v3 2/2] ASoC: SOF: Remove strsplit_u32() and tokenize_input() Cezary Rojewski
2022-09-01 17:50   ` Cezary Rojewski
2022-09-01 19:38   ` Andy Shevchenko
2022-09-01 19:38     ` Andy Shevchenko
2022-09-02 11:51     ` Cezary Rojewski
2022-09-02 11:51       ` Cezary Rojewski

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.