mirror of
https://github.com/versity/scoutfs.git
synced 2026-01-07 12:35:28 +00:00
FIELD_SIZEOF was deprecated.
We could use sizeof_field as a direct replacement (which is the same) except that this entire thing can directly use offsetofend(). Signed-off-by: Auke Kok <auke.kok@versity.com>
This commit is contained in:
@@ -120,8 +120,7 @@ do { \
|
||||
|
||||
static __le32 block_calc_crc(struct scoutfs_block_header *hdr, u32 size)
|
||||
{
|
||||
int off = offsetof(struct scoutfs_block_header, crc) +
|
||||
FIELD_SIZEOF(struct scoutfs_block_header, crc);
|
||||
int off = offsetofend(struct scoutfs_block_header, crc);
|
||||
u32 calc = crc32c(~0, (char *)hdr + off, size - off);
|
||||
|
||||
return cpu_to_le32(calc);
|
||||
|
||||
Reference in New Issue
Block a user