Skip to content

libfs: Introduce tokenize_user_input()

Cezary Rojewski alsa-devel linux-fsdevel lkml 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v2 Latest2 patches 2 repliesIn review

Changes in v2 from the cover letter

- 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

Patches in v2 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/2libfs: Introduce tokenize_user_input()fs/libfs.c include/linux/fs.h+46 -02 replies
2/2ASoC: SOF: Remove strsplit_u32() and tokenize_input()sound/soc/sof/sof-client-probes.c+11 -810 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v2 yet.

Read the v2 thread

Cover letter [PATCH v2 0/2] libfs: Introduce tokenize_user_input()

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 fs code and provide a unified solution.

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/[email protected]/

Cezary Rojewski (2):
libfs: Introduce tokenize_user_input()
ASoC: SOF: Remove strsplit_u32() and tokenize_input()

 fs/libfs.c                        | 45 +++++++++++++++
 include/linux/fs.h                |  1 +
 sound/soc/sof/sof-client-probes.c | 92 ++++---------------------------
 3 files changed, 57 insertions(+), 81 deletions(-)
Signature · 1 line
2.25.1