diff options
| author | Takashi Iwai <tiwai@suse.de> | 2025-12-21 13:11:11 +0300 |
|---|---|---|
| committer | Takashi Iwai <tiwai@suse.de> | 2025-12-21 13:11:11 +0300 |
| commit | 24f171c7e145f43b9f187578e89b0982ce87e54c (patch) | |
| tree | 4044981e7fa714534981162dc390f15fbd4d3241 /include/linux/string.h | |
| parent | f7cede182c963720edd1e5fb50ea4f1c7eafa30e (diff) | |
| parent | 56d953a8d0da5e53c2594edde23465ec49385b1c (diff) | |
| download | linux-24f171c7e145f43b9f187578e89b0982ce87e54c.tar.xz | |
Merge tag 'asoc-fix-v6.19-rc1' of https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into for-linus
ASoC: Fixes for v6.19
We've been quite busy with fixes since the merge window, though not in
any particularly exciting ways - the standout thing is the fix for _SX
controls which were broken by a change to how we do clamping, otherwise
it's all fairly run of the mill fixes and quirks.
Diffstat (limited to 'include/linux/string.h')
| -rw-r--r-- | include/linux/string.h | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/include/linux/string.h b/include/linux/string.h index 929d05d1247c..1b564c36d721 100644 --- a/include/linux/string.h +++ b/include/linux/string.h @@ -371,6 +371,10 @@ static inline void memzero_explicit(void *s, size_t count) * kbasename - return the last part of a pathname. * * @path: path to extract the filename from. + * + * Returns: + * Pointer to the filename portion inside @path. If no '/' exists, + * returns @path unchanged. */ static inline const char *kbasename(const char *path) { @@ -556,6 +560,9 @@ static __always_inline size_t str_has_prefix(const char *str, const char *prefix * strstarts - does @str start with @prefix? * @str: string to examine * @prefix: prefix to look for. + * + * Returns: + * True if @str begins with @prefix. False in all other cases. */ static inline bool strstarts(const char *str, const char *prefix) { @@ -564,13 +571,14 @@ static inline bool strstarts(const char *str, const char *prefix) /** * strends - Check if a string ends with another string. - * @str - NULL-terminated string to check against @suffix - * @suffix - NULL-terminated string defining the suffix to look for in @str + * @str: NULL-terminated string to check against @suffix + * @suffix: NULL-terminated string defining the suffix to look for in @str * * Returns: * True if @str ends with @suffix. False in all other cases. */ -static inline bool strends(const char *str, const char *suffix) +static inline bool __attribute__((nonnull(1, 2))) +strends(const char *str, const char *suffix) { unsigned int str_len = strlen(str), suffix_len = strlen(suffix); |
