The helper is trivial, so make it inline to save users the minimal hassle of calling it out-of-line. Signed-off-by: Ahmad Fatoum <a.fatoum@xxxxxxxxxxxxxx> --- include/string.h | 5 ++++- lib/string.c | 6 ------ 2 files changed, 4 insertions(+), 7 deletions(-) diff --git a/include/string.h b/include/string.h index 4ee3be6d93cc..5139c7ef1f3d 100644 --- a/include/string.h +++ b/include/string.h @@ -33,6 +33,9 @@ static inline bool streq_ptr(const char *a, const char *b) return strcmp_ptr(a, b) == 0; } -bool isempty(const char *s); +static inline bool isempty(const char *s) +{ + return !s || s[0] == '\0'; +} #endif /* __STRING_H */ diff --git a/lib/string.c b/lib/string.c index 7e4bec2e99cc..374f326143a7 100644 --- a/lib/string.c +++ b/lib/string.c @@ -1049,9 +1049,3 @@ char *strreplace(char *str, char old, char new) return str; } EXPORT_SYMBOL(strreplace); - -bool isempty(const char *s) -{ - return !s || s[0] == '\0'; -} -EXPORT_SYMBOL(isempty); -- 2.39.2