summaryrefslogtreecommitdiffstats
path: root/lib/string.c
diff options
context:
space:
mode:
authorJens Axboe <axboe@kernel.dk>2019-04-22 11:47:36 -0400
committerJens Axboe <axboe@kernel.dk>2019-04-22 11:47:36 -0400
commit5c61ee2cd5860e41c8ab98837761ffaa93eb4dfe (patch)
tree0c78e25f5020eeee47863092ccbb2a3f56bea8a9 /lib/string.c
parentcdf3e3deb747d5e193dee617ed37c83060eb576f (diff)
parent085b7755808aa11f78ab9377257e1dad2e6fa4bb (diff)
Merge tag 'v5.1-rc6' into for-5.2/block
Pull in v5.1-rc6 to resolve two conflicts. One is in BFQ, in just a comment, and is trivial. The other one is a conflict due to a later fix in the bio multi-page work, and needs a bit more care. * tag 'v5.1-rc6': (770 commits) Linux 5.1-rc6 block: make sure that bvec length can't be overflow block: kill all_q_node in request_queue x86/cpu/intel: Lower the "ENERGY_PERF_BIAS: Set to normal" message's log priority coredump: fix race condition between mmget_not_zero()/get_task_mm() and core dumping mm/kmemleak.c: fix unused-function warning init: initialize jump labels before command line option parsing kernel/watchdog_hld.c: hard lockup message should end with a newline kcov: improve CONFIG_ARCH_HAS_KCOV help text mm: fix inactive list balancing between NUMA nodes and cgroups mm/hotplug: treat CMA pages as unmovable proc: fixup proc-pid-vm test proc: fix map_files test on F29 mm/vmstat.c: fix /proc/vmstat format for CONFIG_DEBUG_TLBFLUSH=y CONFIG_SMP=n mm/memory_hotplug: do not unlock after failing to take the device_hotplug_lock mm: swapoff: shmem_unuse() stop eviction without igrab() mm: swapoff: take notice of completion sooner mm: swapoff: remove too limiting SWAP_UNUSE_MAX_TRIES mm: swapoff: shmem_find_swap_entries() filter out other types slab: store tagged freelist for off-slab slabmgmt ... Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'lib/string.c')
-rw-r--r--lib/string.c20
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)
866EXPORT_SYMBOL(memcmp); 866EXPORT_SYMBOL(memcmp);
867#endif 867#endif
868 868
869#ifndef __HAVE_ARCH_BCMP
870/**
871 * bcmp - returns 0 if and only if the buffers have identical contents.
872 * @a: pointer to first buffer.
873 * @b: pointer to second buffer.
874 * @len: size of buffers.
875 *
876 * The sign or magnitude of a non-zero return value has no particular
877 * meaning, and architectures may implement their own more efficient bcmp(). So
878 * while this particular implementation is a simple (tail) call to memcmp, do
879 * not rely on anything but whether the return value is zero or non-zero.
880 */
881#undef bcmp
882int bcmp(const void *a, const void *b, size_t len)
883{
884 return memcmp(a, b, len);
885}
886EXPORT_SYMBOL(bcmp);
887#endif
888
869#ifndef __HAVE_ARCH_MEMSCAN 889#ifndef __HAVE_ARCH_MEMSCAN
870/** 890/**
871 * memscan - Find a character in an area of memory. 891 * memscan - Find a character in an area of memory.