From: David Sterba Date: Mon, 20 May 2024 18:48:06 +0000 (+0200) Subject: btrfs: keep const when returning value from get_unaligned_le8() X-Git-Tag: v6.11-rc1~157^2~123 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=840a97bdef1e5d7bd8bf147812df416cca15afc7;p=thirdparty%2Flinux.git btrfs: keep const when returning value from get_unaligned_le8() This was reported by 'gcc -Wcast-qual', the get_unaligned_le8() simply returns the argument and there's no reason to drop the cast. Reviewed-by: Boris Burkov Reviewed-by: Anand Jain Reviewed-by: Naohiro Aota Signed-off-by: David Sterba --- diff --git a/fs/btrfs/accessors.h b/fs/btrfs/accessors.h index 6fce3e8d3dac5..c60f0e7f768ac 100644 --- a/fs/btrfs/accessors.h +++ b/fs/btrfs/accessors.h @@ -34,7 +34,7 @@ void btrfs_init_map_token(struct btrfs_map_token *token, struct extent_buffer *e static inline u8 get_unaligned_le8(const void *p) { - return *(u8 *)p; + return *(const u8 *)p; } static inline void put_unaligned_le8(u8 val, void *p)