]> www.infradead.org Git - users/jedix/linux-maple.git/commit
btrfs: use unsigned types for constants defined as bit shifts
authorDavid Sterba <dsterba@suse.com>
Tue, 22 Apr 2025 15:55:41 +0000 (17:55 +0200)
committerDavid Sterba <dsterba@suse.com>
Thu, 15 May 2025 12:30:48 +0000 (14:30 +0200)
commit05a6ec865d091fe8244657df8063f74e704d1711
tree4522b724dbec7392ae63f10db8f2eb89dc156b7d
parentd4d788a776b49c1e8961104caa2b715bc49074af
btrfs: use unsigned types for constants defined as bit shifts

The unsigned type is a recommended practice (CWE-190, CWE-194) for bit
shifts to avoid problems with potential unwanted sign extensions.
Although there are no such cases in btrfs codebase, follow the
recommendation.

Reviewed-by: Boris Burkov <boris@bur.io>
Signed-off-by: David Sterba <dsterba@suse.com>
fs/btrfs/backref.h
fs/btrfs/direct-io.c
fs/btrfs/extent_io.h
fs/btrfs/inode.c
fs/btrfs/ordered-data.c
fs/btrfs/raid56.c
fs/btrfs/tests/extent-io-tests.c
fs/btrfs/zstd.c