diff options
author | Kent Overstreet <kent.overstreet@linux.dev> | 2023-07-06 22:47:42 -0400 |
---|---|---|
committer | Kent Overstreet <kent.overstreet@linux.dev> | 2023-10-22 17:10:06 -0400 |
commit | 73bd774d28d2b2e6a05c31bf7afb9247e02a8e49 (patch) | |
tree | 21ab80d4b966d92647ea178bc5707a8534e5d123 /fs/bcachefs/extents.h | |
parent | 236b68da5017b5336b332f941323a5bc450594b3 (diff) | |
download | lwn-73bd774d28d2b2e6a05c31bf7afb9247e02a8e49.tar.gz lwn-73bd774d28d2b2e6a05c31bf7afb9247e02a8e49.zip |
bcachefs: Assorted sparse fixes
- endianness fixes
- mark some things static
- fix a few __percpu annotations
- fix silent enum conversions
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
Diffstat (limited to 'fs/bcachefs/extents.h')
-rw-r--r-- | fs/bcachefs/extents.h | 8 |
1 files changed, 2 insertions, 6 deletions
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; } |