diff mbox series

[5/6] btrfs: keep const whene returnin value from get_unaligned_le8()

Message ID d5e88373ee6f83658af337d84f29886c8c72ab70.1716234472.git.dsterba@suse.com (mailing list archive)
State New, archived
Headers show
Series Cleanups and W=2 warning fixes | expand

Commit Message

David Sterba May 20, 2024, 7:52 p.m. UTC
This was reported by -Wcast-qual, the get_unaligned_le8() simply returns
the arugment and there's no reason to drop the cast.

Signed-off-by: David Sterba <dsterba@suse.com>
---
 fs/btrfs/accessors.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff mbox series

Patch

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)