diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2021-10-16 18:14:55 +0200 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2021-10-16 18:14:55 +0200 |
commit | 304040fb4909f7771caf6f8e8c61dbe51c93505a (patch) | |
tree | 7586536ae8537cc92f8ede4659812b0c1cd90a65 /arch | |
parent | Merge tag 'csky-for-linus-5.15-rc6' of git://github.com/c-sky/csky-linux (diff) | |
parent | s390: add Alexander Gordeev as reviewer (diff) | |
download | linux-304040fb4909f7771caf6f8e8c61dbe51c93505a.tar.xz linux-304040fb4909f7771caf6f8e8c61dbe51c93505a.zip |
Merge tag 's390-5.15-6' of git://git.kernel.org/pub/scm/linux/kernel/git/s390/linux
Pull s390 fixes from Vasily Gorbik:
- Maintainers and reviewers changes:
* Cornelia decided to free up her time and step down from vfio-ccw
maintainer and s390 kvm reviewer duties
* Add Alexander Gordeev as s390 arch code reviewer
- Fix broken strrchr implementation
* tag 's390-5.15-6' of git://git.kernel.org/pub/scm/linux/kernel/git/s390/linux:
s390: add Alexander Gordeev as reviewer
s390: fix strrchr() implementation
vfio-ccw: step down as maintainer
KVM: s390: remove myself as reviewer
Diffstat (limited to 'arch')
-rw-r--r-- | arch/s390/lib/string.c | 15 |
1 files changed, 7 insertions, 8 deletions
diff --git a/arch/s390/lib/string.c b/arch/s390/lib/string.c index cfcdf76d6a95..a95ca6df4e5e 100644 --- a/arch/s390/lib/string.c +++ b/arch/s390/lib/string.c @@ -259,14 +259,13 @@ EXPORT_SYMBOL(strcmp); #ifdef __HAVE_ARCH_STRRCHR char *strrchr(const char *s, int c) { - size_t len = __strend(s) - s; - - if (len) - do { - if (s[len] == (char) c) - return (char *) s + len; - } while (--len > 0); - return NULL; + ssize_t len = __strend(s) - s; + + do { + if (s[len] == (char)c) + return (char *)s + len; + } while (--len >= 0); + return NULL; } EXPORT_SYMBOL(strrchr); #endif |