From 840a97bdef1e5d7bd8bf147812df416cca15afc7 Mon Sep 17 00:00:00 2001 From: David Sterba Date: Mon, 20 May 2024 20:48:06 +0200 Subject: [PATCH] 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 --- fs/btrfs/accessors.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fs/btrfs/accessors.h b/fs/btrfs/accessors.h index 6fce3e8d3dac..c60f0e7f768a 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) -- 2.49.0