btrfs: change btrfs_csum_final result param type to u8
PATCH v2 1/1 btrfs: change btrfs_csum_final result param type to u8
csum member of struct btrfs_super_block has array type of u8. It makes sense that function btrfs_csum_final should be also declared to accept u8 *. I changed the declaration of method void btrfs_csum_final(u32 crc, char *result); to void btrfs_csum_final(u32 crc, u8 *result);
--- fs/btrfs/disk-io.c | 2 +- fs/btrfs/disk-io.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-)
fs/btrfs/disk-io.c +1 -1
@@ -273,7 +273,7 @@ u32 btrfs_csum_data(char *data, u32 seed, size_t len)return btrfs_crc32c (seed, data, len); } -void btrfs_csum_final (u32 crc,char *result) +void btrfs_csum_final (u32 crc,u8 *result) {put_unaligned_le32 (~crc, result); }
fs/btrfs/disk-io.h +1 -1
@@ -118,7 +118,7 @@ int btrfs_buffer_uptodate(struct extent_buffer *buf, u64 parent_transid, int atomic);int btrfs_read_buffer (struct extent_buffer *buf,u64 parent_transid);u32 btrfs_csum_data (char *data,u32 seed,size_t len); -void btrfs_csum_final (u32 crc,char *result); +void btrfs_csum_final (u32 crc,u8 *result);int btrfs_bio_wq_end_io (struct btrfs_fs_info *info,struct bio *bio,enum btrfs_wq_endio_type metadata); int btrfs_wq_submit_bio(struct btrfs_fs_info *fs_info, struct inode *inode,
Signature · 1 line
2.7.4
Quoted 4 lines · Domagoj Tršan
csum member of struct
btrfs_super_blockhas array type of u8. It makes sense that functionbtrfs_csum_finalshould be also declared to accept u8 *. I changed the declaration of method voidbtrfs_csum_final(u32 crc, char *result); to voidbtrfs_csum_final(u32 crc, u8 *result);
Ok that's better, just the signed-off-by line is missing. I would add it myself on behalf of contributors I know, but as a matter of practice, fix it please and resend the patch. Using the "git commit -s" adds the line for you.
It is a formality, established in the linux kernel development. If you need more explanatino what and why, please refer to the following docs.
http://elinux.org/Developer_Certificate_Of_Origin
https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/tree/Documentation/SubmittingPatches
Quoted 6 lines · David Sterba
Ok that's better, just the signed-off-by line is missing. I would add it myself on behalf of contributors I know, but as a matter of practice, fix it please and resend the patch. Using the "git commit -s" adds the line for you.
I added singed-off-by and resent the patch
Signature · 1 line
(\/)(;,,;)(\/)