]> www.infradead.org Git - users/dwmw2/linux.git/commitdiff
btrfs: keep const when returning value from get_unaligned_le8()
authorDavid Sterba <dsterba@suse.com>
Mon, 20 May 2024 18:48:06 +0000 (20:48 +0200)
committerDavid Sterba <dsterba@suse.com>
Thu, 11 Jul 2024 13:33:19 +0000 (15:33 +0200)
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 <boris@bur.io>
Reviewed-by: Anand Jain <anand.jain@oracle.com>
Reviewed-by: Naohiro Aota <naohiro.aota@wdc.com>
Signed-off-by: David Sterba <dsterba@suse.com>
fs/btrfs/accessors.h

index 6fce3e8d3dac527cb5e8bd44ff8fa1cc685f583d..c60f0e7f768ac479560434737876a44e2315f5f8 100644 (file)
@@ -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)