From 73bd774d28d2b2e6a05c31bf7afb9247e02a8e49 Mon Sep 17 00:00:00 2001 From: Kent Overstreet Date: Thu, 6 Jul 2023 22:47:42 -0400 Subject: bcachefs: Assorted sparse fixes - endianness fixes - mark some things static - fix a few __percpu annotations - fix silent enum conversions Signed-off-by: Kent Overstreet --- fs/bcachefs/extents.h | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) (limited to 'fs/bcachefs/extents.h') diff --git a/fs/bcachefs/extents.h b/fs/bcachefs/extents.h index c573a40d366a..f6411d63f298 100644 --- a/fs/bcachefs/extents.h +++ b/fs/bcachefs/extents.h @@ -154,11 +154,7 @@ bch2_extent_crc_unpack(const struct bkey *k, const union bch_extent_crc *crc) common_fields(crc->crc32), }; - *((__le32 *) &ret.csum.lo) = crc->crc32.csum; - - memcpy(&ret.csum.lo, &crc->crc32.csum, - sizeof(crc->crc32.csum)); - + *((__le32 *) &ret.csum.lo) = (__le32 __force) crc->crc32.csum; return ret; } case BCH_EXTENT_ENTRY_crc64: { @@ -168,7 +164,7 @@ bch2_extent_crc_unpack(const struct bkey *k, const union bch_extent_crc *crc) .csum.lo = (__force __le64) crc->crc64.csum_lo, }; - *((__le16 *) &ret.csum.hi) = crc->crc64.csum_hi; + *((__le16 *) &ret.csum.hi) = (__le16 __force) crc->crc64.csum_hi; return ret; } -- cgit v1.2.3