From patchwork Fri Oct 21 11:47:02 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Domagoj Trsan X-Patchwork-Id: 9388747 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id CAE6960231 for ; Fri, 21 Oct 2016 11:47:17 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id BCDF22A102 for ; Fri, 21 Oct 2016 11:47:17 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id B0FC62A104; Fri, 21 Oct 2016 11:47:17 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.8 required=2.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_HI, T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 4F8A22A102 for ; Fri, 21 Oct 2016 11:47:17 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754995AbcJULrO (ORCPT ); Fri, 21 Oct 2016 07:47:14 -0400 Received: from mail-lf0-f65.google.com ([209.85.215.65]:36724 "EHLO mail-lf0-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754833AbcJULrN (ORCPT ); Fri, 21 Oct 2016 07:47:13 -0400 Received: by mail-lf0-f65.google.com with SMTP id b75so5480553lfg.3 for ; Fri, 21 Oct 2016 04:47:12 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id; bh=ZgHsojEcoXmZEmBEemgtgWHTTFtzJddTSLeusOBJjh4=; b=BboGedR7xcGTwCus/OnPzO6dwXbwZxhLM/BtJohZANnxesYJgl0FtzZq6M1ycNDKZz Ya5XBr682ehY9+tvvnk7KIm89zKIOuCfBCj3Eh4Anw7sISB2O3lkdyE2tl1vIZQ3byaC 48taKbVegiyIPSmHKLi7qXesFzcCe95OkM0i0R3GiLTmwPp3zXAUG++kFL6vmdcbDPlc EVcLdfJxzJ45A69nFgDjgSkAe4zO0QQVNfM8WOBkoq26/pYMs0hWouzubL4WTHfa0Z/v bvCKEaYZ4CHtj7tBhpfUIGA76nwPn5fC89ftmzO1Q3+Fp/vhshqxuqaRlB8udU4MiUVf HFXg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=ZgHsojEcoXmZEmBEemgtgWHTTFtzJddTSLeusOBJjh4=; b=fNXAVTTAI3Y+oqJVn1dSMqfF2WEzFOg0TbXmSNgJdyffkxHsQ51KPODpidYnROgBaP X2b43qE1ECPTGv/7D9cVbEA3cwfEoGG0DbFLLJROBXPNnWHW9v/inhmsw1LBrC4ON/Lc iD+NhFOhBOIzgHvdwjZ1MNNidHh0Uwx0gKNHpTCACNWhaQV7ME1OUjqOb96/hbPG0JVS M8Uj0IMcWqQgpw6hNW/IBNVgGBJuf0jnaGeKAtSzYfNonvdDNywbWq/Jze5keqiXmDaK pLr6IhlSUkcy7hvz/G8V8It+WErVLAWrwvUU1KoLiocHQcHKwu0+X1tGFdSCekIzdXOW f7Kg== X-Gm-Message-State: AA6/9RnFBKtGXj03BcgbZbBiTeqmdrhLApHNH3vJi5P5309Zy/5Mq26fbc5243YwLAWBMg== X-Received: by 10.28.232.152 with SMTP id f24mr9921039wmi.62.1477050431162; Fri, 21 Oct 2016 04:47:11 -0700 (PDT) Received: from localhost.localdomain ([2a02:8084:d300:3c80:8151:3177:1712:ebd6]) by smtp.gmail.com with ESMTPSA id i10sm2516294wjw.1.2016.10.21.04.47.09 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 21 Oct 2016 04:47:10 -0700 (PDT) From: =?UTF-8?q?Domagoj=20Tr=C5=A1an?= To: linux-btrfs@vger.kernel.org Cc: clm@fb.com, jbacik@fb.com, dsterba@suse.com, =?UTF-8?q?Domagoj=20Tr=C5=A1an?= Subject: [PATCH v2] btrfs: change btrfs_csum_final result param type to u8 Date: Fri, 21 Oct 2016 12:47:02 +0100 Message-Id: <20161021114702.29425-1-domagoj.trsan@gmail.com> X-Mailer: git-send-email 2.9.3 Sender: linux-btrfs-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-btrfs@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP 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(-) diff --git a/fs/btrfs/disk-io.c b/fs/btrfs/disk-io.c index 50bed6c..95bd34f 100644 --- a/fs/btrfs/disk-io.c +++ b/fs/btrfs/disk-io.c @@ -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); } diff --git a/fs/btrfs/disk-io.h b/fs/btrfs/disk-io.h index 8e79d00..e849845 100644 --- a/fs/btrfs/disk-io.h +++ b/fs/btrfs/disk-io.h @@ -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,