mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/kdave/btrfs-progs.git
synced 2024-11-24 04:34:15 +08:00
btrfs-progs: remove btrfs_crc32c alias
There's an ancient macro btrfs_crc32c which is just wrapping crc32c and not doing anything else, so we can use the crc helper directly. Signed-off-by: David Sterba <dsterba@suse.com>
This commit is contained in:
parent
2e2c7c0fc6
commit
732d73dc1f
@ -29,5 +29,5 @@ u32 crc32c_le(u32 seed, unsigned char const *data, size_t length);
|
||||
void crc32c_optimization_init(void);
|
||||
|
||||
#define crc32c(seed, data, length) crc32c_le(seed, (unsigned char const *)data, length)
|
||||
#define btrfs_crc32c crc32c
|
||||
|
||||
#endif
|
||||
|
@ -2553,7 +2553,7 @@ static inline u64 btrfs_name_hash(const char *name, int len)
|
||||
static inline u64 btrfs_extref_hash(u64 parent_objectid, const char *name,
|
||||
int len)
|
||||
{
|
||||
return (u64)btrfs_crc32c(parent_objectid, name, len);
|
||||
return (u64)crc32c(parent_objectid, name, len);
|
||||
}
|
||||
|
||||
/* extent-tree.c */
|
||||
|
@ -525,11 +525,11 @@ u64 hash_extent_data_ref(u64 root_objectid, u64 owner, u64 offset)
|
||||
__le64 lenum;
|
||||
|
||||
lenum = cpu_to_le64(root_objectid);
|
||||
high_crc = btrfs_crc32c(high_crc, &lenum, sizeof(lenum));
|
||||
high_crc = crc32c(high_crc, &lenum, sizeof(lenum));
|
||||
lenum = cpu_to_le64(owner);
|
||||
low_crc = btrfs_crc32c(low_crc, &lenum, sizeof(lenum));
|
||||
low_crc = crc32c(low_crc, &lenum, sizeof(lenum));
|
||||
lenum = cpu_to_le64(offset);
|
||||
low_crc = btrfs_crc32c(low_crc, &lenum, sizeof(lenum));
|
||||
low_crc = crc32c(low_crc, &lenum, sizeof(lenum));
|
||||
|
||||
return ((u64)high_crc << 31) ^ (u64)low_crc;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user