diff options
| author | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2019-04-21 23:20:08 +0200 | 
|---|---|---|
| committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2019-04-21 23:20:08 +0200 | 
| commit | 3b8a1f45e1b3886593a7cbb0aca09d4d0a9e23df (patch) | |
| tree | e9f4ada62ee0d88c7c389cbf66bf2f7ec897c680 /lib/string.c | |
| parent | c7a6b9e4df4c5d9e95e38766923f98117b045c39 (diff) | |
| parent | 085b7755808aa11f78ab9377257e1dad2e6fa4bb (diff) | |
Merge 5.1-rc6 into tty-next
We want the serial/tty fixes in here as well.
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'lib/string.c')
| -rw-r--r-- | lib/string.c | 20 | 
1 files changed, 20 insertions, 0 deletions
diff --git a/lib/string.c b/lib/string.c index 38e4ca08e757..3ab861c1a857 100644 --- a/lib/string.c +++ b/lib/string.c @@ -866,6 +866,26 @@ __visible int memcmp(const void *cs, const void *ct, size_t count)  EXPORT_SYMBOL(memcmp);  #endif +#ifndef __HAVE_ARCH_BCMP +/** + * bcmp - returns 0 if and only if the buffers have identical contents. + * @a: pointer to first buffer. + * @b: pointer to second buffer. + * @len: size of buffers. + * + * The sign or magnitude of a non-zero return value has no particular + * meaning, and architectures may implement their own more efficient bcmp(). So + * while this particular implementation is a simple (tail) call to memcmp, do + * not rely on anything but whether the return value is zero or non-zero. + */ +#undef bcmp +int bcmp(const void *a, const void *b, size_t len) +{ +	return memcmp(a, b, len); +} +EXPORT_SYMBOL(bcmp); +#endif +  #ifndef __HAVE_ARCH_MEMSCAN  /**   * memscan - Find a character in an area of memory.  | 
