summaryrefslogtreecommitdiffstats
path: root/arch/s390/lib/string.c
diff options
context:
space:
mode:
authorJason Gunthorpe <jgg@nvidia.com>2021-10-19 14:09:25 -0300
committerJason Gunthorpe <jgg@nvidia.com>2021-10-19 14:09:25 -0300
commit71ee1f1275432421307d27dd4df43f33e60456de (patch)
treea69e771c98ca332d0872612b61413b7fbd9e2765 /arch/s390/lib/string.c
parentac0fffa0859b8e1e991939663b3ebdd80bf979e6 (diff)
parentae0579acde812bc1efd074086ae3bc5eae170f20 (diff)
downloadlinux-71ee1f1275432421307d27dd4df43f33e60456de.tar.bz2
Merge brank 'mlx5_mkey' into rdma.git for-next
A small series to clean up the mlx5 mkey code across the mlx5_core and InfiniBand. * branch 'mlx5_mkey': RDMA/mlx5: Attach ndescs to mlx5_ib_mkey RDMA/mlx5: Move struct mlx5_core_mkey to mlx5_ib RDMA/mlx5: Replace struct mlx5_core_mkey by u32 key RDMA/mlx5: Remove pd from struct mlx5_core_mkey RDMA/mlx5: Remove size from struct mlx5_core_mkey RDMA/mlx5: Remove iova from struct mlx5_core_mkey Signed-off-by: Jason Gunthorpe <jgg@nvidia.com>
Diffstat (limited to 'arch/s390/lib/string.c')
-rw-r--r--arch/s390/lib/string.c15
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