Re: [PATCH v7 1/2] lib/string.c: add __sysfs_match_string_with_gaps() helper

2021-01-07 Thread Andy Shevchenko
On Thu, Jan 7, 2021 at 10:41 AM Alexandru Ardelean wrote: > > The original docstring of the __sysfs_match_string() and match_string() > helper, implied that -1 could be used to search through NULL terminated > arrays, and positive 'n' could be used to go through arrays that may have > NULL

[PATCH v7 1/2] lib/string.c: add __sysfs_match_string_with_gaps() helper

2021-01-07 Thread Alexandru Ardelean
The original docstring of the __sysfs_match_string() and match_string() helper, implied that -1 could be used to search through NULL terminated arrays, and positive 'n' could be used to go through arrays that may have NULL elements in the middle of the array. This isn't true. Regardless of the