diff --git a/include/linux/xxhash.h b/include/linux/xxhash.h index 9e1f42cb57e9..d215926e7c93 100755 --- a/include/linux/xxhash.h +++ b/include/linux/xxhash.h @@ -223,7 +223,7 @@ uint64_t xxh64_digest(const struct xxh64_state *state); * @src: The source xxh32 state. * @dst: The destination xxh32 state. */ -void xxh32_copy_state(struct xxh32_state *dst, const struct xxh32_state *src); +#define xxh32_copy_state(dst, src) memcpy(dst, src, sizeof(*dst)) /** * xxh64_copy_state() - copy the source state into the destination state @@ -231,6 +231,6 @@ void xxh32_copy_state(struct xxh32_state *dst, const struct xxh32_state *src); * @src: The source xxh64 state. * @dst: The destination xxh64 state. */ -void xxh64_copy_state(struct xxh64_state *dst, const struct xxh64_state *src); +#define xxh64_copy_state(dst, src) memcpy(dst, src, sizeof(*dst)) #endif /* XXHASH_H */ diff --git a/lib/xxhash.c b/lib/xxhash.c index aa61e2a3802f..0b579e93bea3 100755 --- a/lib/xxhash.c +++ b/lib/xxhash.c @@ -73,21 +73,6 @@ static const uint64_t PRIME64_3 = 1609587929392839161ULL; static const uint64_t PRIME64_4 = 9650029242287828579ULL; static const uint64_t PRIME64_5 = 2870177450012600261ULL; -/*-************************** - * Utils - ***************************/ -void xxh32_copy_state(struct xxh32_state *dst, const struct xxh32_state *src) -{ - memcpy(dst, src, sizeof(*dst)); -} -EXPORT_SYMBOL(xxh32_copy_state); - -void xxh64_copy_state(struct xxh64_state *dst, const struct xxh64_state *src) -{ - memcpy(dst, src, sizeof(*dst)); -} -EXPORT_SYMBOL(xxh64_copy_state); - /*-*************************** * Simple Hash Functions ****************************/