diff options
author | Dan Williams <dan.j.williams@intel.com> | 2017-01-13 14:14:23 -0800 |
---|---|---|
committer | Dan Williams <dan.j.williams@intel.com> | 2017-04-25 13:20:46 -0700 |
commit | 6abccd1bfee49e491095772fd5aa9e96d915ae52 (patch) | |
tree | 594b473022733c4220e52a0f82ddea1c6a7e248f /include/linux/string.h | |
parent | d4b29fd78ea6fc2be219be3af1a992149b4ff0f6 (diff) | |
download | linux-stable-6abccd1bfee49e491095772fd5aa9e96d915ae52.tar.gz linux-stable-6abccd1bfee49e491095772fd5aa9e96d915ae52.tar.bz2 linux-stable-6abccd1bfee49e491095772fd5aa9e96d915ae52.zip |
x86, dax, pmem: remove indirection around memcpy_from_pmem()
memcpy_from_pmem() maps directly to memcpy_mcsafe(). The wrapper
serves no real benefit aside from affording a more generic function name
than the x86-specific 'mcsafe'. However this would not be the first time
that x86 terminology leaked into the global namespace. For lack of
better name, just use memcpy_mcsafe() directly.
This conversion also catches a place where we should have been using
plain memcpy, acpi_nfit_blk_single_io().
Cc: <x86@kernel.org>
Cc: Jan Kara <jack@suse.cz>
Cc: Jeff Moyer <jmoyer@redhat.com>
Cc: Ingo Molnar <mingo@redhat.com>
Cc: Christoph Hellwig <hch@lst.de>
Cc: "H. Peter Anvin" <hpa@zytor.com>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Matthew Wilcox <mawilcox@microsoft.com>
Cc: Ross Zwisler <ross.zwisler@linux.intel.com>
Acked-by: Tony Luck <tony.luck@intel.com>
Signed-off-by: Dan Williams <dan.j.williams@intel.com>
Diffstat (limited to 'include/linux/string.h')
-rw-r--r-- | include/linux/string.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/include/linux/string.h b/include/linux/string.h index 26b6f6a66f83..9d6f189157e2 100644 --- a/include/linux/string.h +++ b/include/linux/string.h @@ -114,6 +114,14 @@ extern int memcmp(const void *,const void *,__kernel_size_t); #ifndef __HAVE_ARCH_MEMCHR extern void * memchr(const void *,int,__kernel_size_t); #endif +#ifndef __HAVE_ARCH_MEMCPY_MCSAFE +static inline __must_check int memcpy_mcsafe(void *dst, const void *src, + size_t cnt) +{ + memcpy(dst, src, cnt); + return 0; +} +#endif void *memchr_inv(const void *s, int c, size_t n); char *strreplace(char *s, char old, char new); |