From patchwork Thu Oct 27 07:52:33 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Domagoj Trsan X-Patchwork-Id: 9399601 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 3044D6059D for ; Thu, 27 Oct 2016 14:45:47 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 1BCF42A0D7 for ; Thu, 27 Oct 2016 14:45:47 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 10C572A304; Thu, 27 Oct 2016 14:45:47 +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.3 required=2.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_HI, RCVD_IN_SORBS_SPAM, 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 07E6E2A0D7 for ; Thu, 27 Oct 2016 14:45:39 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S936241AbcJ0OpL (ORCPT ); Thu, 27 Oct 2016 10:45:11 -0400 Received: from mail-wm0-f65.google.com ([74.125.82.65]:33543 "EHLO mail-wm0-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S936161AbcJ0OpJ (ORCPT ); Thu, 27 Oct 2016 10:45:09 -0400 Received: by mail-wm0-f65.google.com with SMTP id m83so3064496wmc.0 for ; Thu, 27 Oct 2016 07:44:56 -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:mime-version :content-transfer-encoding; bh=zWllKupRMM8oFmOX79RDZTC8ymyWpNKMlOVbnffKgkA=; b=lspgljXgqEVJMGoGF8XUP5nOh19Ms/jCcAywtHxDWeJhujrtP27OfWpZynPPRWHOBq lgJiE2EJx8HW68/yO2CrcyfLuOmYpWkwV57H3sBR3TAeZ7wXDExIi0uh7NA7N+q5ZVLS rF2YKCcFMicqfz3lt/C1Yxs6nvJa/uesQYcn+hud/jDcIlOwjV5HfsKjVXq3hbQrXACx t49GpsXQEaZ719KQJ+dlBmUv0vYGdJOLZtKfIg5mjY2T1sCAzY9YdvfNpyZlX1fNxKd2 ietXEFBnG/UV0vSgaZaLrgbpv3Mtw3Qp/WD01F15vtnvvdQp5Bozoeecl9HGa3KPcyZJ RREw== 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:mime-version :content-transfer-encoding; bh=zWllKupRMM8oFmOX79RDZTC8ymyWpNKMlOVbnffKgkA=; b=aqJU3qyLelfmx697lv84+5qFpPwkeOyX+0KhzFmRZzugOaYqbCGfXxC0Px8+u+f19q d+dVi+P06mcqpROmCpneoGJX2VaY731VZxADl4Qc+KXf2ZHGNxFKId9byCw9sLMcW1Wd vIh38i4Rtq6dsILqZ0isU1fGjnsLWtgUkQODe+1D0KycvKVoNRBAwmKIJ25BwIG3pZ4i hlkY0gl9sggA4Uicfml/umZawExAtK9lU/YWSq9qItpoQg0TJf61bbSLSElB5DFlFZHk 9x37QLdcsWwkZG/hj3oEFZyUQ6A9Kza6jBwiZqYz5su+dhHYtyW7i4GUQy06QSc16Hk7 +quQ== X-Gm-Message-State: ABUngveM0MJPQCF3xQ5hXYJ7Mws24UN73toZrfI3C/JXk6vdiuXwFq38SI5kET2fMkdJIQ== X-Received: by 10.194.62.178 with SMTP id z18mr6245302wjr.20.1477554758319; Thu, 27 Oct 2016 00:52:38 -0700 (PDT) Received: from localhost.localdomain ([2a02:8084:d6c3:6780:c5d2:d410:2572:bf7]) by smtp.gmail.com with ESMTPSA id 63sm2176758wmv.1.2016.10.27.00.52.36 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 27 Oct 2016 00:52:37 -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 v3] btrfs: change btrfs_csum_final result param type to u8 Date: Thu, 27 Oct 2016 08:52:33 +0100 Message-Id: <20161027075233.4050-1-domagoj.trsan@gmail.com> X-Mailer: git-send-email 2.9.3 MIME-Version: 1.0 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); Signed-off-by: Domagoj Tršan --- 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,