aboutsummaryrefslogtreecommitdiffstats
path: root/fs
diff options
context:
space:
mode:
authorDan Carpenter <dan.carpenter@oracle.com>2016-10-12 04:33:21 -0400
committerDavid Sterba <dsterba@suse.com>2016-10-24 12:20:29 -0400
commit9c894696f56f5d84fb5766af81bcda4a7cb9a842 (patch)
treeec9abee1550c947b9effa966fe2281e450d3797f /fs
parentdd4b857aabbce57518f2d32d9805365d3ff34fc6 (diff)
Btrfs: remove some no-op casts
We cast 0 to a u8 but then because of type promotion, it's immediately cast to int back to int before we do a bitwise negate. The cast doesn't matter in this case, the code works as intended. It causes a static checker warning though so let's remove it. Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Reviewed-by: David Sterba <dsterba@suse.com> Signed-off-by: David Sterba <dsterba@suse.com>
Diffstat (limited to 'fs')
-rw-r--r--fs/btrfs/extent_io.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/fs/btrfs/extent_io.c b/fs/btrfs/extent_io.c
index 66a755150056..8ed05d95584a 100644
--- a/fs/btrfs/extent_io.c
+++ b/fs/btrfs/extent_io.c
@@ -5569,7 +5569,7 @@ void le_bitmap_set(u8 *map, unsigned int start, int len)
5569 *p |= mask_to_set; 5569 *p |= mask_to_set;
5570 len -= bits_to_set; 5570 len -= bits_to_set;
5571 bits_to_set = BITS_PER_BYTE; 5571 bits_to_set = BITS_PER_BYTE;
5572 mask_to_set = ~(u8)0; 5572 mask_to_set = ~0;
5573 p++; 5573 p++;
5574 } 5574 }
5575 if (len) { 5575 if (len) {
@@ -5589,7 +5589,7 @@ void le_bitmap_clear(u8 *map, unsigned int start, int len)
5589 *p &= ~mask_to_clear; 5589 *p &= ~mask_to_clear;
5590 len -= bits_to_clear; 5590 len -= bits_to_clear;
5591 bits_to_clear = BITS_PER_BYTE; 5591 bits_to_clear = BITS_PER_BYTE;
5592 mask_to_clear = ~(u8)0; 5592 mask_to_clear = ~0;
5593 p++; 5593 p++;
5594 } 5594 }
5595 if (len) { 5595 if (len) {
@@ -5679,7 +5679,7 @@ void extent_buffer_bitmap_set(struct extent_buffer *eb, unsigned long start,
5679 kaddr[offset] |= mask_to_set; 5679 kaddr[offset] |= mask_to_set;
5680 len -= bits_to_set; 5680 len -= bits_to_set;
5681 bits_to_set = BITS_PER_BYTE; 5681 bits_to_set = BITS_PER_BYTE;
5682 mask_to_set = ~(u8)0; 5682 mask_to_set = ~0;
5683 if (++offset >= PAGE_SIZE && len > 0) { 5683 if (++offset >= PAGE_SIZE && len > 0) {
5684 offset = 0; 5684 offset = 0;
5685 page = eb->pages[++i]; 5685 page = eb->pages[++i];
@@ -5721,7 +5721,7 @@ void extent_buffer_bitmap_clear(struct extent_buffer *eb, unsigned long start,
5721 kaddr[offset] &= ~mask_to_clear; 5721 kaddr[offset] &= ~mask_to_clear;
5722 len -= bits_to_clear; 5722 len -= bits_to_clear;
5723 bits_to_clear = BITS_PER_BYTE; 5723 bits_to_clear = BITS_PER_BYTE;
5724 mask_to_clear = ~(u8)0; 5724 mask_to_clear = ~0;
5725 if (++offset >= PAGE_SIZE && len > 0) { 5725 if (++offset >= PAGE_SIZE && len > 0) {
5726 offset = 0; 5726 offset = 0;
5727 page = eb->pages[++i]; 5727 page = eb->pages[++i];